Package org.trellisldp.jena
Class JenaIOService
- java.lang.Object
-
- org.trellisldp.jena.JenaIOService
-
- All Implemented Interfaces:
IOService
@ApplicationScoped public class JenaIOService extends Object implements IOService
An IOService implemented using Jena.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIG_IO_JSONLD_DOMAINS
The configuration key listing valid JSON-LD profile domains.static String
CONFIG_IO_JSONLD_PROFILES
The configuration key listing valid JSON-LD profile documents.static String
CONFIG_IO_RELATIVE_IRIS
The configuration key controling whether to use relative IRIs for Turtle serializations.
-
Constructor Summary
Constructors Constructor Description JenaIOService()
Create a serialization service.JenaIOService(NamespaceService namespaceService)
Create a serialization service.JenaIOService(NamespaceService namespaceService, RDFaWriterService htmlSerializer)
Create a serialization service.JenaIOService(NamespaceService namespaceService, RDFaWriterService htmlSerializer, CacheService<String,String> cache)
Create a serialization service.JenaIOService(NamespaceService namespaceService, RDFaWriterService htmlSerializer, CacheService<String,String> cache, String allowedContexts, String allowedContextDomains, boolean relativeIRIs)
Create a serialization service.JenaIOService(NamespaceService namespaceService, RDFaWriterService htmlSerializer, CacheService<String,String> cache, Set<String> allowedContexts, Set<String> allowedContextDomains, boolean relativeIRIs)
Create a serialization service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<Triple>
read(InputStream input, RDFSyntax syntax, String base)
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.void
update(Graph graph, String update, RDFSyntax syntax, String base)
Apply a Sparql-Update operation over a Graph.void
write(Stream<Triple> triples, OutputStream output, RDFSyntax syntax, String baseUrl, IRI... profiles)
Serialize the triple stream in a concrete RDF syntax.
-
-
-
Field Detail
-
CONFIG_IO_JSONLD_PROFILES
public static final String CONFIG_IO_JSONLD_PROFILES
The configuration key listing valid JSON-LD profile documents.- See Also:
- Constant Field Values
-
CONFIG_IO_JSONLD_DOMAINS
public static final String CONFIG_IO_JSONLD_DOMAINS
The configuration key listing valid JSON-LD profile domains.- See Also:
- Constant Field Values
-
CONFIG_IO_RELATIVE_IRIS
public static final String CONFIG_IO_RELATIVE_IRIS
The configuration key controling whether to use relative IRIs for Turtle serializations.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JenaIOService
public JenaIOService()
Create a serialization service.
-
JenaIOService
public JenaIOService(NamespaceService namespaceService)
Create a serialization service.- Parameters:
namespaceService
- the namespace service
-
JenaIOService
public JenaIOService(NamespaceService namespaceService, RDFaWriterService htmlSerializer)
Create a serialization service.- Parameters:
namespaceService
- the namespace servicehtmlSerializer
- the HTML serializer service
-
JenaIOService
@Inject public JenaIOService(NamespaceService namespaceService, RDFaWriterService htmlSerializer, @TrellisProfileCache CacheService<String,String> cache)
Create a serialization service.- Parameters:
namespaceService
- the namespace servicehtmlSerializer
- the HTML serializer servicecache
- a cache for custom JSON-LD profile resolution
-
JenaIOService
public JenaIOService(NamespaceService namespaceService, RDFaWriterService htmlSerializer, CacheService<String,String> cache, String allowedContexts, String allowedContextDomains, boolean relativeIRIs)
Create a serialization service.- Parameters:
namespaceService
- the namespace servicehtmlSerializer
- the HTML serializer servicecache
- a cache for custom JSON-LD profile resolutionallowedContexts
- allowed JSON-LD profilesallowedContextDomains
- allowed domains for JSON-LD profilesrelativeIRIs
- whether to use relative IRIs for Turtle output
-
JenaIOService
public JenaIOService(NamespaceService namespaceService, RDFaWriterService htmlSerializer, CacheService<String,String> cache, Set<String> allowedContexts, Set<String> allowedContextDomains, boolean relativeIRIs)
Create a serialization service.- Parameters:
namespaceService
- the namespace servicehtmlSerializer
- the HTML serializer servicecache
- a cache for custom JSON-LD profile resolutionallowedContexts
- allowed JSON-LD profilesallowedContextDomains
- allowed domains for JSON-LD profilesrelativeIRIs
- whether to use relative IRIs for Turtle output
-
-
Method Detail
-
supportedReadSyntaxes
public List<RDFSyntax> supportedReadSyntaxes()
Description copied from interface:IOService
Retrieve the set of valid syntaxes for read operations.- Specified by:
supportedReadSyntaxes
in interfaceIOService
- Returns:
- the syntaxes for reading resources.
-
supportedWriteSyntaxes
public List<RDFSyntax> supportedWriteSyntaxes()
Description copied from interface:IOService
Retrieve the set of valid syntaxes for write operations.- Specified by:
supportedWriteSyntaxes
in interfaceIOService
- Returns:
- the syntaxes for writing resources.
-
supportedUpdateSyntaxes
public List<RDFSyntax> supportedUpdateSyntaxes()
Description copied from interface:IOService
Retrieve the set of valid syntaxes for update operations.- Specified by:
supportedUpdateSyntaxes
in interfaceIOService
- Returns:
- the syntaxes for updating resources.
-
write
public void write(Stream<Triple> triples, OutputStream output, RDFSyntax syntax, String baseUrl, IRI... profiles)
Description copied from interface:IOService
Serialize the triple stream in a concrete RDF syntax.
-
read
public Stream<Triple> read(InputStream input, RDFSyntax syntax, String base)
Description copied from interface:IOService
Read an input stream into a stream of triples.
-
-