net.ontopia.topicmaps.utils.rdf
Class RDFFragmentExporter

java.lang.Object
  extended by net.ontopia.topicmaps.utils.rdf.RDFFragmentExporter
All Implemented Interfaces:
TopicMapFragmentWriterIF

public class RDFFragmentExporter
extends java.lang.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
RDFFragmentExporter(java.io.OutputStream out, java.lang.String encoding)
           
 
Method Summary
 void endTopicMap()
          PUBLIC: Ends the fragment.
 void exportAll(java.util.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(java.util.Iterator<TopicIF> it)
          PUBLIC: Exports all the topics returned by the iterator.
 void startTopicMap()
          PUBLIC: Starts the fragment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDFFragmentExporter

public RDFFragmentExporter(java.io.OutputStream out,
                           java.lang.String encoding)
Method Detail

exportAll

public void exportAll(java.util.Iterator<TopicIF> it)
               throws java.io.IOException
PUBLIC: Exports all the topics returned by the iterator, and wraps them with startTopicMap() and endTopicMap() calls.

Specified by:
exportAll in interface TopicMapFragmentWriterIF
Throws:
java.io.IOException

startTopicMap

public void startTopicMap()
PUBLIC: Starts the fragment.

Specified by:
startTopicMap in interface TopicMapFragmentWriterIF

exportTopics

public void exportTopics(java.util.Iterator<TopicIF> it)
                  throws java.io.IOException
PUBLIC: Exports all the topics returned by the iterator.

Specified by:
exportTopics in interface TopicMapFragmentWriterIF
Throws:
java.io.IOException

exportTopic

public void exportTopic(TopicIF topic)
                 throws java.io.IOException
PUBLIC: Exports the given topic.

Specified by:
exportTopic in interface TopicMapFragmentWriterIF
Throws:
java.io.IOException

endTopicMap

public void endTopicMap()
                 throws java.io.IOException
PUBLIC: Ends the fragment.

Specified by:
endTopicMap in interface TopicMapFragmentWriterIF
Throws:
java.io.IOException


Copyright © 2000-2012 Ontopia.