java.lang.Object
org.apache.jena.riot.lang.LangJSONLD10
- All Implemented Interfaces:
ReaderRIOT
Deprecated.
Migrate to JSON-LD 1.1
One can pass a jsonld context using the (jena) Context mechanism, defining a (jena) Context
(sorry for this clash of "contexts"), (cf. last argument in
ReaderRIOT.read(InputStream in, String baseURI, ContentType ct, StreamRDF output, Context context))
with:
Context jenaContext = new Context() jenaCtx.set(JsonLdReader.JSONLD_CONTEXT, contextAsJsonString);where contextAsJsonString is a JSON string containing the value of the "@context". It is also possible to define the different options supported by JSONLD-java using the
JSONLD_OPTIONS Symbol
The JsonLDReadContext is a convenience class that extends Context and
provides methods to set the values of these different Symbols that are used in controlling the writing of JSON-LD.
Note: it is possible to override jsonld's "@context" value by providing one,
using a Context, and setting the JSONLD_CONTEXT Symbol's value
to the data expected by JSON-LD java API (a Map).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringDeprecated.static StringDeprecated.static final SymbolDeprecated.Symbol to use to pass (in a Context object) the "@context" to be used when reading jsonld (overriding the actual @context in the jsonld) Expected value: the value of the "@context", as expected by the JSONLD-java API (a Map)static final SymbolDeprecated.value: the option object expected by JsonLdProcessor (instance of JsonLdOptions)static StringDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionLangJSONLD10(Lang lang, ParserProfile profile, ErrorHandler errorHandler) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidread(InputStream in, String baseURI, ContentType ct, StreamRDF output, Context context) Deprecated.Read from an InputStream and output RDF on the StreamRDF.voidDeprecated.Read from an InputStream and output RDF on the StreamRDF.
-
Field Details
-
JSONLD_CONTEXT
Deprecated.Symbol to use to pass (in a Context object) the "@context" to be used when reading jsonld (overriding the actual @context in the jsonld) Expected value: the value of the "@context", as expected by the JSONLD-java API (a Map) -
JSONLD_OPTIONS
Deprecated.value: the option object expected by JsonLdProcessor (instance of JsonLdOptions) -
LITERAL
Deprecated. -
BLANK_NODE
Deprecated. -
IRI
Deprecated.
-
-
Constructor Details
-
LangJSONLD10
Deprecated.
-
-
Method Details
-
read
Deprecated.Description copied from interface:ReaderRIOTRead from an InputStream and output RDF on the StreamRDF.- Specified by:
readin interfaceReaderRIOT- Parameters:
reader- Reader. InputStreams are preferred because Reader do not allow RIOT to set the character set.baseURI- Base URI (or null)ct- Content-Type if available. Routing to the right parser will have already been done so this only useful to get addition Content-Type information or if this ReaderRIOT can handle multiple media types.output- Destination for the parser output.context- Environment settings.
-
read
Deprecated.Description copied from interface:ReaderRIOTRead from an InputStream and output RDF on the StreamRDF.- Specified by:
readin interfaceReaderRIOT- Parameters:
in- InputStreambaseURI- Base URI (or null)ct- Content-Type if available. Routing to the right parser will have already been done so this only useful to get addition Content-Type information or if this ReaderRIOT can handle multiple media types.output- Destination for the parser output.context- Environment settings.
-