de.fuberlin.wiwiss.ng4j.util
Class DirectoryReader

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

public class DirectoryReader
extends Object

Helper class for reading several files from a directory into a NamedGraphSet. The "file:" URIs will be used as graph names.

TODO: Write tests for DirectoryReader

Author:
Richard Cyganiak (richard@cyganiak.de)

Constructor Summary
DirectoryReader()
           
 
Method Summary
 void read(NamedGraphSet set, String directory, String lang)
          Reads files from a directory into a NamedGraphSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryReader

public DirectoryReader()
Method Detail

read

public void read(NamedGraphSet set,
                 String directory,
                 String lang)
Reads files from a directory into a NamedGraphSet. For each file, a new graph will be created in the graph set. Its name is the "file:" URI of the file.

Parameters:
set - The NamedGraphSet to which the contents of the files will be added
directory - A directory
lang - "RDF/XML", "N-TRIPLE", "N3", "TRIX" or null for file extension based auto detection