Class SimpleUriValue

java.lang.Object
org.spdx.library.model.SimpleUriValue
All Implemented Interfaces:
IndividualUriValue
Direct Known Subclasses:
ReferenceType

public class SimpleUriValue extends Object implements IndividualUriValue
Simple class to just store a URI value. The method toModelObject will convert / inflate the value back to either an Enum (if the URI matches), an ExternalSpdxElement if it matches the pattern of an external SPDX element or returns itself otherwise
Author:
Gary O'Neall
  • Constructor Details

  • Method Details

    • getIndividualUriValueHash

      public static int getIndividualUriValueHash(IndividualUriValue individualUri)
      returns hash based on URI of the IndividualUriValue
      Parameters:
      individualUri - IndividualUriValue to obtain a hash from
      Returns:
      hash based on URI of the IndividualUriValue
    • isIndividualUriValueEquals

      public static boolean isIndividualUriValueEquals(IndividualUriValue individualUri, Object comp)
      Compares an object to an individual URI and returns true if the URI values are equal
      Parameters:
      individualUri - IndividualUriValue to compare
      comp - Object to compare
      Returns:
      true if the individualUri has the same URI as comp and comp is of type IndividualUriValue
    • getIndividualURI

      public String getIndividualURI()
      Specified by:
      getIndividualURI in interface IndividualUriValue
      Returns:
      a unique identifier for this value. Typically the namespace + the long name
    • toModelObject

      public Object toModelObject(IModelStore store, String documentUri, ModelCopyManager copyManager) throws InvalidSPDXAnalysisException
      inflate the value back to either an Enum (if the URI matches), an ExternalSpdxElement if it matches the pattern of an external SPDX element or returns itself otherwise
      Parameters:
      store -
      documentUri -
      copyManager - if non-null, implicitly copy any referenced properties from other model stores
      Returns:
      Enum, ExternalSpdxElement or itself depending on the pattern
      Throws:
      InvalidSPDXAnalysisException
    • equals

      public boolean equals(Object comp)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object