public class JsonLDWriteContext extends Context
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 JsonLDWriter
)
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.emptyContext
Constructor and Description |
---|
JsonLDWriteContext() |
Modifier and Type | Method and Description |
---|---|
void |
setFrame(Object frame)
Set the frame used in a "Frame" output
|
void |
setFrame(String frame)
Set the frame used in a "Frame" output
|
void |
setJsonLDContext(Object jsonLdContext)
Set the value of the JSON-LD "@context" node, used in "Compact" and "Flattened" JSON-LD outputs.
|
void |
setJsonLDContext(String jsonLdContext)
Set the value of the JSON-LD "@context" node, used in "Compact" and "Flattened" JSON-LD outputs.
|
void |
setJsonLDContextSubstitution(String jsonLdContext)
Allow to replace the content of the "@context" node with a given value.
|
void |
setOptions(com.github.jsonldjava.core.JsonLdOptions opts)
Set the JSON-LD java API's options
If not set, a default value is used.
|
copy, equals, get, get, getAsString, getAsString, getInt, getLong, hashCode, hasValue, hasValueAsString, hasValueAsString, isDefined, isFalse, isFalseOrUndef, isTrue, isTrueOrUndef, isUndef, keys, mergeCopy, put, putAll, remove, set, set, setCurrentDateTime, setFalse, setIfUndef, setTrue, setupContextForDataset, size, toString, unset
public void setOptions(com.github.jsonldjava.core.JsonLdOptions opts)
opts
- the options as defined by the JSON-LD java APIpublic void setJsonLDContext(String jsonLdContext)
jsonLdContext
- the value of the "@context" node (a JSON value). Note that the use of an URI to pass an external context is not supported (as of JSONLD-java API 0.8.3)for a way to overcome this problem.
,
setJsonLDContext(Object)
public void setJsonLDContext(Object jsonLdContext)
jsonLdContext
- the context as expected by JSON-LD java API. As of JSON-LD java 0.8.3, a Map
defining the properties and the prefixes is OK. Note that the use an URI to pass an external context is not supported (JSONLD-java RDF 0.8.3)for a way to overcome this problem.
,
setJsonLDContext(String)
public void setJsonLDContextSubstitution(String jsonLdContext)
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.public void setFrame(String frame)
frame
- the Json Object used as frame for the "frame" outputpublic void setFrame(Object frame)
frame
- the frame Object expected by the JSON-LD java APILicenced under the Apache License, Version 2.0