Package net.ontopia.topicmaps.xml
Class CanonicalXTMWriter
- java.lang.Object
-
- net.ontopia.topicmaps.xml.CanonicalXTMWriter
-
- All Implemented Interfaces:
TopicMapWriterIF
public class CanonicalXTMWriter extends Object implements TopicMapWriterIF
PUBLIC: A topic map writer that writes topic maps out to the format defined in ISO 13250-4: Topic Maps -- Canonicalization. The format is also known as Canonical XTM, but should not be confused with that defined by Ontopia. The current implementation conforms to the final standard (ISO 13250-4:2009).- Since:
- 2.0.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CanonicalXTMWriter.IndexComparator
-
Constructor Summary
Constructors Constructor Description CanonicalXTMWriter(File file)
CanonicalXTMWriter(OutputStream out)
CanonicalXTMWriter(Writer out)
PUBLIC: Creates a canonicalizer that writes to the given Writer in whatever encoding that Writer uses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setAdditionalProperties(Map<String,Object> properties)
CanonicalXTMWriter has no additional properties.void
write(TopicMapIF topicmap)
PUBLIC: Writes the given topic map to an implicit implementation dependent destination.
-
-
-
Constructor Detail
-
CanonicalXTMWriter
public CanonicalXTMWriter(File file) throws IOException
- Throws:
IOException
-
CanonicalXTMWriter
public CanonicalXTMWriter(OutputStream out)
-
CanonicalXTMWriter
public CanonicalXTMWriter(Writer out)
PUBLIC: Creates a canonicalizer that writes to the given Writer in whatever encoding that Writer uses. Warning: Canonical XTM requires the output encoding to be UTF-8, so for correct results the given Writer must produce UTF-8. Using this method is not recommended.
-
-
Method Detail
-
write
public void write(TopicMapIF topicmap)
Description copied from interface:TopicMapWriterIF
PUBLIC: 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:
write
in interfaceTopicMapWriterIF
- Parameters:
topicmap
- The topic map to be exported/written; an object implementing TopicMapIF
-
setAdditionalProperties
public void setAdditionalProperties(Map<String,Object> properties)
CanonicalXTMWriter has no additional properties.- Specified by:
setAdditionalProperties
in interfaceTopicMapWriterIF
- Parameters:
properties
-
-
-