Package org.apache.jena.riot
Class JsonLDReadContext
- java.lang.Object
-
- org.apache.jena.sparql.util.Context
-
- org.apache.jena.riot.JsonLDReadContext
-
public class JsonLDReadContext extends Context
Set of parameters that can be used to control the reading of JSON-LD. This class provides setters to define a "Context" suitable to be passed as last argument toReaderRIOT.read(InputStream, String, ContentType, StreamRDF, Context)when the ReaderRIOT has been created with one of the JSON-LD RDFFormat variants (that is, when it is an instance ofJsonLDReader) Parameters that are actually useful are ''documentLoader'' and ''produceGeneralizedRdf''.
-
-
Field Summary
-
Fields inherited from class org.apache.jena.sparql.util.Context
emptyContext
-
-
Constructor Summary
Constructors Constructor Description JsonLDReadContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetJsonLDContext(java.lang.Object jsonLdContext)Set the value of the JSON-LD "@context" node, used when reading a jsonld (overriding the actual @context in the jsonld).voidsetJsonLDContext(java.lang.String jsonLdContext)Set the value of the JSON-LD "@context" node, used when reading a jsonld (overriding the actual @context in the jsonld).voidsetOptions(com.github.jsonldjava.core.JsonLdOptions opts)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
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
-
-
-
-
Method Detail
-
setJsonLDContext
public void setJsonLDContext(java.lang.String jsonLdContext)
Set the value of the JSON-LD "@context" node, used when reading a jsonld (overriding the actual @context in the jsonld). "Compact" and "Flattened" JSON-LD outputs.- Parameters:
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)- See Also:
setJsonLDContext(Object)
-
setJsonLDContext
public void setJsonLDContext(java.lang.Object jsonLdContext)
Set the value of the JSON-LD "@context" node, used when reading a jsonld (overriding the actual @context in the jsonld). "Compact" and "Flattened" JSON-LD outputs.- Parameters:
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)- See Also:
setJsonLDContext(String)
-
setOptions
public void setOptions(com.github.jsonldjava.core.JsonLdOptions opts)
Set the JSON-LD java API's options If not set, a default value is used.- Parameters:
opts- the options as defined by the JSON-LD java API
-
-