|
||||||||||
| 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.XMLWriter
public class XMLWriter
Creates a writer specifically for N3 output.
| Field Summary |
|---|
| Fields inherited from class org.mulgara.mrg.writer.AbstractGraphWriter |
|---|
base, graph, prefixGen, rns |
| Constructor Summary | |
|---|---|
XMLWriter(Graph graph,
URI base)
Creates a graph writer. |
|
XMLWriter(Graph graph,
URI base,
Map<String,URI> ns)
Creates a graph writer. |
|
| Method Summary | |
|---|---|
protected void |
emitPropVal(PrintStream o,
int i,
Uri property,
ObjectNode value)
Prints a single property/value pair where the value is a Uri or a Bnode. |
protected void |
emitPropVal(PrintStream o,
Uri property,
Literal value)
Prints a single property/value pair where the value is a literal. |
protected String |
formatForAbout(Uri u)
Format a URI reference for use in an about=. |
protected String |
formatForTag(Uri u)
Format a URI reference for use in an XML tag. |
void |
scanNamespaces()
Scans the graph for valid namespaces. |
protected boolean |
testNamespace(String ns)
Tests a potential namespace to see if it is considered to be OK. |
void |
writeTo(OutputStream out)
Writes the graph to a stream. |
| Methods inherited from class org.mulgara.mrg.writer.AbstractGraphWriter |
|---|
getNamespaces, resetNamespaces, setNamespaces, setNamespacesByString |
| 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, setNamespaces, setNamespacesByString |
| Constructor Detail |
|---|
public XMLWriter(Graph graph,
URI base)
graph - The graph to be written by this writer.
public XMLWriter(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 scanNamespaces()
scanNamespaces in interface GraphWriterscanNamespaces in class AbstractGraphWriterAbstractGraphWriter.scanNamespaces()public void writeTo(OutputStream out)
GraphWriter
writeTo in interface GraphWriterout - The stream to write the graph to.GraphWriter.writeTo(java.io.OutputStream)
protected void emitPropVal(PrintStream o,
int i,
Uri property,
ObjectNode value)
o - The print stream to use as output.i - The indent amount.property - The property.value - The literal value for the property.
protected void emitPropVal(PrintStream o,
Uri property,
Literal value)
o - The print stream to use as output.property - The property.value - The literal value for the property.protected String formatForAbout(Uri u)
u - The URI reference to present.
protected String formatForTag(Uri u)
u - The URI reference to present.
protected boolean testNamespace(String ns)
testNamespace in class AbstractGraphWriterns - The namespace to test.
true iff the namespace can be used in this type of document.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||