Class FromRdfApi

java.lang.Object
no.hasmac.jsonld.api.FromRdfApi
All Implemented Interfaces:
CommonApi<FromRdfApi>, LoaderApi<FromRdfApi>

public final class FromRdfApi extends Object implements CommonApi<FromRdfApi>, LoaderApi<FromRdfApi>
  • Field Details

    • document

      private final Document document
    • documentUri

      private final URI documentUri
    • options

      private JsonLdOptions options
  • Constructor Details

    • FromRdfApi

      public FromRdfApi(Document document)
    • FromRdfApi

      public FromRdfApi(URI documentUri)
  • Method Details

    • options

      public FromRdfApi options(JsonLdOptions options)
      Description copied from interface: CommonApi
      Override an existing settings with JsonLdOptions.
      Specified by:
      options in interface CommonApi<FromRdfApi>
      Parameters:
      options - JsonLdOptions
      Returns:
      builder instance
    • mode

      public FromRdfApi mode(JsonLdVersion processingMode)
      Description copied from interface: CommonApi
      Set JSON-LD processing mode. JSON-LD 1.1 is set by default.
      Specified by:
      mode in interface CommonApi<FromRdfApi>
      Parameters:
      processingMode - to set
      Returns:
      builder instance
    • base

      public FromRdfApi base(URI baseUri)
      Description copied from interface: CommonApi
      Set the base IRI. If set, this overrides the input document's IRI.
      Specified by:
      base in interface CommonApi<FromRdfApi>
      Parameters:
      baseUri -
      Returns:
      builder instance
    • ordered

      public FromRdfApi ordered(boolean enable)
      Description copied from interface: CommonApi
      If set to true, certain algorithm processing steps are ordered lexicographically. If false, order is not considered in processing.
      Specified by:
      ordered in interface CommonApi<FromRdfApi>
      Parameters:
      enable -
      Returns:
      builder instance
    • loader

      public FromRdfApi loader(DocumentLoader loader)
      Description copied from interface: LoaderApi
      Set the loader to be used to retrieve remote documents and contexts, implementing the DocumentLoader. If specified, it is used to retrieve remote documents and contexts; otherwise, if not specified, the processor's built-in loader is used.
      Specified by:
      loader in interface LoaderApi<FromRdfApi>
      Parameters:
      loader -
      Returns:
      builder instance
    • nativeTypes

      public FromRdfApi nativeTypes()
    • nativeTypes

      public FromRdfApi nativeTypes(boolean useNativeTypes)
    • get

      public jakarta.json.JsonArray get() throws JsonLdError
      Get JSON-LD representation of the provided RdfDataset.
      Returns:
      JsonArray representing JSON-LD document
      Throws:
      JsonLdError