Package net.ontopia.topicmaps.xml
Class XTMFragmentExporter
java.lang.Object
net.ontopia.topicmaps.xml.AbstractTopicMapExporter
net.ontopia.topicmaps.xml.XTMTopicMapExporter
net.ontopia.topicmaps.xml.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.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceEXPERIMENTAL: Handler class used for processing locators. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Setprotected static final Stringprotected static final Stringprotected XTMFragmentExporter.LocatorHandlerIFprotected Collectionprotected booleanstatic final StringFields inherited from class net.ontopia.topicmaps.xml.XTMTopicMapExporter
atts, EMPTY_ATTR_LIST, export_srclocsFields inherited from class net.ontopia.topicmaps.xml.AbstractTopicMapExporter
add_ids, filter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPUBLIC: Outputs the end tag.voidexportAll(Iterator it, ContentHandler dh) PUBLIC: Exports an XTM Fragment (complete with root element) to the given ContentHandler, containing all the topics retrieved from the Iterator.voidexportTopicNames(Iterator it, ContentHandler dh) PUBLIC: Exports a set of topic names without any wrapping element.voidexportTopics(Iterator it, ContentHandler dh) PUBLIC: Exports a set of topics without any wrapping element.booleanPUBLIC: Whether or not internal references of the form '#id' will be exported.static booleanisVirtualReference(String address) protected StringmakeVirtualReference(TopicIF topic) static StringmakeVirtualReference(TopicIF topic, String topicmap_id) static StringresolveVirtualReference(String address, String tmid) voidsetLocatorHandler(XTMFragmentExporter.LocatorHandlerIF locator_handler) EXPERIMENTAL: Sets the locator handler.voidsetUseLocalIds(boolean use_local_ids) PUBLIC: Controls whether or not internal references of the form '#id' will be used.static StringsourceTopicMapFromVirtualReference(String address) voidPUBLIC: Outputs the <topicMap ...> start tag.protected voidwriteAssociation(AssociationIF assoc, ContentHandler dh) protected voidwriteMembers(AssociationIF assoc, ContentHandler dh) protected voidwriteOccurrences(Collection occurrences, ContentHandler dh) protected voidwriteSubjectIdentity(TopicIF topic, ContentHandler dh) protected voidwriteTopic(TopicIF topic, ContentHandler dh) protected voidwriteTopicNames(Collection names, ContentHandler dh) protected voidwriteTopicNames(TopicIF topic, ContentHandler dh) protected voidwriteTopicRef(TopicIF topic, ContentHandler dh) protected voidwriteVariants(Collection variants, ContentHandler dh) Methods inherited from class net.ontopia.topicmaps.xml.XTMTopicMapExporter
export, export, getAddIds, getExportSourceLocators, getSubjectIndicatorRef, reportInvalidLocator, setAddIds, setExportSourceLocators, writeInstanceOf, writeInstanceOf, writeMembers, writeParameters, writeRoleSpec, writeScope, writeVariantNameMethods inherited from class net.ontopia.topicmaps.xml.AbstractTopicMapExporter
addId, filterCollection, filterOk, getElementId, isValidXMLId, mayCollide, setFilter
-
Field Details
-
VIRTUAL_URN
- See Also:
-
EMPTY_NAMESPACE
- See Also:
-
EMPTY_LOCALNAME
- See Also:
-
locator_handler
-
reifiers
-
alreadyExported
-
use_local_ids
protected boolean use_local_ids
-
-
Constructor Details
-
XTMFragmentExporter
public XTMFragmentExporter()PUBLIC: Initializes the exporter. -
XTMFragmentExporter
-
-
Method Details
-
setLocatorHandler
EXPERIMENTAL: Sets the locator handler. Currently only used for occurrences. -
setUseLocalIds
public void setUseLocalIds(boolean use_local_ids) PUBLIC: Controls whether or not internal references of the form '#id' will be used. TMRAP cannot use this, whereas when self-contained XTM fragment files are produced this should be used. -
getUseLocalIds
public boolean getUseLocalIds()PUBLIC: Whether or not internal references of the form '#id' will be exported. -
exportAll
PUBLIC: Exports an XTM Fragment (complete with root element) to the given ContentHandler, containing all the topics retrieved from the Iterator. Duplicates do not cause problems.- Throws:
SAXException
-
exportTopics
PUBLIC: Exports a set of topics without any wrapping element.- Throws:
SAXException
-
exportTopicNames
PUBLIC: Exports a set of topic names without any wrapping element.- Throws:
SAXException
-
startTopicMap
PUBLIC: Outputs the <topicMap ...> start tag.- Throws:
SAXException
-
endTopicMap
PUBLIC: Outputs the end tag.- Throws:
SAXException
-
writeTopic
- Overrides:
writeTopicin classXTMTopicMapExporter- Throws:
SAXException
-
writeTopicNames
- Throws:
SAXException
-
writeTopicNames
- Overrides:
writeTopicNamesin classXTMTopicMapExporter- Throws:
SAXException
-
writeTopicRef
- Overrides:
writeTopicRefin classXTMTopicMapExporter- Throws:
SAXException
-
writeSubjectIdentity
- Overrides:
writeSubjectIdentityin classXTMTopicMapExporter- Throws:
SAXException
-
writeVariants
- Overrides:
writeVariantsin classXTMTopicMapExporter- Throws:
SAXException
-
writeOccurrences
- Overrides:
writeOccurrencesin classXTMTopicMapExporter- Throws:
SAXException
-
writeAssociation
- Overrides:
writeAssociationin classXTMTopicMapExporter- Throws:
SAXException
-
writeMembers
- Throws:
SAXException
-
isVirtualReference
-
resolveVirtualReference
-
sourceTopicMapFromVirtualReference
-
makeVirtualReference
-
makeVirtualReference
-