Class RdfNTriplesWriter
- java.lang.Object
-
- org.restlet.ext.rdf.GraphHandler
-
- org.restlet.ext.rdf.internal.ntriples.RdfNTriplesWriter
-
public class RdfNTriplesWriter extends GraphHandler
Handler of RDF content according to the N-Triples notation.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.WriterwriterThe character writer.
-
Constructor Summary
Constructors Constructor Description RdfNTriplesWriter(java.io.Writer writer)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendGraph()Callback method used after the graph is parsed or written.voidlink(Reference source, Reference typeRef, Reference target)Callback method used when a link is parsed or written.voidlink(Reference source, Reference typeRef, Literal target)Callback method used when a link is parsed or written.voidlink(Graph source, Reference typeRef, Reference target)Callback method used when a link is parsed or written.voidlink(Graph source, Reference typeRef, Literal target)Callback method used when a link is parsed or written.private voidwrite(Reference reference)Writes the representation of a given reference.private voidwrite(Literal literal)Writes the representation of a literal.-
Methods inherited from class org.restlet.ext.rdf.GraphHandler
endPrefixMapping, startGraph, startPrefixMapping
-
-
-
-
Method Detail
-
endGraph
public void endGraph() throws java.io.IOExceptionDescription copied from class:GraphHandlerCallback method used after the graph is parsed or written. Does nothing by default.- Overrides:
endGraphin classGraphHandler- Throws:
java.io.IOException
-
link
public void link(Graph source, Reference typeRef, Literal target)
Description copied from class:GraphHandlerCallback method used when a link is parsed or written.- Specified by:
linkin classGraphHandler- Parameters:
source- The source or subject of the link.typeRef- The type reference of the link.target- The target or object of the link.
-
link
public void link(Graph source, Reference typeRef, Reference target)
Description copied from class:GraphHandlerCallback method used when a link is parsed or written.- Specified by:
linkin classGraphHandler- Parameters:
source- The source or subject of the link.typeRef- The type reference of the link.target- The target or object of the link.
-
link
public void link(Reference source, Reference typeRef, Literal target)
Description copied from class:GraphHandlerCallback method used when a link is parsed or written.- Specified by:
linkin classGraphHandler- Parameters:
source- The source or subject of the link.typeRef- The type reference of the link.target- The target or object of the link.
-
link
public void link(Reference source, Reference typeRef, Reference target)
Description copied from class:GraphHandlerCallback method used when a link is parsed or written.- Specified by:
linkin classGraphHandler- Parameters:
source- The source or subject of the link.typeRef- The type reference of the link.target- The target or object of the link.
-
write
private void write(Literal literal) throws java.io.IOException
Writes the representation of a literal.- Parameters:
literal- The literal to write.- Throws:
java.io.IOException
-
write
private void write(Reference reference) throws java.io.IOException
Writes the representation of a given reference.- Parameters:
reference- The reference to write.- Throws:
java.io.IOException
-
-