Package no.hasmac.jsonld.api
Class ToRdfApi
java.lang.Object
no.hasmac.jsonld.api.ToRdfApi
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet the baseIRI
.context
(jakarta.json.JsonStructure context) A context that is used to initialize the active context.A context that is used to initialize the active context.A context that is used to initialize the active context.A context that is used to initialize the active context.get()
Transform providedJSON-LD
document intoRdfDataset
.<Triple,
Quad, Iri extends Resource, Bnode extends Resource, Resource extends Value, Literal extends Value, Value>
voidget
(RdfConsumer<Triple, Quad> rdfConsumer, RdfValueFactory<Triple, Quad, Iri, Bnode, Resource, Literal, Value> rdfValueFactory) Transform providedJSON-LD
document intoRdfDataset
.loader
(DocumentLoader loader) Set the loader to be used to retrieve remote documents and contexts, implementing theDocumentLoader
.mode
(JsonLdVersion processingMode) SetJSON-LD
processing mode.Experimental: Accept numeric @id.options
(JsonLdOptions options) Override an existing settings withJsonLdOptions
.ordered
(boolean enable) If set totrue
, certain algorithm processing steps are ordered lexicographically.The JSON-LD processor may emit blank nodes for triple predicates.produceGeneralizedRdf
(boolean enable) If set to true, the JSON-LD processor may emit blank nodes for triple predicates, otherwise they will be omitted.rdfDirection
(JsonLdOptions.RdfDirection direction) Determines how value objects containing a base direction are transformed to and from RDF.
-
Field Details
-
document
-
documentUri
-
options
-
-
Constructor Details
-
ToRdfApi
-
ToRdfApi
-
-
Method Details
-
options
Description copied from interface:CommonApi
Override an existing settings withJsonLdOptions
.- Specified by:
options
in interfaceCommonApi<ToRdfApi>
- Parameters:
options
-JsonLdOptions
- Returns:
- builder instance
-
context
Description copied from interface:ContextApi
A context that is used to initialize the active context.- Specified by:
context
in interfaceContextApi<ToRdfApi>
- Parameters:
contextUri
-URI
referring to a context- Returns:
- builder instance
-
context
Description copied from interface:ContextApi
A context that is used to initialize the active context.- Specified by:
context
in interfaceContextApi<ToRdfApi>
- Parameters:
contextLocation
-IRI
referring to a context- Returns:
- builder instance
-
context
Description copied from interface:ContextApi
A context that is used to initialize the active context.- Specified by:
context
in interfaceContextApi<ToRdfApi>
- Parameters:
context
-JsonObject
, a sequence ofJsonObject
, or aJsonString
representing anIRI
- Returns:
- builder instance
-
context
Description copied from interface:ContextApi
A context that is used to initialize the active context.- Specified by:
context
in interfaceContextApi<ToRdfApi>
- Parameters:
context
-Document
representing a context- Returns:
- builder instance
-
produceGeneralizedRdf
If set to true, the JSON-LD processor may emit blank nodes for triple predicates, otherwise they will be omitted.- Parameters:
enable
-- Returns:
- builder instance
-
produceGeneralizedRdf
The JSON-LD processor may emit blank nodes for triple predicates.- Returns:
- builder instance
-
rdfDirection
Determines how value objects containing a base direction are transformed to and from RDF.- Parameters:
direction
-- Returns:
- builder instance
-
mode
Description copied from interface:CommonApi
SetJSON-LD
processing mode. JSON-LD 1.1 is set by default. -
base
Description copied from interface:CommonApi
Set the baseIRI
. If set, this overrides the input document's IRI. -
loader
Description copied from interface:LoaderApi
Set the loader to be used to retrieve remote documents and contexts, implementing theDocumentLoader
. If specified, it is used to retrieve remote documents and contexts; otherwise, if not specified, the processor's built-in loader is used. -
ordered
Description copied from interface:CommonApi
If set totrue
, certain algorithm processing steps are ordered lexicographically. Iffalse
, order is not considered in processing. -
get
Transform providedJSON-LD
document intoRdfDataset
.- Returns:
RdfDataset
representing providedJSON-LD
document- Throws:
JsonLdError
-
get
public <Triple,Quad, void getIri extends Resource, Bnode extends Resource, Resource extends Value, Literal extends Value, Value> (RdfConsumer<Triple, Quad> rdfConsumer, RdfValueFactory<Triple, throws JsonLdErrorQuad, Iri, Bnode, Resource, Literal, Value> rdfValueFactory) Transform providedJSON-LD
document intoRdfDataset
.- Throws:
JsonLdError
-
numericId
Experimental: Accept numeric @id. Disabled by default.- Returns:
- builder instance
-