|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.rio.n3.N3Writer
An implementation of the RdfDocumentWriter interface that writes RDF
documents in N3 format. Note: the current implementation simply wraps a
TurtleWriter and writes documents in Turtle format, which is a subset
of N3.
| Constructor Summary | |
N3Writer(OutputStream out)
Creates a new N3Writer that will write to the supplied OutputStream. |
|
N3Writer(Writer out)
Creates a new N3Writer that will write to the supplied Writer. |
|
| Method Summary | |
void |
endDocument()
Ends the document writing. |
void |
setNamespace(String prefix,
String name)
Sets a mapping from a namespace prefix to a namespace name. |
void |
startDocument()
Starts the document writing. |
void |
writeComment(String comment)
Writes a comment to the document. |
void |
writeStatement(Resource subj,
URI pred,
Value obj)
Writes a statement to the document. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public N3Writer(OutputStream out)
out - The OutputStream to write the N3 document to.public N3Writer(Writer out)
out - The Writer to write the N3 document to.| Method Detail |
public void setNamespace(String prefix,
String name)
throws IOException
RdfDocumentWriter
setNamespace in interface RdfDocumentWriterIOException
public void startDocument()
throws IOException
RdfDocumentWriter
startDocument in interface RdfDocumentWriterIOException
public void endDocument()
throws IOException
RdfDocumentWriter
endDocument in interface RdfDocumentWriterIOException
public void writeStatement(Resource subj,
URI pred,
Value obj)
throws IOException
RdfDocumentWriter
writeStatement in interface RdfDocumentWriterIOException
public void writeComment(String comment)
throws IOException
RdfDocumentWriter
writeComment in interface RdfDocumentWriterIOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||