public class JsonLdApi
extends java.lang.Object
| Constructor and Description |
|---|
JsonLdApi()
Constructs an empty JsonLdApi object using the default JsonLdOptions, and
without initialization.
|
JsonLdApi(java.lang.Object input,
java.lang.Object context,
JsonLdOptions opts)
Constructs a JsonLdApi object using the given object as the initial
JSON-LD object, the given context, and the given JsonLdOptions.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
compact(Context activeCtx,
java.lang.String activeProperty,
java.lang.Object element)
Compaction Algorithm
|
java.lang.Object |
compact(Context activeCtx,
java.lang.String activeProperty,
java.lang.Object element,
boolean compactArrays)
Compaction Algorithm
|
java.lang.Object |
expand(Context activeCtx,
java.lang.Object element)
Expansion Algorithm
|
java.lang.Object |
expand(Context activeCtx,
java.lang.String activeProperty,
java.lang.Object element)
Expansion Algorithm
|
public JsonLdApi()
public JsonLdApi(java.lang.Object input,
java.lang.Object context,
JsonLdOptions opts)
throws JsonLdError
input - The initial JSON-LD object.context - The initial context.opts - The JsonLdOptions to use.JsonLdError - If there is an error initializing using the object and
options.public java.lang.Object compact(Context activeCtx, java.lang.String activeProperty, java.lang.Object element, boolean compactArrays) throws JsonLdError
http://json-ld.org/spec/latest/json-ld-api/#compaction-algorithm
activeCtx - The Active ContextactiveProperty - The Active Propertyelement - The current elementcompactArrays - True to compact arrays.JsonLdError - If there was an error during compaction.public java.lang.Object compact(Context activeCtx, java.lang.String activeProperty, java.lang.Object element) throws JsonLdError
http://json-ld.org/spec/latest/json-ld-api/#compaction-algorithm
activeCtx - The Active ContextactiveProperty - The Active Propertyelement - The current elementJsonLdError - If there was an error during compaction.public java.lang.Object expand(Context activeCtx, java.lang.String activeProperty, java.lang.Object element) throws JsonLdError
http://json-ld.org/spec/latest/json-ld-api/#expansion-algorithm
activeCtx - The Active ContextactiveProperty - The Active Propertyelement - The current elementJsonLdError - If there was an error during expansion.public java.lang.Object expand(Context activeCtx, java.lang.Object element) throws JsonLdError
http://json-ld.org/spec/latest/json-ld-api/#expansion-algorithm
activeCtx - The Active Contextelement - The current elementJsonLdError - If there was an error during expansion.