Package no.hasmac.jsonld.api
Class ExpansionApi
java.lang.Object
no.hasmac.jsonld.api.ExpansionApi
- All Implemented Interfaces:
CommonApi<ExpansionApi>
,ContextApi<ExpansionApi>
,LoaderApi<ExpansionApi>
public final class ExpansionApi
extends Object
implements CommonApi<ExpansionApi>, LoaderApi<ExpansionApi>, ContextApi<ExpansionApi>
-
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.jakarta.json.JsonArray
get()
Get the result of the document expansion.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.rdfStar()
Experimental: Enables JSON-LD-STAR extension.
-
Field Details
-
documentUri
-
document
-
options
-
-
Constructor Details
-
ExpansionApi
-
ExpansionApi
-
-
Method Details
-
options
Description copied from interface:CommonApi
Override an existing settings withJsonLdOptions
.- Specified by:
options
in interfaceCommonApi<ExpansionApi>
- 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<ExpansionApi>
- 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<ExpansionApi>
- 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<ExpansionApi>
- 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<ExpansionApi>
- Parameters:
context
-Document
representing a context- Returns:
- builder instance
-
mode
Description copied from interface:CommonApi
SetJSON-LD
processing mode. JSON-LD 1.1 is set by default.- Specified by:
mode
in interfaceCommonApi<ExpansionApi>
- Parameters:
processingMode
- to set- Returns:
- builder instance
-
base
Description copied from interface:CommonApi
Set the baseIRI
. If set, this overrides the input document's IRI.- Specified by:
base
in interfaceCommonApi<ExpansionApi>
- Parameters:
baseUri
-- Returns:
- builder instance
-
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.- Specified by:
loader
in interfaceLoaderApi<ExpansionApi>
- Parameters:
loader
-- Returns:
- builder instance
-
ordered
Description copied from interface:CommonApi
If set totrue
, certain algorithm processing steps are ordered lexicographically. Iffalse
, order is not considered in processing.- Specified by:
ordered
in interfaceCommonApi<ExpansionApi>
- Parameters:
enable
-- Returns:
- builder instance
-
get
Get the result of the document expansion.- Returns:
JsonArray
representing expanded document- Throws:
JsonLdError
-
numericId
Experimental: Accept numeric @id. Disabled by default.- Returns:
- builder instance
-
rdfStar
Experimental: Enables JSON-LD-STAR extension. Disabled by default.- Returns:
- builder instance
- See Also:
-