Package org.trellisldp.api
Interface IOService
-
- All Known Implementing Classes:
JenaIOService
public interface IOServiceThe IOService defines methods for reading, writing and updating RDF streams to/from a concrete RDF 1.1 syntax.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stream<Triple>read(InputStream input, RDFSyntax syntax, String context)Read an input stream into a stream of triples.List<RDFSyntax>supportedReadSyntaxes()Retrieve the set of valid syntaxes for read operations.List<RDFSyntax>supportedUpdateSyntaxes()Retrieve the set of valid syntaxes for update operations.List<RDFSyntax>supportedWriteSyntaxes()Retrieve the set of valid syntaxes for write operations.voidupdate(Graph graph, String update, RDFSyntax syntax, String context)Apply a Sparql-Update operation over a Graph.voidwrite(Stream<Triple> triples, OutputStream output, RDFSyntax syntax, String context, IRI... profiles)Serialize the triple stream in a concrete RDF syntax.
-
-
-
Method Detail
-
write
void write(Stream<Triple> triples, OutputStream output, RDFSyntax syntax, String context, IRI... profiles)
Serialize the triple stream in a concrete RDF syntax.- Parameters:
triples- the stream of triplesoutput- the output streamsyntax- the output formatcontext- the context to resolve relative IRIsprofiles- additional profile information used for output
-
read
Stream<Triple> read(InputStream input, RDFSyntax syntax, String context)
Read an input stream into a stream of triples.- Parameters:
input- the input streamsyntax- the RDF syntaxcontext- the RDF context- Returns:
- a stream of triples
-
update
void update(Graph graph, String update, RDFSyntax syntax, String context)
Apply a Sparql-Update operation over a Graph.- Parameters:
graph- the input graphupdate- the sparql-update requestsyntax- the RDF syntaxcontext- the context to resolve relative IRIs
-
supportedReadSyntaxes
List<RDFSyntax> supportedReadSyntaxes()
Retrieve the set of valid syntaxes for read operations.- Returns:
- the syntaxes for reading resources.
-
supportedWriteSyntaxes
List<RDFSyntax> supportedWriteSyntaxes()
Retrieve the set of valid syntaxes for write operations.- Returns:
- the syntaxes for writing resources.
-
-