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,
java.io.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(java.io.Writer 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, hashCode, 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 java.io.IOException
rdfRepresentation
- The RDF representation to parse.java.io.IOException
public GraphHandler createBuilder(Graph graph)
graph
- The graph to build.public GraphHandler createWriter(MediaType mediaType, java.io.Writer writer) throws java.io.IOException
mediaType
- The given media type of the parsed RDF representation.writer
- The character writer to write to.java.io.IOException
public Graph getGraph() throws java.io.IOException
java.io.IOException
public void parse(GraphHandler graphHandler) throws java.io.IOException
graphHandler
- The graph handler.java.io.IOException
public void setGraph(Graph linkSet)
linkSet
- The graph of links.public void write(GraphHandler graphHandler) throws java.io.IOException
graphHandler
- java.io.IOException
public void write(java.io.Writer writer) throws java.io.IOException
write
in class Representation
java.io.IOException
Copyright © 2005-2024 Restlet.