Package net.ontopia.topicmaps.xml
Class XTMTopicMapFragmentWriter
- java.lang.Object
-
- net.ontopia.topicmaps.xml.XTMTopicMapFragmentWriter
-
- All Implemented Interfaces:
TopicMapFragmentWriterIF
public class XTMTopicMapFragmentWriter extends Object implements TopicMapFragmentWriterIF
PUBLIC: A fragment writer for XTM 1.0.- Since:
- 5.1.3
-
-
Constructor Summary
Constructors Constructor Description XTMTopicMapFragmentWriter(OutputStream out, String encoding)
XTMTopicMapFragmentWriter(Writer out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endTopicMap()
PUBLIC: Ends the fragment.void
exportAll(Iterator<TopicIF> it)
PUBLIC: Exports all the topics returned by the iterator, and wraps them with startTopicMap() and endTopicMap() calls.void
exportTopic(TopicIF topic)
PUBLIC: Exports the given topic.void
exportTopics(Iterator<TopicIF> it)
PUBLIC: Exports all the topics returned by the iterator.boolean
getUseLocalIds()
PUBLIC: Whether or not internal references of the form '#id' will be exported.void
setUseLocalIds(boolean use_local_ids)
PUBLIC: Controls whether or not internal references of the form '#id' will be exported.void
startTopicMap()
PUBLIC: Starts the fragment.
-
-
-
Constructor Detail
-
XTMTopicMapFragmentWriter
public XTMTopicMapFragmentWriter(OutputStream out, String encoding) throws IOException
- Throws:
IOException
-
XTMTopicMapFragmentWriter
public XTMTopicMapFragmentWriter(Writer out) throws IOException
- Throws:
IOException
-
-
Method Detail
-
startTopicMap
public void startTopicMap() throws IOException
PUBLIC: Starts the fragment.- Specified by:
startTopicMap
in interfaceTopicMapFragmentWriterIF
- Throws:
IOException
-
exportAll
public void exportAll(Iterator<TopicIF> it) throws IOException
PUBLIC: Exports all the topics returned by the iterator, and wraps them with startTopicMap() and endTopicMap() calls.- Specified by:
exportAll
in interfaceTopicMapFragmentWriterIF
- Throws:
IOException
-
exportTopics
public void exportTopics(Iterator<TopicIF> it) throws IOException
PUBLIC: Exports all the topics returned by the iterator.- Specified by:
exportTopics
in interfaceTopicMapFragmentWriterIF
- Throws:
IOException
-
exportTopic
public void exportTopic(TopicIF topic) throws IOException
PUBLIC: Exports the given topic.- Specified by:
exportTopic
in interfaceTopicMapFragmentWriterIF
- Throws:
IOException
-
endTopicMap
public void endTopicMap() throws IOException
PUBLIC: Ends the fragment.- Specified by:
endTopicMap
in interfaceTopicMapFragmentWriterIF
- Throws:
IOException
-
setUseLocalIds
public void setUseLocalIds(boolean use_local_ids)
PUBLIC: Controls whether or not internal references of the form '#id' will be exported.- Since:
- 5.2.0
-
getUseLocalIds
public boolean getUseLocalIds()
PUBLIC: Whether or not internal references of the form '#id' will be exported.- Since:
- 5.2.0
-
-