Class CrossRef
- java.lang.Object
-
- org.spdx.core.CoreModelObject
-
- org.spdx.library.model.v2.ModelObjectV2
-
- org.spdx.library.model.v2.license.CrossRef
-
public class CrossRef extends ModelObjectV2
Cross reference details for the a URL reference- Author:
- Gary O'Neall
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CrossRef.CrossRefBuilder
Builder class for creating instances ofCrossRef
-
Field Summary
-
Fields inherited from class org.spdx.library.model.v2.ModelObjectV2
LATEST_SPDX_2_VERSION
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<String>
_verify(Set<String> verifiedIds, String specVersion)
Implementation of the specific verifications for this model objectOptional<Boolean>
getIsWayBackLink()
Optional<Boolean>
getLive()
Optional<String>
getMatch()
Optional<Integer>
getOrder()
Optional<String>
getTimestamp()
String
getType()
Optional<String>
getUrl()
Optional<Boolean>
getValid()
void
setDetails(Boolean isValid, Boolean isLive, Boolean isWayBackLink, String match, String timestamp)
Convenience method for setting details related to the URL checkingvoid
setIsWayBackLink(Boolean isWayBackLink)
void
setLive(Boolean isLive)
void
setMatch(String match)
void
setOrder(Integer order)
void
setTimestamp(String timestamp)
void
setUrl(String url)
void
setValid(Boolean isValid)
String
toString()
-
Methods inherited from class org.spdx.library.model.v2.ModelObjectV2
_verify, createAnnotation, createByteOffsetPointer, createChecksum, createConjunctiveLicenseSet, createCreationInfo, createCrossRef, createDisjunctiveLicenseSet, createExternalDocumentRef, createExternalRef, createExtractedLicense, createLineCharPointer, createPackage, createPackageVerificationCode, createRelationship, createSpdxFile, createSpdxSnippet, createStartEndPointer, equals, getAnyLicenseInfoPropertyValue, getDocumentUri, getElementPropertyValue, getId, hashCode, isEquivalentToNull, isNoAssertion, isRelatedElement, toTypedValue, verify
-
Methods inherited from class org.spdx.core.CoreModelObject
addPropertyValueToCollection, clearValueCollection, clone, copyFrom, enterCriticalSection, equivalent, equivalent, getBooleanPropertyValue, getCopyManager, getDoublePropertyValue, getEnumPropertyValue, getIdPrefix, getIntegerPropertyValue, getModelStore, getObjectPropertyValue, getObjectPropertyValue, getObjectPropertyValueCollection, getObjectPropertyValueSet, getObjectUri, getPropertyValueDescriptors, getSpecVersion, getStringCollection, getStringPropertyValue, isCollectionMembersAssignableTo, isExternal, isStrict, leaveCriticalSection, removeProperty, removePropertyValueFromCollection, setCopyManager, setIdPrefix, setPropertyValue, setStrict, updateAddPropertyValueToCollection, updateClearValueCollection, updatePropertyValue, updateRemoveProperty, updateRemovePropertyValueFromCollection, verify, verify, verifyCollection
-
-
-
-
Constructor Detail
-
CrossRef
public CrossRef() throws org.spdx.core.InvalidSPDXAnalysisException
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
CrossRef
public CrossRef(String id) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
id
- identifier- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
CrossRef
public CrossRef(org.spdx.storage.IModelStore modelStore, String documentUri, String id, org.spdx.core.IModelCopyManager copyManager, boolean create) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
modelStore
- container which includes the model datadocumentUri
- URI for the SPDX document containing the model dataid
- identifiercopyManager
- if non-null, allows for copying of any properties set which use other model stores or document URI'screate
- if true, create the license if it does not exist- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
CrossRef
protected CrossRef(CrossRef.CrossRefBuilder builder) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
builder
- Builder to build the file- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
-
Method Detail
-
getType
public String getType()
- Specified by:
getType
in classorg.spdx.core.CoreModelObject
-
_verify
protected List<String> _verify(Set<String> verifiedIds, String specVersion)
Description copied from class:ModelObjectV2
Implementation of the specific verifications for this model object- Specified by:
_verify
in classModelObjectV2
- Parameters:
verifiedIds
- list of all Element Id's which have already been verified - prevents infinite recursionspecVersion
- Version of the SPDX spec to verify against- Returns:
- Any verification errors or warnings associated with this object
-
getMatch
public Optional<String> getMatch() throws org.spdx.core.InvalidSPDXAnalysisException
- Returns:
- the match
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
setMatch
public void setMatch(@Nullable String match) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
match
- the match to set- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
getUrl
public Optional<String> getUrl() throws org.spdx.core.InvalidSPDXAnalysisException
- Returns:
- the url
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
setUrl
public void setUrl(String url) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
url
- the url to set- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
getValid
public Optional<Boolean> getValid() throws org.spdx.core.InvalidSPDXAnalysisException
- Returns:
- the isValid
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
setValid
public void setValid(@Nullable Boolean isValid) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
isValid
- the isValid to set- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
getLive
public Optional<Boolean> getLive() throws org.spdx.core.InvalidSPDXAnalysisException
- Returns:
- the isLive
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
setLive
public void setLive(Boolean isLive) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
isLive
- the isLive to set- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
getTimestamp
public Optional<String> getTimestamp() throws org.spdx.core.InvalidSPDXAnalysisException
- Returns:
- the timestamp
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
setTimestamp
public void setTimestamp(String timestamp) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
timestamp
- the timestamp to set- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
getIsWayBackLink
public Optional<Boolean> getIsWayBackLink() throws org.spdx.core.InvalidSPDXAnalysisException
- Returns:
- the isWayBackLink
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
setIsWayBackLink
public void setIsWayBackLink(Boolean isWayBackLink) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
isWayBackLink
- the isWayBackLink to set- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
getOrder
public Optional<Integer> getOrder() throws org.spdx.core.InvalidSPDXAnalysisException
- Returns:
- the order
- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
setOrder
public void setOrder(Integer order) throws org.spdx.core.InvalidSPDXAnalysisException
- Parameters:
order
- the order to set- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
setDetails
public void setDetails(@Nullable Boolean isValid, @Nullable Boolean isLive, @Nullable Boolean isWayBackLink, @Nullable String match, @Nullable String timestamp) throws org.spdx.core.InvalidSPDXAnalysisException
Convenience method for setting details related to the URL checking- Parameters:
isValid
-isLive
-isWayBackLink
-match
-timestamp
-- Throws:
org.spdx.core.InvalidSPDXAnalysisException
-
toString
public String toString()
- Overrides:
toString
in classModelObjectV2
-
-