java.lang.Object
org.apache.jena.sparql.util.Context
org.apache.jena.riot.JsonLDWriteContext
Deprecated.
Migrate to JSON-LD 1.1
Set of parameters that can be used to control the writing of JSON-LD.
This class provides setters to define a "Context" suitable to be passed as
last argument to
WriterDatasetRIOT.write(OutputStream, DatasetGraph, PrefixMap, String, Context)
when the WriterDatasetRIOT has been created with one of the JSON-LD RDFFormat variants (that is, when it is
an instance of JsonLD10Writer
)
Parameters that are actually useful depend on the JSON-LD output variant.
None of them is required (default values being used), except for the "frame" one,
when outputting using JSON-LD "frame" output variant.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Set the frame used in a "Frame" outputvoid
Deprecated.Set the frame used in a "Frame" outputvoid
setJsonLDContext
(Object jsonLdContext) Deprecated.Set the value of the JSON-LD "@context" node, used in "Compact" and "Flattened" JSON-LD outputs.void
setJsonLDContext
(String jsonLdContext) Deprecated.Set the value of the JSON-LD "@context" node, used in "Compact" and "Flattened" JSON-LD outputs.void
setJsonLDContextSubstitution
(String jsonLdContext) Deprecated.Allow to replace the content of the "@context" node with a given value.void
setOptions
(com.github.jsonldjava.core.JsonLdOptions opts) Deprecated.Set the JSON-LD java API's options If not set, a default value is used.Methods inherited from class org.apache.jena.sparql.util.Context
clear, copy, create, emptyContext, equals, fromDataset, get, get, getAsString, getAsString, getInt, getLong, getTrueOrFalse, hashCode, hasValue, hasValueAsString, hasValueAsString, isDefined, isFalse, isFalseOrUndef, isTrue, isTrueOrUndef, isUndef, keys, mergeCopy, put, putAll, remove, set, set, setAll, setCurrentDateTime, setFalse, setIfUndef, setTrue, setupContextForDataset, size, toString, unset
-
Constructor Details
-
JsonLDWriteContext
public JsonLDWriteContext()Deprecated.
-
-
Method Details
-
setOptions
public void setOptions(com.github.jsonldjava.core.JsonLdOptions opts) Deprecated.Set the JSON-LD java API's options If not set, a default value is used. (Note that this default is not the same as the one used by JSON-LD java API).- Parameters:
opts
- the options as defined by the JSON-LD java API
-
setJsonLDContext
Deprecated.Set the value of the JSON-LD "@context" node, used in "Compact" and "Flattened" JSON-LD outputs. Only useful for "Compact" and "Flattened" JSON-LD outputs, and not required: if not set, a value for the "@Context" node is computed, based on the content of the dataset and its prefix mappings.- Parameters:
jsonLdContext
- the value of the "@context" node (a JSON value).- See Also:
-
setJsonLDContext
Deprecated.Set the value of the JSON-LD "@context" node, used in "Compact" and "Flattened" JSON-LD outputs. Only useful for "Compact" and "Flattened" JSON-LD outputs, and not required: if not set, a value for the "@Context" node is computed, based on the content of the dataset and its prefix mappings.- Parameters:
jsonLdContext
- the context as expected by JSON-LD java API.- See Also:
-
setJsonLDContextSubstitution
Deprecated.Allow to replace the content of the "@context" node with a given value. This is useful, for instance, to allow to set the @content in the output to an URI, such as "@context": "https://schema.org/" Note that the actual content at this URI is NOT used when computing the output. The context used to compute the JSONLD output is the one normally used (as defined by a call to - or the lack of call to - setJsonLdContext) Only useful for "Compact" and "Flattened" JSON-LD outputs, and not required- Parameters:
jsonLdContext
- the value of the "@context" node. Note the string is supposed to be a JSON Value: if passing an URI, the String must be quoted.
-
setFrame
Deprecated.Set the frame used in a "Frame" output- Parameters:
frame
- the Json Object used as frame for the "frame" output
-
setFrame
Deprecated.Set the frame used in a "Frame" output- Parameters:
frame
- the frame Object expected by the JSON-LD java API
-