Package org.spdx.v3jsonldstore
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 TypeMethodDescriptionorg.spdx.core.TypedValuedeserializeElement(com.fasterxml.jackson.databind.JsonNode elementNode) Deserialize a single element into the modelStoreList<org.spdx.core.TypedValue>deserializeGraph(com.fasterxml.jackson.databind.JsonNode graph) Deserializes the JSON-LD graph into the modelStore
-
Constructor Details
-
JsonLDDeserializer
public JsonLDDeserializer(org.spdx.storage.IModelStore modelStore) - Parameters:
modelStore- Model store to deserialize the JSON text into
-
-
Method Details
-
deserializeGraph
public List<org.spdx.core.TypedValue> deserializeGraph(com.fasterxml.jackson.databind.JsonNode graph) throws org.spdx.core.InvalidSPDXAnalysisException Deserializes the JSON-LD graph into the modelStore- Parameters:
graph- Graph to deserialize- Returns:
- list of non-anonomous typed value Elements found in the graph nodes
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
deserializeElement
public org.spdx.core.TypedValue deserializeElement(com.fasterxml.jackson.databind.JsonNode elementNode) throws net.jimblackler.jsonschemafriend.GenerationException, org.spdx.core.InvalidSPDXAnalysisException Deserialize a single element into the modelStore- Parameters:
elementNode- element to deserialize- Returns:
- the typedValue of the deserialized object
- Throws:
org.spdx.core.InvalidSPDXAnalysisException- on invalid SPDX datanet.jimblackler.jsonschemafriend.GenerationException- on errors with the JSON schemas
-