Class JsonLDReadContext


  • public class JsonLDReadContext
    extends Context
    Set of parameters that can be used to control the reading of JSON-LD. This class provides setters to define a "Context" suitable to be passed as last argument to ReaderRIOT.read(InputStream, String, ContentType, StreamRDF, Context) when the ReaderRIOT has been created with one of the JSON-LD RDFFormat variants (that is, when it is an instance of JsonLDReader) Parameters that are actually useful are ''documentLoader'' and ''produceGeneralizedRdf''.
    • Constructor Detail

      • JsonLDReadContext

        public JsonLDReadContext()
    • Method Detail

      • setJsonLDContext

        public void setJsonLDContext​(java.lang.String jsonLdContext)
        Set the value of the JSON-LD "@context" node, used when reading a jsonld (overriding the actual @context in the jsonld). "Compact" and "Flattened" JSON-LD outputs.
        Parameters:
        jsonLdContext - the value of the "@context" node (a JSON value). Note that the use of an URI to pass an external context is not supported (as of JSONLD-java API 0.8.3)
        See Also:
        setJsonLDContext(Object)
      • setJsonLDContext

        public void setJsonLDContext​(java.lang.Object jsonLdContext)
        Set the value of the JSON-LD "@context" node, used when reading a jsonld (overriding the actual @context in the jsonld). "Compact" and "Flattened" JSON-LD outputs.
        Parameters:
        jsonLdContext - the context as expected by JSON-LD java API. As of JSON-LD java 0.8.3, a Map defining the properties and the prefixes is OK. Note that the use an URI to pass an external context is not supported (JSONLD-java RDF 0.8.3)
        See Also:
        setJsonLDContext(String)
      • setOptions

        public void setOptions​(com.github.jsonldjava.core.JsonLdOptions opts)
        Set the JSON-LD java API's options If not set, a default value is used.
        Parameters:
        opts - the options as defined by the JSON-LD java API