Class JsonLDDeserializer
java.lang.Object
org.spdx.v3jsonldstore.JsonLDDeserializer
Class to manage deserializing SPDX 3.X JSON-LD
- Author:
- Gary O'Neall
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserializeElement(com.fasterxml.jackson.databind.JsonNode elementNode) Deserialize a single element into the modelStoredeserializeGraph(com.fasterxml.jackson.databind.JsonNode graph) Deserializes the JSON-LD graph into the modelStore
-
Constructor Details
-
JsonLDDeserializer
- Parameters:
modelStore- Model store to deserialize the JSON text into
-
-
Method Details
-
deserializeGraph
public List<TypedValue> deserializeGraph(com.fasterxml.jackson.databind.JsonNode graph) throws InvalidSPDXAnalysisException Deserializes the JSON-LD graph into the modelStore- Parameters:
graph- Graph to deserialize- Returns:
- list of non-anonymous typed value Elements found in the graph nodes
- Throws:
InvalidSPDXAnalysisException- on SPDX parsing errors
-
deserializeElement
public TypedValue deserializeElement(com.fasterxml.jackson.databind.JsonNode elementNode) throws net.jimblackler.jsonschemafriend.GenerationException, InvalidSPDXAnalysisException Deserialize a single element into the modelStore- Parameters:
elementNode- element to deserialize- Returns:
- the typedValue of the deserialized object
- Throws:
InvalidSPDXAnalysisException- on invalid SPDX datanet.jimblackler.jsonschemafriend.GenerationException- on errors with the JSON schemas
-