Package org.spdx.rdfparser.referencetype
Class ReferenceType
java.lang.Object
org.spdx.rdfparser.model.RdfModelObject
org.spdx.rdfparser.referencetype.ReferenceType
- All Implemented Interfaces:
Cloneable,Comparable<ReferenceType>,IRdfModel
public class ReferenceType extends RdfModelObject implements Comparable<ReferenceType>
Type of external reference
Note that there are very few required fields for this class in that
the external reference type does not need to be provided in the SPDX
document for the document to be valid.
- Author:
- Gary O'Neall
-
Field Summary
Fields inherited from class org.spdx.rdfparser.model.RdfModelObject
model, modelContainer, node, refreshOnGet, resource -
Constructor Summary
Constructors Constructor Description ReferenceType(URI uri, String contextualExample, URL documentation, URL externalReferenceSite)Create a reference type from basic valuesReferenceType(IModelContainer modelContainer, org.apache.jena.graph.Node node) -
Method Summary
Modifier and Type Method Description ReferenceTypeclone()intcompareTo(ReferenceType o)booleanequivalent(IRdfModel compare)Returns true if the compare object contains properties which would be equal if they were contained in the same RDF ModelStringgetContextualExample()URLgetDocumentation()URLgetExternalReferenceSite()voidgetPropertiesFromModel()Fetch all of the properties from the model and populate the local Java propertiesURIgetReferenceTypeUri()org.apache.jena.rdf.model.ResourcegetType(org.apache.jena.rdf.model.Model model)StringgetUri(IModelContainer modelContainer)Get the URI for this RDF object.voidpopulateModel()Populate the RDF model from the Java propertiesvoidsetContextualExample(String contextualExample)voidsetDocumentation(URL documentation)voidsetExternalReferenceSite(URL externalReferenceSite)voidsetReferenceTypeUri(URI referenceTypeUri)StringtoString()List<String>verify()Methods inherited from class org.spdx.rdfparser.model.RdfModelObject
addPropertyUriValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, arraysEquivalent, createResource, createResource, equals, equivalentConsideringNull, findAnnotationPropertyValues, findAnyLicenseInfoPropertyValue, findAnyLicenseInfoPropertyValues, findChecksumPropertyValue, findCreationInfoPropertyValue, findDuplicateResource, findElementPropertyValue, findExternalDocRefPropertyValues, findExternalDocRefPropertyValues, findExternalRefPropertyValues, findIntPropertyValue, findMultipleChecksumPropertyValues, findMultipleDoapPropertyValues, findMultipleElementPropertyValues, findMultiplePropertyValues, findReferenceTypePropertyValue, findRelationshipPropertyValues, findReviewPropertyValues, findSinglePointerPropertyValue, findSinglePropertyValue, findStartEndPointerPropertyValues, findUriPropertyValue, findUriPropertyValues, findVerificationCodePropertyValue, getNode, hashCode, isRefreshOnGet, removePropertyValue, resourcesEqual, setMultipleObjectsForSameNode, setPropertyUriValue, setPropertyUriValues, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setSingleObjectForSameNode
-
Constructor Details
-
ReferenceType
public ReferenceType(URI uri, String contextualExample, URL documentation, URL externalReferenceSite) throws InvalidSPDXAnalysisExceptionCreate a reference type from basic values- Parameters:
uri- Unique resource identifier for the reference type resourcecontextualExample- Example for the reference typedocumentation- URL pointing to documentationexternalReferenceSite- URL pointing to the reference site- Throws:
InvalidSPDXAnalysisException
-
ReferenceType
public ReferenceType(IModelContainer modelContainer, org.apache.jena.graph.Node node) throws InvalidSPDXAnalysisException- Parameters:
modelContainer-object-- Throws:
InvalidSPDXAnalysisException
-
-
Method Details
-
verify
-
equivalent
Description copied from interface:IRdfModelReturns true if the compare object contains properties which would be equal if they were contained in the same RDF Model- Specified by:
equivalentin interfaceIRdfModel- Returns:
-
getContextualExample
- Returns:
- the contextualExample
- Throws:
InvalidSPDXAnalysisException
-
setContextualExample
- Parameters:
contextualExample- the contextualExample to set- Throws:
InvalidSPDXAnalysisException
-
getDocumentation
- Returns:
- the documentation
- Throws:
InvalidSPDXAnalysisException
-
setDocumentation
- Parameters:
documentation- the documentation to set- Throws:
InvalidSPDXAnalysisException
-
getExternalReferenceSite
- Returns:
- the externalReferenceSite
- Throws:
InvalidSPDXAnalysisException
-
setExternalReferenceSite
public void setExternalReferenceSite(URL externalReferenceSite) throws InvalidSPDXAnalysisException- Parameters:
externalReferenceSite- the externalReferenceSite to set- Throws:
InvalidSPDXAnalysisException
-
getReferenceTypeUri
- Returns:
- the referenceTypeUri
-
setReferenceTypeUri
- Parameters:
referenceTypeUri- the referenceTypeUri to set
-
getPropertiesFromModel
Description copied from class:RdfModelObjectFetch all of the properties from the model and populate the local Java properties- Specified by:
getPropertiesFromModelin classRdfModelObject- Throws:
InvalidSPDXAnalysisException
-
getUri
Description copied from class:RdfModelObjectGet the URI for this RDF object. Null if this is for an anonomous node.- Specified by:
getUriin classRdfModelObject- Returns:
- Throws:
InvalidSPDXAnalysisException
-
getType
public org.apache.jena.rdf.model.Resource getType(org.apache.jena.rdf.model.Model model)- Specified by:
getTypein classRdfModelObject- Returns:
- the RDF class name for the object
-
populateModel
Description copied from class:RdfModelObjectPopulate the RDF model from the Java properties- Specified by:
populateModelin classRdfModelObject- Throws:
InvalidSPDXAnalysisException
-
compareTo
- Specified by:
compareToin interfaceComparable<ReferenceType>
-
toString
-
clone
-