Class JenaIOService

    • 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 service
        htmlSerializer - the HTML serializer service
      • 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 service
        htmlSerializer - the HTML serializer service
        cache - a cache for custom JSON-LD profile resolution
        allowedContexts - allowed JSON-LD profiles
        allowedContextDomains - allowed domains for JSON-LD profiles
        relativeIRIs - 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 service
        htmlSerializer - the HTML serializer service
        cache - a cache for custom JSON-LD profile resolution
        allowedContexts - allowed JSON-LD profiles
        allowedContextDomains - allowed domains for JSON-LD profiles
        relativeIRIs - 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 interface IOService
        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 interface IOService
        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 interface IOService
        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.
        Specified by:
        write in interface IOService
        Parameters:
        triples - the stream of triples
        output - the output stream
        syntax - the output format
        baseUrl - the context to resolve relative IRIs
        profiles - additional profile information used for output
      • 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.
        Specified by:
        read in interface IOService
        Parameters:
        input - the input stream
        syntax - the RDF syntax
        base - the RDF context
        Returns:
        a stream of triples
      • update

        public void update​(Graph graph,
                           String update,
                           RDFSyntax syntax,
                           String base)
        Description copied from interface: IOService
        Apply a Sparql-Update operation over a Graph.
        Specified by:
        update in interface IOService
        Parameters:
        graph - the input graph
        update - the sparql-update request
        syntax - the RDF syntax
        base - the context to resolve relative IRIs