Package no.hasmac.jsonld
Class JsonLd
java.lang.Object
no.hasmac.jsonld.JsonLd
The
JsonLd
interface is the high-level programming structure
that developers use to access the JSON-LD transformation methods.
This class provides methods to process JSON-LD.
All the methods in this class are thread-safe.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
assertJsonDocument
(Document document, String param) private static URI
assertLocation
(String location, String param) private static void
assertNotNull
(Object value, String param) private static void
assertRdfDocument
(Document document, String param) private static void
static CompactionApi
Compacts the referenced document using the context.static CompactionApi
CompactsDocument
document using the context.static CompactionApi
Compacts the referenced document using the context.static CompactionApi
CompactsDocument
document using the context.static CompactionApi
Compacts the referenced document using the context.static CompactionApi
Compacts the referenced document using the context.static CompactionApi
CompactsDocument
document using the context.static CompactionApi
CompactsDocument
document using the context.static CompactionApi
CompactsDocument
document using the context.static ExpansionApi
Expands the referenced document.static ExpansionApi
Expands the referenced document.static ExpansionApi
Expands the provided remote document.static FlatteningApi
Flattens the given input and optionally compacts it using context.static FlatteningApi
Flattens the given input and optionally compacts it using context.static FlatteningApi
Flattens the remote input and optionally compacts it using context.static FramingApi
Frames the given remote input using remote frame.static FramingApi
Frames the remote input using given remote frame.static FramingApi
Frames the remote input using given local frame.static FramingApi
Frames the remote input using given remote frame.static FramingApi
Frames the given remote input using remote frame.static FramingApi
Frames the remote input using given local frame.static FramingApi
Frames the local document using given remote frame.static FramingApi
Frames the local document using given remote frame.static FramingApi
Frames the local document using given local frame.static FromRdfApi
Transforms the referenced N-Quads document into a JSON-LD document in expanded form.static FromRdfApi
Transforms the referenced N-Quads document into a JSON-LD document in expanded form.static FromRdfApi
TransformsDocument
into a JSON-LD document in expanded form.static ToRdfApi
Transforms the given input intoRdfDataset
.static ToRdfApi
Transforms the given input intoRdfDataset
.static ToRdfApi
TransformsDocument
intoRdfDataset
.
-
Field Details
-
DOCUMENT_LOCATION_PARAM_NAME
- See Also:
-
DOCUMENT_URI_PARAM_NAME
- See Also:
-
DOCUMENT_PARAM_NAME
- See Also:
-
CONTEXT_PARAM_NAME
- See Also:
-
FRAME_LOCATION_PARAM_NAME
- See Also:
-
FRAME_URI_PARAM_NAME
- See Also:
-
FRAME_PARAM_NAME
- See Also:
-
-
Constructor Details
-
JsonLd
private JsonLd()
-
-
Method Details
-
expand
Expands the referenced document.- Parameters:
documentLocation
-IRI
referencing JSON-LD document to expand- Returns:
ExpansionApi
allowing to set additional parameters
-
expand
Expands the referenced document.- Parameters:
documentUri
-URI
referencing JSON-LD document to expand- Returns:
ExpansionApi
allowing to set additional parameters
-
expand
Expands the provided remote document.- Parameters:
document
- to expand- Returns:
ExpansionApi
allowing to set additional parameters
-
compact
Compacts the referenced document using the context.- Parameters:
documentLocation
-IRI
referencing JSON-LD document to compactcontextLocation
-IRI
referencing the context to use when compacting the document- Returns:
CompactionApi
allowing to set additional parameters
-
compact
Compacts the referenced document using the context.- Parameters:
documentUri
-URI
referencing JSON-LD document to compactcontextUri
-URI
referencing the context to use when compacting the document- Returns:
CompactionApi
allowing to set additional parameters
-
compact
Compacts the referenced document using the context.- Parameters:
documentLocation
-IRI
referencing JSON-LD document to compactcontext
-Document
representing the context orJsonArray
consisting ofJsonObject
andJsonString
referencing the context to use when compacting the document- Returns:
CompactionApi
allowing to set additional parameters
-
compact
Compacts the referenced document using the context.- Parameters:
documentUri
-URI
referencing JSON-LD document to compactcontext
-Document
representing the context orJsonArray
consisting of one or manyJsonObject
andJsonString
referencing the context to use when compacting the document- Returns:
CompactionApi
allowing to set additional parameters
-
compact
CompactsDocument
document using the context.- Parameters:
document
- to compactcontext
- JSON-LD document- Returns:
CompactionApi
allowing to set additional parameters
-
compact
CompactsDocument
document using the context.- Parameters:
document
- to compactcontextLocation
-IRI
referencing the context to use when compacting the document- Returns:
CompactionApi
allowing to set additional parameters
-
compact
CompactsDocument
document using the context.- Parameters:
document
- to compactcontextUri
-URI
referencing the context to use when compacting the document- Returns:
CompactionApi
allowing to set additional parameters
-
compact
CompactsDocument
document using the context.- Parameters:
documentLocation
-IRI
referencing JSON-LD document to compactcontextUri
-URI
referencing the context to use when compacting the document- Returns:
CompactionApi
allowing to set additional parameters
-
compact
CompactsDocument
document using the context.- Parameters:
documentUri
-URI
referencing JSON-LD document to compactcontextLocation
-IRI
referencing the context to use when compacting the document- Returns:
CompactionApi
allowing to set additional parameters
-
flatten
Flattens the given input and optionally compacts it using context.- Parameters:
documentLocation
-IRI
referencing JSON-LD document to flatten- Returns:
FlatteningApi
allowing to set additional parameters
-
flatten
Flattens the given input and optionally compacts it using context.- Parameters:
documentUri
-URI
referencing JSON-LD document to flatten- Returns:
FlatteningApi
allowing to set additional parameters
-
flatten
Flattens the remote input and optionally compacts it using context.- Parameters:
document
- to flatten- Returns:
FlatteningApi
allowing to set additional parameters
-
frame
Frames the given remote input using remote frame.- Parameters:
documentUri
-URI
referencing JSON-LD document to frameframeUri
-URI
referencing JSON-LD frame- Returns:
FramingApi
allowing to set additional parameters
-
frame
Frames the given remote input using remote frame.- Parameters:
documentLocation
-IRI
referencing JSON-LD document to frameframeLocation
-IRI
referencing JSON-LD frame- Returns:
FramingApi
allowing to set additional parameters
-
frame
Frames the local document using given local frame.- Parameters:
document
- to frameframe
- JSON-LD definition- Returns:
FramingApi
allowing to set additional parameters
-
frame
Frames the local document using given remote frame.- Parameters:
document
- to frameframeLocation
-IRI
referencing JSON-LD frame- Returns:
FramingApi
allowing to set additional parameters
-
frame
Frames the local document using given remote frame.- Parameters:
document
- to frameframeUri
-URI
referencing JSON-LD frame- Returns:
FramingApi
allowing to set additional parameters
-
frame
Frames the remote input using given local frame.- Parameters:
documentLocation
-IRI
referencing JSON-LD document to frameframe
- JSON-LD definition- Returns:
FramingApi
allowing to set additional parameters
-
frame
Frames the remote input using given remote frame.- Parameters:
documentLocation
-IRI
referencing JSON-LD document to frameframeUri
-URI
referencing JSON-LD frame- Returns:
FramingApi
allowing to set additional parameters
-
frame
Frames the remote input using given local frame.- Parameters:
documentUri
-URI
referencing JSON-LD document to frameframe
- JSON-LD definition- Returns:
FramingApi
allowing to set additional parameters
-
frame
Frames the remote input using given remote frame.- Parameters:
documentUri
-URI
referencing JSON-LD document to frameframeLocation
-IRI
referencing JSON-LD frame- Returns:
FramingApi
allowing to set additional parameters
-
toRdf
Transforms the given input intoRdfDataset
.- Parameters:
documentLocation
-IRI
referencing JSON-LD document to transform- Returns:
ToRdfApi
allowing to set additional parameters
-
toRdf
Transforms the given input intoRdfDataset
.- Parameters:
documentUri
-URI
referencing JSON-LD document to transform- Returns:
ToRdfApi
allowing to set additional parameters
-
toRdf
TransformsDocument
intoRdfDataset
.- Parameters:
document
- to transform- Returns:
ToRdfApi
allowing to set additional parameters
-
fromRdf
Transforms the referenced N-Quads document into a JSON-LD document in expanded form.- Parameters:
documentLocation
-URI
referencing N-Quads document to expand- Returns:
FromRdfApi
allowing to set additional parameters
-
fromRdf
Transforms the referenced N-Quads document into a JSON-LD document in expanded form.- Parameters:
documentUri
-URI
referencing N-Quads document to expand- Returns:
FromRdfApi
allowing to set additional parameters
-
fromRdf
TransformsDocument
into a JSON-LD document in expanded form.- Parameters:
document
- to transform- Returns:
FromRdfApi
allowing to set additional parameters
-
assertLocation
-
assertUri
-
assertJsonDocument
-
assertRdfDocument
-
assertNotNull
-