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 classAnnotation.AnnotationType -
Field Summary
Fields Modifier and Type Field Description static Map<Annotation.AnnotationType,String>ANNOTATION_TYPE_TO_TAGDeprecated.static Map<String,Annotation.AnnotationType>TAG_TO_ANNOTATION_TYPEDeprecated.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 Annotationclone()intcompareTo(Annotation o)booleanequivalent(IRdfModel o)Returns true if the compare object contains properties which would be equal if they were contained in the same RDF ModelStringgetAnnotationDate()Annotation.AnnotationTypegetAnnotationType()StringgetAnnotationTypeTag()StringgetAnnotator()StringgetComment()voidgetPropertiesFromModel()Fetch all of the properties from the model and populate the local Java propertiesorg.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 model from the propertiesvoidsetAnnotationDate(String date)voidsetAnnotationType(Annotation.AnnotationType annotationType)voidsetAnnotator(String annotator)voidsetComment(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:RdfModelObjectFetch all of the properties from the model and populate the local Java properties- Specified by:
getPropertiesFromModelin classRdfModelObject- 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
Populate the model from the properties- Specified by:
populateModelin 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:RdfModelObjectGet the URI for this RDF object. Null if this is for an anonomous node.- Specified by:
getUriin classRdfModelObject- Returns:
-
clone
-
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:
-
getAnnotationTypeTag
- Returns:
- The tag value of the annotation type
-
compareTo
- Specified by:
compareToin interfaceComparable<Annotation>
-