public class JsonLdProcessor
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.Map<java.lang.String,java.lang.Object> |
compact(java.lang.Object input,
java.lang.Object context,
JsonLdOptions opts)
Compacts the given input using the context according to the steps in the
Compaction algorithm.
|
static java.util.List<java.lang.Object> |
expand(java.lang.Object input)
Expands the given input according to the steps in the
Expansion
algorithm, using the default
JsonLdOptions. |
static java.util.List<java.lang.Object> |
expand(java.lang.Object input,
JsonLdOptions opts)
Expands the given input according to the steps in the
Expansion
algorithm.
|
static java.util.Map<java.lang.String,java.lang.Object> |
frame(java.lang.Object input,
java.lang.Object frame,
JsonLdOptions opts)
Frames the given input using the frame according to the steps in the
Framing Algorithm.
|
static java.lang.Object |
fromRDF(java.lang.Object dataset)
Converts an RDF dataset to JSON-LD, using the default
JsonLdOptions. |
static java.lang.Object |
fromRDF(java.lang.Object dataset,
JsonLdOptions options)
Converts an RDF dataset to JSON-LD.
|
static java.lang.Object |
fromRDF(java.lang.Object input,
RDFParser parser)
Converts an RDF dataset to JSON-LD, using a specific instance of
RDFParser, and the default JsonLdOptions. |
static java.lang.Object |
normalize(java.lang.Object input)
Performs RDF dataset normalization on the given JSON-LD input.
|
static void |
registerRDFParser(java.lang.String format,
RDFParser parser) |
static void |
removeRDFParser(java.lang.String format) |
static java.lang.Object |
toRDF(java.lang.Object input)
Outputs the RDF dataset found in the given JSON-LD object, using the
default
JsonLdOptions. |
static java.lang.Object |
toRDF(java.lang.Object input,
JsonLdTripleCallback callback)
Outputs the RDF dataset found in the given JSON-LD object, using the
default
JsonLdOptions. |
public static java.util.Map<java.lang.String,java.lang.Object> compact(java.lang.Object input,
java.lang.Object context,
JsonLdOptions opts)
throws JsonLdError
input - The input JSON-LD object.context - The context object to use for the compaction algorithm.opts - The JsonLdOptions that are to be sent to the
compaction algorithm.JsonLdError - If there is an error while compacting.public static java.util.List<java.lang.Object> expand(java.lang.Object input,
JsonLdOptions opts)
throws JsonLdError
input - The input JSON-LD object.opts - The JsonLdOptions that are to be sent to the expansion
algorithm.JsonLdError - If there is an error while expanding.public static java.util.List<java.lang.Object> expand(java.lang.Object input)
throws JsonLdError
JsonLdOptions.input - The input JSON-LD object.JsonLdError - If there is an error while expanding.public static java.util.Map<java.lang.String,java.lang.Object> frame(java.lang.Object input,
java.lang.Object frame,
JsonLdOptions opts)
throws JsonLdError
input - The input JSON-LD object.frame - The frame to use when re-arranging the data of input; either
in the form of an JSON object or as IRI.opts - The JsonLdOptions that are to be sent to the framing
algorithm.JsonLdError - If there is an error while framing.public static void registerRDFParser(java.lang.String format,
RDFParser parser)
public static void removeRDFParser(java.lang.String format)
public static java.lang.Object fromRDF(java.lang.Object dataset,
JsonLdOptions options)
throws JsonLdError
dataset - a serialized string of RDF in a format specified by the format
option or an RDF dataset to convert.options - the options to use: [format] the format if input is not an
array: 'application/nquads' for N-Quads (default).
[useRdfType] true to use rdf:type, false to use @type
(default: false). [useNativeTypes] true to convert XSD types
into native types (boolean, integer, double), false not to
(default: true).JsonLdError - If there is an error converting the dataset to JSON-LD.public static java.lang.Object fromRDF(java.lang.Object dataset)
throws JsonLdError
JsonLdOptions.dataset - a serialized string of RDF in a format specified by the format
option or an RDF dataset to convert.JsonLdError - If there was an error converting from RDF to JSON-LDpublic static java.lang.Object fromRDF(java.lang.Object input,
RDFParser parser)
throws JsonLdError
RDFParser, and the default JsonLdOptions.input - a serialized string of RDF in a format specified by the format
option or an RDF dataset to convert.parser - A specific instance of RDFParser to use for the
conversion.JsonLdError - If there is an error converting the dataset to JSON-LD.public static java.lang.Object toRDF(java.lang.Object input,
JsonLdTripleCallback callback)
throws JsonLdError
JsonLdOptions.input - the JSON-LD input.callback - A callback that is called when the input has been converted to
Quads (null to use options.format instead).JsonLdError - If there is an error converting the dataset to JSON-LD.public static java.lang.Object toRDF(java.lang.Object input)
throws JsonLdError
JsonLdOptions.input - the JSON-LD input.JsonLdError - If there is an error converting the dataset to JSON-LD.public static java.lang.Object normalize(java.lang.Object input)
throws JsonLdError
JsonLdOptions.input - the JSON-LD input to normalize.JsonLdError - If there is an error normalizing the dataset.