Package no.hasmac.jsonld.api
Class FlatteningApi
java.lang.Object
no.hasmac.jsonld.api.FlatteningApi
- All Implemented Interfaces:
CommonApi<FlatteningApi>
,ContextApi<FlatteningApi>
,LoaderApi<FlatteningApi>
public final class FlatteningApi
extends Object
implements CommonApi<FlatteningApi>, LoaderApi<FlatteningApi>, ContextApi<FlatteningApi>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Document
private URI
private final Document
private final URI
private JsonLdOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet the baseIRI
.compactArrays
(boolean enable) 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.JsonStructure
get()
Get the result of flattening.loader
(DocumentLoader loader) Set the loader to be used to retrieve remote documents and contexts, implementing theDocumentLoader
.mode
(JsonLdVersion processingMode) SetJSON-LD
processing mode.options
(JsonLdOptions options) Override an existing settings withJsonLdOptions
.ordered
(boolean enable) If set totrue
, certain algorithm processing steps are ordered lexicographically.
-
Field Details
-
documentUri
-
document
-
context
-
contextUri
-
options
-
-
Constructor Details
-
FlatteningApi
-
FlatteningApi
-
-
Method Details
-
options
Description copied from interface:CommonApi
Override an existing settings withJsonLdOptions
.- Specified by:
options
in interfaceCommonApi<FlatteningApi>
- Parameters:
options
-JsonLdOptions
- 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<FlatteningApi>
- 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<FlatteningApi>
- Parameters:
baseUri
-- Returns:
- builder instance
-
compactArrays
-
compactArrays
-
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<FlatteningApi>
- 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<FlatteningApi>
- Parameters:
enable
-- Returns:
- builder instance
-
context
Description copied from interface:ContextApi
A context that is used to initialize the active context.- Specified by:
context
in interfaceContextApi<FlatteningApi>
- 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<FlatteningApi>
- 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<FlatteningApi>
- 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<FlatteningApi>
- Parameters:
context
-Document
representing a context- Returns:
- builder instance
-
get
Get the result of flattening.- Returns:
JsonStructure
representing flattened document- Throws:
JsonLdError
-