Package net.ontopia.topicmaps.xml
Class CanonicalTopicMapWriter
java.lang.Object
net.ontopia.topicmaps.xml.CanonicalTopicMapWriter
- All Implemented Interfaces:
TopicMapWriterIF
PUBLIC: A topic map writer that writes topic maps out to Ontopia's
Canonical XTM topic map format. This format is generally used for
testing and not for other purposes.
Note: this is the format defined in an Ontopia technical report, not the upcoming standard format. For new code, please use the standard format.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCanonicalTopicMapWriter(File file) Creates a topic map writer bound to the file given in the arguments.CanonicalTopicMapWriter(OutputStream stream) Creates a topic map writer bound to the output stream given in the arguments. -
Method Summary
Modifier and TypeMethodDescriptionvoidexport(TopicMapIF topicmap, ContentHandler dh) PUBLIC: Exports the topic map to the given ContentHandler.INTERNAL: Gets the base locator used to resolve relative locators.voidsetAdditionalProperties(Map<String, Object> properties) CanonicalTopicMapWriter has no additional properties.voidsetBaseLocator(LocatorIF baseloc) INTERNAL: Sets the base locator used to resolve relative locators.voidwrite(TopicMapIF topicmap) PUBLIC: Writes the given topic map to an implicit implementation dependent destination.
-
Field Details
-
out
-
baseloc
-
-
Constructor Details
-
CanonicalTopicMapWriter
Creates a topic map writer bound to the file given in the arguments.- Parameters:
file- The file object to which the topic map is to be written.- Throws:
IOException
-
CanonicalTopicMapWriter
Creates a topic map writer bound to the output stream given in the arguments.- Parameters:
stream- The output stream to which the topic map is to be written.
-
-
Method Details
-
write
Description copied from interface:TopicMapWriterIFPUBLIC: Writes the given topic map to an implicit implementation dependent destination. The write method will close any resources opened internally. This means that the write method can only be called once if the stream/writer was opened internally.- Specified by:
writein interfaceTopicMapWriterIF- Parameters:
topicmap- The topic map to be exported/written; an object implementing TopicMapIF- Throws:
IOException- Thrown if writing the topic map fails.
-
getBaseLocator
INTERNAL: Gets the base locator used to resolve relative locators. -
setBaseLocator
INTERNAL: Sets the base locator used to resolve relative locators. -
export
PUBLIC: Exports the topic map to the given ContentHandler.- Throws:
IOExceptionSAXException
-
setAdditionalProperties
CanonicalTopicMapWriter has no additional properties.- Specified by:
setAdditionalPropertiesin interfaceTopicMapWriterIF- Parameters:
properties-
-