de.fuberlin.wiwiss.ng4j.util
Class DirectoryWriter

java.lang.Object
  extended by de.fuberlin.wiwiss.ng4j.util.DirectoryWriter

public class DirectoryWriter
extends Object

Helper class for writing a NamedGraphSet as a directory of files. This works only with graph names that are "file:" URIs in that directory. All other graphs will be ignored. This class is most useful for writing to disk NamedGraphSets that have been read by a DirectoryReader.

TODO: Write tests for DirectoryReader

Author:
Richard Cyganiak (richard@cyganiak.de)

Constructor Summary
DirectoryWriter()
           
 
Method Summary
 void write(NamedGraphSet set, String directory, String lang)
          Writes graphs from a NamedGraphSets as files into a directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryWriter

public DirectoryWriter()
Method Detail

write

public void write(NamedGraphSet set,
                  String directory,
                  String lang)
Writes graphs from a NamedGraphSets as files into a directory. Only graphs named with "file:" URIs matching the directory will be written. Other graphs will be ignored.

Parameters:
set - The NamedGraphSet to be written
directory - A directory
lang - "RDF/XML", "N-TRIPLE", "N3" or "TRIX"