Package org.spdx.rdfparser.model
Class Annotation
java.lang.Object
org.spdx.rdfparser.model.RdfModelObject
org.spdx.rdfparser.model.Annotation
- All Implemented Interfaces:
Cloneable
,Comparable<Annotation>
,IRdfModel
public class Annotation extends RdfModelObject implements Comparable<Annotation>
An Annotation is a comment on an SpdxItem by an agent.
- Author:
- Gary O'Neall
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Annotation.AnnotationType
-
Field Summary
Fields Modifier and Type Field Description static Map<Annotation.AnnotationType,String>
ANNOTATION_TYPE_TO_TAG
Deprecated.static Map<String,Annotation.AnnotationType>
TAG_TO_ANNOTATION_TYPE
Deprecated.Fields inherited from class org.spdx.rdfparser.model.RdfModelObject
model, modelContainer, node, refreshOnGet, resource
-
Constructor Summary
Constructors Constructor Description Annotation(String annotator, Annotation.AnnotationType annotationType, String date, String comment)
Annotation(IModelContainer modelContainer, org.apache.jena.graph.Node annotationNode)
-
Method Summary
Modifier and Type Method Description Annotation
clone()
int
compareTo(Annotation o)
boolean
equivalent(IRdfModel o)
Returns true if the compare object contains properties which would be equal if they were contained in the same RDF ModelString
getAnnotationDate()
Annotation.AnnotationType
getAnnotationType()
String
getAnnotationTypeTag()
String
getAnnotator()
String
getComment()
void
getPropertiesFromModel()
Fetch all of the properties from the model and populate the local Java propertiesorg.apache.jena.rdf.model.Resource
getType(org.apache.jena.rdf.model.Model model)
String
getUri(IModelContainer modelContainer)
Get the URI for this RDF object.void
populateModel()
Populate the model from the propertiesvoid
setAnnotationDate(String date)
void
setAnnotationType(Annotation.AnnotationType annotationType)
void
setAnnotator(String annotator)
void
setComment(String comment)
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, findMultipleCrossRefPropertyValues, 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, SetPropertyValue, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setSingleObjectForSameNode
-
Field Details
-
ANNOTATION_TYPE_TO_TAG
Deprecated. -
TAG_TO_ANNOTATION_TYPE
Deprecated.
-
-
Constructor Details
-
Annotation
public Annotation(String annotator, Annotation.AnnotationType annotationType, String date, String comment) -
Annotation
public Annotation(IModelContainer modelContainer, org.apache.jena.graph.Node annotationNode) throws InvalidSPDXAnalysisException- Throws:
InvalidSPDXAnalysisException
-
-
Method Details
-
getPropertiesFromModel
Description copied from class:RdfModelObject
Fetch all of the properties from the model and populate the local Java properties- Specified by:
getPropertiesFromModel
in classRdfModelObject
- Throws:
InvalidSPDXAnalysisException
-
getType
public org.apache.jena.rdf.model.Resource getType(org.apache.jena.rdf.model.Model model)- Specified by:
getType
in classRdfModelObject
- Returns:
- the RDF class name for the object
-
populateModel
Populate the model from the properties- Specified by:
populateModel
in classRdfModelObject
- Throws:
InvalidSPDXAnalysisException
-
verify
-
getAnnotationType
- Returns:
- the annotationType
-
setAnnotationType
public void setAnnotationType(Annotation.AnnotationType annotationType) throws InvalidSPDXAnalysisException- Parameters:
annotationType
- the annotationType to set- Throws:
InvalidSPDXAnalysisException
-
getAnnotator
- Returns:
- the annotator
-
setAnnotator
- Parameters:
annotator
- the annotator to set
-
getComment
- Returns:
- the comment
-
setComment
- Parameters:
comment
- the comment to set
-
getAnnotationDate
- Returns:
- the date
-
setAnnotationDate
- Parameters:
date
- the date to set- Throws:
InvalidSPDXAnalysisException
-
getUri
Description copied from class:RdfModelObject
Get the URI for this RDF object. Null if this is for an anonomous node.- Specified by:
getUri
in classRdfModelObject
- Returns:
-
clone
-
equivalent
Description copied from interface:IRdfModel
Returns true if the compare object contains properties which would be equal if they were contained in the same RDF Model- Specified by:
equivalent
in interfaceIRdfModel
- Returns:
-
getAnnotationTypeTag
- Returns:
- The tag value of the annotation type
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Annotation>
-