Class JsonLd


  • public final class JsonLd
    extends Object
    The JsonLd interface is the high-level programming structure that developers use to access the JSON-LD transformation methods. This class provides methods to process JSON-LD. All the methods in this class are thread-safe.
    • Method Detail

      • expand

        public static final ExpansionApi expand​(String documentLocation)
        Expands the referenced document.
        Parameters:
        documentLocation - IRI referencing JSON-LD document to expand
        Returns:
        ExpansionApi allowing to set additional parameters
      • expand

        public static final ExpansionApi expand​(URI documentUri)
        Expands the referenced document.
        Parameters:
        documentUri - URI referencing JSON-LD document to expand
        Returns:
        ExpansionApi allowing to set additional parameters
      • expand

        public static final ExpansionApi expand​(Document document)
        Expands the provided remote document.
        Parameters:
        document - to expand
        Returns:
        ExpansionApi allowing to set additional parameters
      • compact

        public static final CompactionApi compact​(String documentLocation,
                                                  String contextLocation)
        Compacts the referenced document using the context.
        Parameters:
        documentLocation - IRI referencing JSON-LD document to compact
        contextLocation - IRI referencing the context to use when compacting the document
        Returns:
        CompactionApi allowing to set additional parameters
      • compact

        public static final CompactionApi compact​(URI documentUri,
                                                  URI contextUri)
        Compacts the referenced document using the context.
        Parameters:
        documentUri - URI referencing JSON-LD document to compact
        contextUri - URI referencing the context to use when compacting the document
        Returns:
        CompactionApi allowing to set additional parameters
      • compact

        public static final CompactionApi compact​(String documentLocation,
                                                  Document context)
        Compacts the referenced document using the context.
        Parameters:
        documentLocation - IRI referencing JSON-LD document to compact
        context - Document representing the context or JsonArray consisting of JsonObject and JsonString referencing the context to use when compacting the document
        Returns:
        CompactionApi allowing to set additional parameters
      • compact

        public static final CompactionApi compact​(URI documentUri,
                                                  Document context)
        Compacts the referenced document using the context.
        Parameters:
        documentUri - URI referencing JSON-LD document to compact
        context - Document representing the context or JsonArray consisting of one or many JsonObject and JsonString referencing the context to use when compacting the document
        Returns:
        CompactionApi allowing to set additional parameters
      • compact

        public static final CompactionApi compact​(Document document,
                                                  Document context)
        Compacts Document document using the context.
        Parameters:
        document - to compact
        context - JSON-LD document
        Returns:
        CompactionApi allowing to set additional parameters
      • compact

        public static final CompactionApi compact​(Document document,
                                                  String contextLocation)
        Compacts Document document using the context.
        Parameters:
        document - to compact
        contextLocation - IRI referencing the context to use when compacting the document
        Returns:
        CompactionApi allowing to set additional parameters
      • compact

        public static final CompactionApi compact​(Document document,
                                                  URI contextUri)
        Compacts Document document using the context.
        Parameters:
        document - to compact
        contextUri - URI referencing the context to use when compacting the document
        Returns:
        CompactionApi allowing to set additional parameters
      • compact

        public static final CompactionApi compact​(String documentLocation,
                                                  URI contextUri)
        Compacts Document document using the context.
        Parameters:
        documentLocation - IRI referencing JSON-LD document to compact
        contextUri - URI referencing the context to use when compacting the document
        Returns:
        CompactionApi allowing to set additional parameters
      • compact

        public static final CompactionApi compact​(URI documentUri,
                                                  String contextLocation)
        Compacts Document document using the context.
        Parameters:
        documentUri - URI referencing JSON-LD document to compact
        contextLocation - IRI referencing the context to use when compacting the document
        Returns:
        CompactionApi allowing to set additional parameters
      • flatten

        public static final FlatteningApi flatten​(String documentLocation)
        Flattens the given input and optionally compacts it using context.
        Parameters:
        documentLocation - IRI referencing JSON-LD document to flatten
        Returns:
        FlatteningApi allowing to set additional parameters
      • flatten

        public static final FlatteningApi flatten​(URI documentUri)
        Flattens the given input and optionally compacts it using context.
        Parameters:
        documentUri - URI referencing JSON-LD document to flatten
        Returns:
        FlatteningApi allowing to set additional parameters
      • flatten

        public static final FlatteningApi flatten​(Document document)
        Flattens the remote input and optionally compacts it using context.
        Parameters:
        document - to flatten
        Returns:
        FlatteningApi allowing to set additional parameters
      • frame

        public static final FramingApi frame​(URI documentUri,
                                             URI frameUri)
        Frames the given remote input using remote frame.
        Parameters:
        documentUri - URI referencing JSON-LD document to frame
        frameUri - URI referencing JSON-LD frame
        Returns:
        FramingApi allowing to set additional parameters
      • frame

        public static final FramingApi frame​(String documentLocation,
                                             String frameLocation)
        Frames the given remote input using remote frame.
        Parameters:
        documentLocation - IRI referencing JSON-LD document to frame
        frameLocation - IRI referencing JSON-LD frame
        Returns:
        FramingApi allowing to set additional parameters
      • frame

        public static final FramingApi frame​(Document document,
                                             Document frame)
        Frames the local document using given local frame.
        Parameters:
        document - to frame
        frame - JSON-LD definition
        Returns:
        FramingApi allowing to set additional parameters
      • frame

        public static final FramingApi frame​(Document document,
                                             String frameLocation)
        Frames the local document using given remote frame.
        Parameters:
        document - to frame
        frameLocation - IRI referencing JSON-LD frame
        Returns:
        FramingApi allowing to set additional parameters
      • frame

        public static final FramingApi frame​(Document document,
                                             URI frameUri)
        Frames the local document using given remote frame.
        Parameters:
        document - to frame
        frameUri - URI referencing JSON-LD frame
        Returns:
        FramingApi allowing to set additional parameters
      • frame

        public static final FramingApi frame​(String documentLocation,
                                             Document frame)
        Frames the remote input using given local frame.
        Parameters:
        documentLocation - IRI referencing JSON-LD document to frame
        frame - JSON-LD definition
        Returns:
        FramingApi allowing to set additional parameters
      • frame

        public static final FramingApi frame​(String documentLocation,
                                             URI frameUri)
        Frames the remote input using given remote frame.
        Parameters:
        documentLocation - IRI referencing JSON-LD document to frame
        frameUri - URI referencing JSON-LD frame
        Returns:
        FramingApi allowing to set additional parameters
      • frame

        public static final FramingApi frame​(URI documentUri,
                                             Document frame)
        Frames the remote input using given local frame.
        Parameters:
        documentUri - URI referencing JSON-LD document to frame
        frame - JSON-LD definition
        Returns:
        FramingApi allowing to set additional parameters
      • frame

        public static final FramingApi frame​(URI documentUri,
                                             String frameLocation)
        Frames the remote input using given remote frame.
        Parameters:
        documentUri - URI referencing JSON-LD document to frame
        frameLocation - IRI referencing JSON-LD frame
        Returns:
        FramingApi allowing to set additional parameters
      • toRdf

        public static final ToRdfApi toRdf​(String documentLocation)
        Transforms the given input into RdfDataset.
        Parameters:
        documentLocation - IRI referencing JSON-LD document to transform
        Returns:
        ToRdfApi allowing to set additional parameters
      • toRdf

        public static final ToRdfApi toRdf​(URI documentUri)
        Transforms the given input into RdfDataset.
        Parameters:
        documentUri - URI referencing JSON-LD document to transform
        Returns:
        ToRdfApi allowing to set additional parameters
      • fromRdf

        public static final FromRdfApi fromRdf​(String documentLocation)
        Transforms the referenced N-Quads document into a JSON-LD document in expanded form.
        Parameters:
        documentLocation - URI referencing N-Quads document to expand
        Returns:
        FromRdfApi allowing to set additional parameters
      • fromRdf

        public static final FromRdfApi fromRdf​(URI documentUri)
        Transforms the referenced N-Quads document into a JSON-LD document in expanded form.
        Parameters:
        documentUri - URI referencing N-Quads document to expand
        Returns:
        FromRdfApi allowing to set additional parameters
      • fromRdf

        public static final FromRdfApi fromRdf​(Document document)
        Transforms Document into a JSON-LD document in expanded form.
        Parameters:
        document - to transform
        Returns:
        FromRdfApi allowing to set additional parameters