de.fuberlin.wiwiss.ng4j.util
Class DirectoryWriter
java.lang.Object
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)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryWriter
public DirectoryWriter()
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 writtendirectory
- A directorylang
- "RDF/XML", "N-TRIPLE", "N3" or "TRIX"