Class JsonLDDeserializer

java.lang.Object
org.spdx.v3jsonldstore.JsonLDDeserializer

public class JsonLDDeserializer extends Object
Class to manage deserializing SPDX 3.X JSON-LD
Author:
Gary O'Neall
  • Constructor Details

    • JsonLDDeserializer

      public JsonLDDeserializer(IModelStore modelStore)
      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 data
      net.jimblackler.jsonschemafriend.GenerationException - on errors with the JSON schemas