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 voidendTopicMap()PUBLIC: Ends the fragment.voidexportAll(Iterator<TopicIF> it)PUBLIC: Exports all the topics returned by the iterator, and wraps them with startTopicMap() and endTopicMap() calls.voidexportTopic(TopicIF topic)PUBLIC: Exports the given topic.voidexportTopics(Iterator<TopicIF> it)PUBLIC: Exports all the topics returned by the iterator.voidstartTopicMap()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:
exportAllin interfaceTopicMapFragmentWriterIF- Throws:
IOException
-
startTopicMap
public void startTopicMap()
PUBLIC: Starts the fragment.- Specified by:
startTopicMapin interfaceTopicMapFragmentWriterIF
-
exportTopics
public void exportTopics(Iterator<TopicIF> it) throws IOException
PUBLIC: Exports all the topics returned by the iterator.- Specified by:
exportTopicsin interfaceTopicMapFragmentWriterIF- Throws:
IOException
-
exportTopic
public void exportTopic(TopicIF topic) throws IOException
PUBLIC: Exports the given topic.- Specified by:
exportTopicin interfaceTopicMapFragmentWriterIF- Throws:
IOException
-
endTopicMap
public void endTopicMap() throws IOExceptionPUBLIC: Ends the fragment.- Specified by:
endTopicMapin interfaceTopicMapFragmentWriterIF- Throws:
IOException
-
-