Package org.spdx.library.model
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 Summary
Constructors Constructor Description SimpleUriValue(String uri)SimpleUriValue(IndividualUriValue fromIndividualValue) -
Method Summary
Modifier and Type Method Description booleanequals(Object comp)StringgetIndividualURI()static intgetIndividualUriValueHash(IndividualUriValue individualUri)returns hash based on URI of the IndividualUriValueinthashCode()static booleanisIndividualUriValueEquals(IndividualUriValue individualUri, Object comp)Compares an object to an individual URI and returns true if the URI values are equalObjecttoModelObject(IModelStore store, String documentUri, ModelCopyManager copyManager)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
-
Constructor Details
-
Method Details
-
getIndividualUriValueHash
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
Compares an object to an individual URI and returns true if the URI values are equal- Parameters:
individualUri- IndividualUriValue to comparecomp- Object to compare- Returns:
- true if the individualUri has the same URI as comp and comp is of type IndividualUriValue
-
getIndividualURI
- Specified by:
getIndividualURIin interfaceIndividualUriValue- Returns:
- a unique identifier for this value. Typically the namespace + the long name
-
toModelObject
public Object toModelObject(IModelStore store, String documentUri, ModelCopyManager copyManager) throws InvalidSPDXAnalysisExceptioninflate 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
-
hashCode
public int hashCode()
-