Package com.apicatalog.jsonld.api
Class ToRdfApi
- java.lang.Object
-
- com.apicatalog.jsonld.api.ToRdfApi
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ToRdfApibase(URI baseUri)Set the baseIRI.ToRdfApicontext(Document context)A context that is used to initialize the active context.ToRdfApicontext(jakarta.json.JsonStructure context)A context that is used to initialize the active context.ToRdfApicontext(String contextLocation)A context that is used to initialize the active context.ToRdfApicontext(URI contextUri)A context that is used to initialize the active context.RdfDatasetget()Transform providedJSON-LDdocument intoRdfDataset.ToRdfApiloader(DocumentLoader loader)Set the loader to be used to retrieve remote documents and contexts, implementing theDocumentLoader.ToRdfApimode(JsonLdVersion processingMode)SetJSON-LDprocessing mode.ToRdfApinumericId()Experimental: Accept numeric @id.ToRdfApioptions(JsonLdOptions options)Override an existing settings withJsonLdOptions.ToRdfApiordered(boolean enable)If set totrue, certain algorithm processing steps are ordered lexicographically.ToRdfApiproduceGeneralizedRdf()The JSON-LD processor may emit blank nodes for triple predicates.ToRdfApiproduceGeneralizedRdf(boolean enable)If set to true, the JSON-LD processor may emit blank nodes for triple predicates, otherwise they will be omitted.ToRdfApirdfDirection(JsonLdOptions.RdfDirection direction)Determines how value objects containing a base direction are transformed to and from RDF.
-
-
-
Method Detail
-
options
public ToRdfApi options(JsonLdOptions options)
Description copied from interface:CommonApiOverride an existing settings withJsonLdOptions.- Specified by:
optionsin interfaceCommonApi<ToRdfApi>- Parameters:
options-JsonLdOptions- Returns:
- builder instance
-
context
public ToRdfApi context(URI contextUri)
Description copied from interface:ContextApiA context that is used to initialize the active context.- Specified by:
contextin interfaceContextApi<ToRdfApi>- Parameters:
contextUri-URIreferring to a context- Returns:
- builder instance
-
context
public ToRdfApi context(String contextLocation)
Description copied from interface:ContextApiA context that is used to initialize the active context.- Specified by:
contextin interfaceContextApi<ToRdfApi>- Parameters:
contextLocation-IRIreferring to a context- Returns:
- builder instance
-
context
public ToRdfApi context(jakarta.json.JsonStructure context)
Description copied from interface:ContextApiA context that is used to initialize the active context.- Specified by:
contextin interfaceContextApi<ToRdfApi>- Parameters:
context-JsonObject, a sequence ofJsonObject, or aJsonStringrepresenting anIRI- Returns:
- builder instance
-
context
public ToRdfApi context(Document context)
Description copied from interface:ContextApiA context that is used to initialize the active context.- Specified by:
contextin interfaceContextApi<ToRdfApi>- Parameters:
context-Documentrepresenting a context- Returns:
- builder instance
-
produceGeneralizedRdf
public ToRdfApi produceGeneralizedRdf(boolean enable)
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
public ToRdfApi produceGeneralizedRdf()
The JSON-LD processor may emit blank nodes for triple predicates.- Returns:
- builder instance
-
rdfDirection
public ToRdfApi rdfDirection(JsonLdOptions.RdfDirection direction)
Determines how value objects containing a base direction are transformed to and from RDF.- Parameters:
direction-- Returns:
- builder instance
-
mode
public ToRdfApi mode(JsonLdVersion processingMode)
Description copied from interface:CommonApiSetJSON-LDprocessing mode. JSON-LD 1.1 is set by default.
-
base
public ToRdfApi base(URI baseUri)
Description copied from interface:CommonApiSet the baseIRI. If set, this overrides the input document's IRI.
-
loader
public ToRdfApi loader(DocumentLoader loader)
Description copied from interface:LoaderApiSet 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
public ToRdfApi ordered(boolean enable)
Description copied from interface:CommonApiIf set totrue, certain algorithm processing steps are ordered lexicographically. Iffalse, order is not considered in processing.
-
get
public RdfDataset get() throws JsonLdError
Transform providedJSON-LDdocument intoRdfDataset.- Returns:
RdfDatasetrepresenting providedJSON-LDdocument- Throws:
JsonLdError
-
numericId
public ToRdfApi numericId()
Experimental: Accept numeric @id. Disabled by default.- Returns:
- builder instance
-
-