|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fuberlin.wiwiss.ng4j.trig.TriGWriter
public class TriGWriter
Serializes a NamedGraphSet
as a TriG file (see
TriG
specification).
This class is typically not used directly, but through the NamedGraphSet.write methods.
When used directly, custom namespace prefixes can be defined:
TriGWriter writer = new TriGWriter(); writer.addNamespace("ex", "http://example.org/"); writer.write(myNamedGraphSet, System.out, "http://example.org/baseURI");
Constructor Summary | |
---|---|
TriGWriter()
|
Method Summary | |
---|---|
void |
addNamespace(String prefix,
String namespaceURI)
Adds a custom namespace prefix. |
void |
write(NamedGraphSet set,
OutputStream out,
String baseURI)
Writes a NamedGraphSet to an OutputStream. |
void |
write(NamedGraphSet set,
Writer out,
String baseURI)
Writes a NamedGraphSet to a Writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TriGWriter()
Method Detail |
---|
public void write(NamedGraphSet set, Writer out, String baseURI)
write
in interface NamedGraphSetWriter
set
- The NamedGraphSet to be serializedout
- The destinationbaseURI
- A base URI, or null if none is known or neededpublic void write(NamedGraphSet set, OutputStream out, String baseURI)
write
in interface NamedGraphSetWriter
set
- The NamedGraphSet to be serializedout
- The destinationbaseURI
- A base URI, or null if none is known or neededpublic void addNamespace(String prefix, String namespaceURI)
prefix
- The namespace prefixnamespaceURI
- The full namespace URI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |