|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ontopia.topicmaps.xml.AbstractTopicMapExporter
net.ontopia.topicmaps.xml.XTMTopicMapExporter
net.ontopia.topicmaps.xml.XTMFragmentExporter
public class XTMFragmentExporter
PUBLIC: Exports partial topic maps using an approach inspired by the XTM Fragment Interchange 0.1 specification, but different.
Note that the TopicMapFragmentWriterIF implementation is not this class, but XTMTopicMapFragmentWriter.
WARNING: This class is not thread-safe.
XTMTopicMapFragmentWriter
Nested Class Summary | |
---|---|
static interface |
XTMFragmentExporter.LocatorHandlerIF
EXPERIMENTAL: Handler class used for processing locators. |
Field Summary | |
---|---|
protected Set |
alreadyExported
|
protected XTMFragmentExporter.LocatorHandlerIF |
locator_handler
|
protected Collection |
reifiers
|
protected boolean |
use_local_ids
|
static String |
VIRTUAL_URN
|
Fields inherited from class net.ontopia.topicmaps.xml.XTMTopicMapExporter |
---|
atts, EMPTY_ATTR_LIST, export_srclocs |
Fields inherited from class net.ontopia.topicmaps.xml.AbstractTopicMapExporter |
---|
add_ids, filter |
Constructor Summary | |
---|---|
XTMFragmentExporter()
PUBLIC: Initializes the exporter. |
|
XTMFragmentExporter(String tmid)
|
Method Summary | |
---|---|
void |
endTopicMap(DocumentHandler dh)
PUBLIC: Outputs the end tag. |
void |
exportAll(Iterator it,
DocumentHandler dh)
PUBLIC: Exports an XTM Fragment (complete with root element) to the given DocumentHandler, containing all the topics retrieved from the Iterator. |
void |
exportTopicNames(Iterator it,
DocumentHandler dh)
PUBLIC: Exports a set of topic names without any wrapping element. |
void |
exportTopics(Iterator it,
DocumentHandler dh)
PUBLIC: Exports a set of topics without any wrapping element. |
boolean |
getUseLocalIds()
PUBLIC: Whether or not internal references of the form '#id' will be exported. |
static boolean |
isVirtualReference(String address)
|
protected String |
makeVirtualReference(TopicIF topic)
|
static String |
makeVirtualReference(TopicIF topic,
String topicmap_id)
|
static String |
resolveVirtualReference(String address,
String tmid)
|
void |
setLocatorHandler(XTMFragmentExporter.LocatorHandlerIF locator_handler)
EXPERIMENTAL: Sets the locator handler. |
void |
setUseLocalIds(boolean use_local_ids)
PUBLIC: Controls whether or not internal references of the form '#id' will be used. |
static String |
sourceTopicMapFromVirtualReference(String address)
|
void |
startTopicMap(DocumentHandler dh)
PUBLIC: Outputs the |
protected void |
writeAssociation(AssociationIF assoc,
DocumentHandler dh)
|
protected void |
writeMembers(AssociationIF assoc,
DocumentHandler dh)
|
protected void |
writeOccurrences(Collection occurrences,
DocumentHandler dh)
|
protected void |
writeSubjectIdentity(TopicIF topic,
DocumentHandler dh)
|
protected void |
writeTopic(TopicIF topic,
DocumentHandler dh)
|
protected void |
writeTopicNames(Collection names,
DocumentHandler dh)
|
protected void |
writeTopicNames(TopicIF topic,
DocumentHandler dh)
|
protected void |
writeTopicRef(TopicIF topic,
DocumentHandler dh)
|
protected void |
writeVariants(Collection variants,
DocumentHandler dh)
|
Methods inherited from class net.ontopia.topicmaps.xml.XTMTopicMapExporter |
---|
export, export, getAddIds, getExportSourceLocators, getSubjectIndicatorRef, reportInvalidLocator, setAddIds, setExportSourceLocators, writeInstanceOf, writeInstanceOf, writeMembers, writeParameters, writeRoleSpec, writeScope, writeVariantName |
Methods inherited from class net.ontopia.topicmaps.xml.AbstractTopicMapExporter |
---|
addId, filterCollection, filterOk, getElementId, isValidXMLId, mayCollide, setFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VIRTUAL_URN
protected XTMFragmentExporter.LocatorHandlerIF locator_handler
protected Collection reifiers
protected Set alreadyExported
protected boolean use_local_ids
Constructor Detail |
---|
public XTMFragmentExporter()
public XTMFragmentExporter(String tmid)
Method Detail |
---|
public void setLocatorHandler(XTMFragmentExporter.LocatorHandlerIF locator_handler)
public void setUseLocalIds(boolean use_local_ids)
public boolean getUseLocalIds()
public void exportAll(Iterator it, DocumentHandler dh) throws SAXException
SAXException
public void exportTopics(Iterator it, DocumentHandler dh) throws SAXException
SAXException
public void exportTopicNames(Iterator it, DocumentHandler dh) throws SAXException
SAXException
public void startTopicMap(DocumentHandler dh) throws SAXException
SAXException
public void endTopicMap(DocumentHandler dh) throws SAXException
SAXException
protected void writeTopic(TopicIF topic, DocumentHandler dh) throws SAXException
writeTopic
in class XTMTopicMapExporter
SAXException
protected void writeTopicNames(TopicIF topic, DocumentHandler dh) throws SAXException
SAXException
protected void writeTopicNames(Collection names, DocumentHandler dh) throws SAXException
writeTopicNames
in class XTMTopicMapExporter
SAXException
protected void writeTopicRef(TopicIF topic, DocumentHandler dh) throws SAXException
writeTopicRef
in class XTMTopicMapExporter
SAXException
protected void writeSubjectIdentity(TopicIF topic, DocumentHandler dh) throws SAXException
writeSubjectIdentity
in class XTMTopicMapExporter
SAXException
protected void writeVariants(Collection variants, DocumentHandler dh) throws SAXException
writeVariants
in class XTMTopicMapExporter
SAXException
protected void writeOccurrences(Collection occurrences, DocumentHandler dh) throws SAXException
writeOccurrences
in class XTMTopicMapExporter
SAXException
protected void writeAssociation(AssociationIF assoc, DocumentHandler dh) throws SAXException
writeAssociation
in class XTMTopicMapExporter
SAXException
protected void writeMembers(AssociationIF assoc, DocumentHandler dh) throws SAXException
SAXException
public static boolean isVirtualReference(String address)
public static String resolveVirtualReference(String address, String tmid)
public static String sourceTopicMapFromVirtualReference(String address)
protected String makeVirtualReference(TopicIF topic)
public static String makeVirtualReference(TopicIF topic, String topicmap_id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |