Class JSONLDSettings
- Author:
- Peter Ansell
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final BooleanRioSetting
If set to true, the JSON-LD processor replaces arrays with just one element with that element during compaction.static final RioSetting
<no.hasmac.jsonld.loader.DocumentLoader> If specified, it is used to retrieve remote documents and contexts; otherwise the processor's built-in loader is used.static final BooleanRioSetting
The document loader cache is enabled by default.static final BooleanRioSetting
The JSON-LD processor will throw an exception if a warning is encountered during processing.static final RioSetting
<no.hasmac.jsonld.document.Document> The JSON-LD context to use when expanding JSON-LDstatic final RioSetting
<no.hasmac.jsonld.document.Document> static final BooleanRioSetting
If set to true, the JSON-LD processor will try to represent the JSON-LD object in a hierarchical view.static final RioSetting
<JSONLDMode> TheJSONLDMode
that the writer will use to reorganise the JSONLD document after it is created.static final BooleanRioSetting
If set to true, the JSON-LD processor is allowed to optimize the output of the Compaction algorithm to produce even compacter representations.static final BooleanRioSetting
If set to true, the JSON-LD processor may emit blank nodes for triple predicates, otherwise they will be omitted.static final BooleanRioSetting
Secure mode only allows loading remote/local resources (ex.static final BooleanRioSetting
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 final BooleanRioSetting
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.static final SetRioSetting
<String> Whitelist of remote/local resources that the JSON-LD parser can retrieve. -
Method Summary
-
Field Details
-
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:
-
DOCUMENT_LOADER
If specified, it is used to retrieve remote documents and contexts; otherwise the processor's built-in loader is used. -
EXPAND_CONTEXT
The JSON-LD context to use when expanding JSON-LD- See Also:
-
FRAME
-
EXCEPTION_ON_WARNING
The JSON-LD processor will throw an exception if a warning is encountered during processing. -
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:
-
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:
-
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:
-
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_MODE
TheJSONLDMode
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:
-
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
. -
WHITELIST
Whitelist of remote/local resources that the JSON-LD parser can retrieve. Set of URIs as strings. This can be overridden by setting a system property with the keyorg.eclipse.rdf4j.rio.jsonld_whitelist
and a JSON array of the desired values.Default:
Set.of("http://www.w3.org/ns/anno.jsonld", "https://www.w3.org/ns/anno.jsonld", "http://www.w3.org/ns/anno", "https://www.w3.org/ns/anno", "http://www.w3.org/ns/activitystreams.jsonld", "https://www.w3.org/ns/activitystreams.jsonld", "http://www.w3.org/ns/activitystreams", "https://www.w3.org/ns/activitystreams", "http://www.w3.org/ns/ldp.jsonld", "https://www.w3.org/ns/ldp.jsonld", "http://www.w3.org/ns/ldp", "https://www.w3.org/ns/ldp", "http://www.w3.org/ns/oa.jsonld", "https://www.w3.org/ns/oa.jsonld", "http://www.w3.org/ns/oa", "https://www.w3.org/ns/oa", "http://www.w3.org/ns/hydra/context.jsonld", "https://www.w3.org/ns/hydra/context.jsonld", "http://www.w3.org/ns/hydra/context", "https://www.w3.org/ns/hydra/context", "http://www.w3.org/2018/credentials/v1.jsonld", "https://www.w3.org/2018/credentials/v1.jsonld", "http://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/v1", "http://www.w3.org/2019/wot/td/v1.jsonld", "https://www.w3.org/2019/wot/td/v1.jsonld", "http://www.w3.org/2019/wot/td/v1", "https://www.w3.org/2019/wot/td/v1", "http://w3c.github.io/json-ld-rc/context.jsonld", "https://w3c.github.io/json-ld-rc/context.jsonld", "http://schema.org/", "https://schema.org/", "http://health-lifesci.schema.org/", "https://health-lifesci.schema.org/", "http://auto.schema.org/", "https://auto.schema.org/", "http://bib.schema.org/", "https://bib.schema.org/", "http://pending.schema.org/", "https://pending.schema.org/", "http://schema.org/docs/jsonldcontext.jsonld", "https://schema.org/docs/jsonldcontext.jsonld", "http://schema.org/version/latest/schemaorg-current-https.jsonld", "https://schema.org/version/latest/schemaorg-current-https.jsonld", "http://schema.org/version/latest/schemaorg-all-http.jsonld", "https://schema.org/version/latest/schemaorg-all-http.jsonld", "http://schema.org/version/latest/schemaorg-all-https.jsonld", "https://schema.org/version/latest/schemaorg-all-https.jsonld", "http://schema.org/version/latest/schemaorg-current-http.jsonld", "https://schema.org/version/latest/schemaorg-current-http.jsonld", "http://schema.org/version/latest/schemaorg-all.jsonld", "https://schema.org/version/latest/schemaorg-all.jsonld", "http://schema.org/version/latest/schemaorg-current.jsonld", "https://schema.org/version/latest/schemaorg-current.jsonld", "http://project-open-data.cio.gov/v1.1/schema/catalog.jsonld", "https://project-open-data.cio.gov/v1.1/schema/catalog.jsonld", "http://geojson.org/geojson-ld/geojson-context.jsonld", "https://geojson.org/geojson-ld/geojson-context.jsonld", "http://w3id.org/security/v1", "https://w3id.org/security/v1", "http://xmlns.com/foaf/spec/index.jsonld", "https://xmlns.com/foaf/spec/index.jsonld", "http://xmlns.com/foaf/spec/", "https://xmlns.com/foaf/spec/")
-
SECURE_MODE
Secure mode only allows loading remote/local resources (ex. context from url) that are whitelisted. This can be overridden by setting a system property with the keyorg.eclipse.rdf4j.rio.jsonld_secure_mode
and a boolean value.Default: true
-
DOCUMENT_LOADER_CACHE
The document loader cache is enabled by default. All loaded documents, such as remote contexts, are cached for 1 hour, or until the cache is full. The cache holds up to 1000 documents. The cache is shared between all JSONLDParsers. The cache can be disabled by setting this value to false.Default: true
-