Class 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
    • Constructor Detail

      • 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 interface TopicMapWriterIF
        Parameters:
        topicmap - The topic map to be exported/written; an object implementing TopicMapIF