Package no.hasmac.jsonld.api
Class FromRdfApi
- java.lang.Object
-
- no.hasmac.jsonld.api.FromRdfApi
-
- All Implemented Interfaces:
CommonApi<FromRdfApi>
,LoaderApi<FromRdfApi>
public final class FromRdfApi extends java.lang.Object implements CommonApi<FromRdfApi>, LoaderApi<FromRdfApi>
-
-
Field Summary
Fields Modifier and Type Field Description private Document
document
private java.net.URI
documentUri
private JsonLdOptions
options
-
Constructor Summary
Constructors Constructor Description FromRdfApi(java.net.URI documentUri)
FromRdfApi(Document document)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FromRdfApi
base(java.net.URI baseUri)
Set the baseIRI
.jakarta.json.JsonArray
get()
GetJSON-LD
representation of the providedRdfDataset
.FromRdfApi
loader(DocumentLoader loader)
Set the loader to be used to retrieve remote documents and contexts, implementing theDocumentLoader
.FromRdfApi
mode(JsonLdVersion processingMode)
SetJSON-LD
processing mode.FromRdfApi
nativeTypes()
FromRdfApi
nativeTypes(boolean useNativeTypes)
FromRdfApi
options(JsonLdOptions options)
Override an existing settings withJsonLdOptions
.FromRdfApi
ordered(boolean enable)
If set totrue
, certain algorithm processing steps are ordered lexicographically.
-
-
-
Field Detail
-
document
private final Document document
-
documentUri
private final java.net.URI documentUri
-
options
private JsonLdOptions options
-
-
Constructor Detail
-
FromRdfApi
public FromRdfApi(Document document)
-
FromRdfApi
public FromRdfApi(java.net.URI documentUri)
-
-
Method Detail
-
options
public FromRdfApi options(JsonLdOptions options)
Description copied from interface:CommonApi
Override an existing settings withJsonLdOptions
.- Specified by:
options
in interfaceCommonApi<FromRdfApi>
- Parameters:
options
-JsonLdOptions
- Returns:
- builder instance
-
mode
public FromRdfApi mode(JsonLdVersion processingMode)
Description copied from interface:CommonApi
SetJSON-LD
processing mode. JSON-LD 1.1 is set by default.- Specified by:
mode
in interfaceCommonApi<FromRdfApi>
- Parameters:
processingMode
- to set- Returns:
- builder instance
-
base
public FromRdfApi base(java.net.URI baseUri)
Description copied from interface:CommonApi
Set the baseIRI
. If set, this overrides the input document's IRI.- Specified by:
base
in interfaceCommonApi<FromRdfApi>
- Returns:
- builder instance
-
ordered
public FromRdfApi ordered(boolean enable)
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<FromRdfApi>
- Returns:
- builder instance
-
loader
public FromRdfApi loader(DocumentLoader 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<FromRdfApi>
- Returns:
- builder instance
-
nativeTypes
public FromRdfApi nativeTypes()
-
nativeTypes
public FromRdfApi nativeTypes(boolean useNativeTypes)
-
get
public jakarta.json.JsonArray get() throws JsonLdError
GetJSON-LD
representation of the providedRdfDataset
.- Returns:
JsonArray
representingJSON-LD
document- Throws:
JsonLdError
-
-