org.eclipse.rdf4j.rio.helpers

## Class JSONLDSettings

- java.lang.Object
- - org.eclipse.rdf4j.rio.helpers.JSONLDSettings

-     public class JSONLDSettings
      extends Object

  Settings that can be passed to JSONLD Parsers and Writers.
  Author:
    Peter Ansell
  See Also:
    JSONLD Data Structures

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static RioSetting<Boolean>` | `COMPACT_ARRAYS` If set to true, the JSON-LD processor replaces arrays with just one element with that element during compaction.
    `static RioSetting<com.github.jsonldjava.core.DocumentLoader>` | `DOCUMENT_LOADER` If specified, it is used to retrieve remote documents and contexts; otherwise the processor's built-in loader is used.
    `static RioSetting<Boolean>` | `HIERARCHICAL_VIEW` If set to true, the JSON-LD processor will try to represent the JSON-LD object in a hierarchical view.
    `static RioSetting<JSONLDMode>` | `JSONLD_MODE` The `JSONLDMode` that the writer will use to reorganise the JSONLD document after it is created.
    `static RioSetting<Boolean>` | `OPTIMIZE` If set to true, the JSON-LD processor is allowed to optimize the output of the Compaction algorithm to produce even compacter representations.
    `static RioSetting<Boolean>` | `PRODUCE_GENERALIZED_RDF` If set to true, the JSON-LD processor may emit blank nodes for triple predicates, otherwise they will be omitted.
    `static RioSetting<Boolean>` | `USE_NATIVE_TYPES` If set to true, the JSON-LD processor will try to convert typed values to JSON native types instead of using the expanded object form when converting from RDF.
    `static RioSetting<Boolean>` | `USE_RDF_TYPE` If set to true, the JSON-LD processor will use the expanded rdf:type IRI as the property instead of @type when converting from RDF.

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### COMPACT_ARRAYS

          public static final RioSetting<Boolean> COMPACT_ARRAYS

      If set to true, the JSON-LD processor replaces arrays with just one element with that element during compaction. If set to false, all arrays will remain arrays even if they have just one element.

      Defaults to true.

      Can be overridden by setting system property `org.eclipse.rdf4j.rio.jsonld.compact_arrays`.

      See Also:
        JSONLD Data Structures

    - #### DOCUMENT_LOADER

          public static final RioSetting<com.github.jsonldjava.core.DocumentLoader> DOCUMENT_LOADER

      If specified, it is used to retrieve remote documents and contexts; otherwise the processor's built-in loader is used.

    - #### OPTIMIZE

          public static final RioSetting<Boolean> OPTIMIZE

      If set to true, the JSON-LD processor is allowed to optimize the output of the Compaction algorithm to produce even compacter representations.

      Defaults to false.

      Can be overridden by setting system property `org.eclipse.rdf4j.rio.jsonld.optimize`.

      See Also:
        JSONLD Data Structures

    - #### PRODUCE_GENERALIZED_RDF

          public static final RioSetting<Boolean> PRODUCE_GENERALIZED_RDF

      If set to true, the JSON-LD processor may emit blank nodes for triple predicates, otherwise they will be omitted. Note: the use of blank node identifiers to label properties is obsolete, and may be removed in a future version of JSON-LD,

      Defaults to false.

      Can be overridden by setting system property `org.eclipse.rdf4j.rio.jsonld.produce_generalized_rdf`.

      See Also:
        JSONLD Data Structures

    - #### USE_NATIVE_TYPES

          public static final RioSetting<Boolean> USE_NATIVE_TYPES

      If set to true, the JSON-LD processor will try to convert typed values to JSON native types instead of using the expanded object form when converting from RDF. xsd:boolean values will be converted to true or false. xsd:integer and xsd:double values will be converted to JSON numbers.

      Defaults to false for RDF compatibility.

      Can be overridden by setting system property `org.eclipse.rdf4j.rio.jsonld.use_native_types`.

      See Also:
        JSONLD Data Structures

    - #### USE_RDF_TYPE

          public static final RioSetting<Boolean> USE_RDF_TYPE

      If set to true, the JSON-LD processor will use the expanded rdf:type IRI as the property instead of @type when converting from RDF.

      Defaults to false.

      Can be overridden by setting system property `org.eclipse.rdf4j.rio.jsonld.use_rdf_type`.

      See Also:
        JSONLD Data Structures

    - #### JSONLD_MODE

          public static final RioSetting<JSONLDMode> JSONLD_MODE

      The `JSONLDMode` that the writer will use to reorganise the JSONLD document after it is created.

      Defaults to `JSONLDMode.EXPAND` to provide maximum RDF compatibility.

      See Also:
        JSONLD Features

    - #### HIERARCHICAL_VIEW

          public static final RioSetting<Boolean> HIERARCHICAL_VIEW

      If set to true, the JSON-LD processor will try to represent the JSON-LD object in a hierarchical view.

      Default to false

      Can be overridden by setting system property `org.eclipse.rdf4j.rio.jsonld.hierarchical_view`.

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.