|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mulgara.mrg.writer.AbstractGraphWriter
org.mulgara.mrg.writer.N3Writer
public class N3Writer
Creates a writer specifically for N3 output.
| Field Summary |
|---|
| Fields inherited from class org.mulgara.mrg.writer.AbstractGraphWriter |
|---|
base, graph, prefixGen, rns |
| Constructor Summary | |
|---|---|
N3Writer(Graph graph,
URI base)
Creates a graph writer. |
|
N3Writer(Graph graph,
URI base,
Map<String,URI> ns)
Creates a graph writer. |
|
| Method Summary | |
|---|---|
protected String |
format(Node n)
Formats a node for printing. |
protected String |
formatLiteral(Literal l)
Formats a literal for printing. |
protected String |
formatUri(PredicateNode p)
Overloads formatUri(Uri) to avoid the need to cast. |
protected String |
formatUri(Uri u)
Format a URI reference. |
protected void |
writeProperties(PrintStream o,
List<PropertyValue> pvs)
Prints all property values together, using ; and , separators. |
void |
writeTo(OutputStream out)
Writes the graph to a stream. |
| Methods inherited from class org.mulgara.mrg.writer.AbstractGraphWriter |
|---|
getNamespaces, resetNamespaces, scanNamespaces, setNamespaces, setNamespacesByString, testNamespace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mulgara.mrg.writer.GraphWriter |
|---|
getNamespaces, resetNamespaces, scanNamespaces, setNamespaces, setNamespacesByString |
| Constructor Detail |
|---|
public N3Writer(Graph graph,
URI base)
graph - The graph to be written by this writer.
public N3Writer(Graph graph,
URI base,
Map<String,URI> ns)
graph - The graph to be written by this writer.ns - The namespaces to use while emitting this graph.| Method Detail |
|---|
public void writeTo(OutputStream out)
GraphWriter
writeTo in interface GraphWriterout - The stream to write the graph to.GraphWriter.writeTo(java.io.OutputStream)
protected void writeProperties(PrintStream o,
List<PropertyValue> pvs)
o - The output to print to.pvs - The property/values to be written.protected String formatUri(Uri u)
u - The URI reference to present.
protected String formatUri(PredicateNode p)
formatUri(Uri) to avoid the need to cast.
p - The predicate node to print.
protected String format(Node n)
n - The node to format.
protected String formatLiteral(Literal l)
l - The literal to be formatted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||