Package com.inrupt.client.rdf4j
Class RDF4JService
java.lang.Object
com.inrupt.client.rdf4j.RDF4JService
- All Implemented Interfaces:
RdfService
An
RdfService
that uses the RDF4J library.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fromDataset
(Dataset dataset, RDFSyntax syntax, OutputStream output) Serialize a dataset to an output stream.void
fromGraph
(Graph graph, RDFSyntax syntax, OutputStream output) Serialize a graph to an output stream.toDataset
(RDFSyntax syntax, InputStream input, String baseUri) Parse an input stream into a Dataset.toGraph
(RDFSyntax syntax, InputStream input, String baseUri) Parse an input stream into a Graph.
-
Constructor Details
-
RDF4JService
public RDF4JService()
-
-
Method Details
-
fromDataset
Description copied from interface:RdfService
Serialize a dataset to an output stream.- Specified by:
fromDataset
in interfaceRdfService
- Parameters:
dataset
- the datasetsyntax
- the concrete RDF syntaxoutput
- the output stream- Throws:
IOException
- when there is an error serializing the dataset
-
fromGraph
Description copied from interface:RdfService
Serialize a graph to an output stream.- Specified by:
fromGraph
in interfaceRdfService
- Parameters:
graph
- the graphsyntax
- the concrete RDF syntaxoutput
- the output stream- Throws:
IOException
- when there is an error serializing the graph
-
toDataset
Description copied from interface:RdfService
Parse an input stream into a Dataset.- Specified by:
toDataset
in interfaceRdfService
- Parameters:
syntax
- the concrete RDF syntaxinput
- the input streambaseUri
- the base URI to use in case of relative URIs, may benull
- Returns:
- a dataset
- Throws:
IOException
- when there is an error parsing the dataset
-
toGraph
Description copied from interface:RdfService
Parse an input stream into a Graph.- Specified by:
toGraph
in interfaceRdfService
- Parameters:
syntax
- the concrete RDF syntaxinput
- the input streambaseUri
- the base URI to use in case of relative URIs, may benull
- Returns:
- a graph
- Throws:
IOException
- when there is an error parsing the graph
-