Package net.ontopia.topicmaps.utils.rdf
Class RDFFragmentExporter
- java.lang.Object
-
- net.ontopia.topicmaps.utils.rdf.RDFFragmentExporter
-
- All Implemented Interfaces:
TopicMapFragmentWriterIF
public class RDFFragmentExporter extends Object implements TopicMapFragmentWriterIF
PUBLIC: An RDF fragment exporter which produces RDF/XML. It does so by first building an in-memory Jena model of the fragment, then serializing the entire thing in one go to the stream. The exporter is restricted in the sense that all topics must come from the same topic map.- Since:
- 5.1.3
-
-
Constructor Summary
Constructors Constructor Description RDFFragmentExporter(OutputStream out, String encoding)
-
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.void
startTopicMap()
PUBLIC: Starts the fragment.
-
-
-
Constructor Detail
-
RDFFragmentExporter
public RDFFragmentExporter(OutputStream out, String encoding)
-
-
Method Detail
-
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
-
startTopicMap
public void startTopicMap()
PUBLIC: Starts the fragment.- Specified by:
startTopicMap
in interfaceTopicMapFragmentWriterIF
-
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
-
-