public class RdfRepresentation extends WriterRepresentation
Graph
.UNKNOWN_SIZE
Constructor and Description |
---|
RdfRepresentation()
Constructor.
|
RdfRepresentation(Graph linkSet,
MediaType mediaType)
Constructor with argument.
|
RdfRepresentation(MediaType mediaType)
Constructor with argument.
|
RdfRepresentation(Representation rdfRepresentation)
Constructor that parsed a given RDF representation into a link set.
|
Modifier and Type | Method and Description |
---|---|
GraphHandler |
createBuilder(Graph graph)
Returns an instance of a graph handler used when parsing the inner RDF
representation.
|
GraphHandler |
createWriter(MediaType mediaType,
Writer writer)
Returns an instance of a graph handler used when writing the inner set of
links.
|
Graph |
getGraph()
Returns the graph of links.
|
void |
parse(GraphHandler graphHandler)
Parses the inner RDF representation.
|
void |
setGraph(Graph linkSet)
Sets the graph of links.
|
void |
write(GraphHandler graphHandler)
Writes the
|
void |
write(Writer writer)
Writes the representation to a characters writer.
|
getReader
getChannel, getStream, write, write
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient
getModificationDate, getTag, setModificationDate, setTag
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
public RdfRepresentation()
public RdfRepresentation(Graph linkSet, MediaType mediaType)
linkSet
- The graph of links.mediaType
- The representation's mediaType.public RdfRepresentation(MediaType mediaType)
mediaType
- The representation's mediaType.public RdfRepresentation(Representation rdfRepresentation) throws IOException
rdfRepresentation
- The RDF representation to parse.IOException
public GraphHandler createBuilder(Graph graph)
graph
- The graph to build.public GraphHandler createWriter(MediaType mediaType, Writer writer) throws IOException
mediaType
- The given media type of the parsed RDF representation.writer
- The character writer to write to.IOException
public Graph getGraph() throws IOException
IOException
public void parse(GraphHandler graphHandler) throws IOException
graphHandler
- The graph handler.IOException
public void setGraph(Graph linkSet)
linkSet
- The graph of links.public void write(GraphHandler graphHandler) throws IOException
graphHandler
- IOException
public void write(Writer writer) throws IOException
Representation
Writer
after writing to it as this will be handled
by the Restlet connectors automatically.write
in class Representation
writer
- The characters writer.IOException
Copyright © 2005–2016. All rights reserved.