public class Annotation extends Object implements Comparable<Annotation>
Constructor and Description |
---|
Annotation(QName qName,
boolean literal)
Constructs an annotation using the given qName and the boolean type literal.
|
Annotation(QName qName,
double literal)
Constructs an annotation using the given qName and the double type literal.
|
Annotation(QName qName,
int literal)
Constructs an annotation using the given qName and the integer type literal.
|
Annotation(QName qName,
String literal)
Constructs an annotation using the given qName and the string type literal.
|
Annotation(QName qName,
URI literal)
Constructs an annotation using the given qName and the
URI type literal. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Annotation annotation) |
Annotation |
createAnnotation(QName qName,
QName nestedQName,
String nestedId,
List<Annotation> annotations)
Creates an annotation with nested annotations using the given arguments, and then adds to this instance's list of annotations.
|
boolean |
equals(Object obj) |
List<Annotation> |
getAnnotations()
Returns the list of Annotations of the nested value property.
|
Boolean |
getBooleanValue()
Returns a Boolean representation of the value property.
|
Double |
getDoubleValue()
Returns a Double representation of the value property.
|
Integer |
getIntegerValue()
Returns an Integer representation of the value property.
|
URI |
getNestedIdentity()
Returns the nested identity URI of the nested Annotation.
|
QName |
getNestedQName()
Returns the nested QName of the nested Annotation.
|
QName |
getQName()
Returns the QName of this Annotation instance.
|
String |
getStringValue()
Returns a string representation of the value property.
|
URI |
getURIValue()
Returns a URI representation of the value property.
|
int |
hashCode() |
boolean |
isBooleanValue()
Checks if the annotation has a boolean value property.
|
boolean |
isDoubleValue()
Checks if the annotation has a double value property.
|
boolean |
isIntegerValue()
Checks if the annotation has an integer value property.
|
boolean |
isNestedAnnotations()
Checks if the annotation has a nested value property.
|
boolean |
isStringValue()
Checks if the annotation has a string value property.
|
boolean |
isURIValue()
Checks if the annotation is a URI
value property. |
void |
setAnnotations(List<Annotation> annotations)
Sets the list of Annotations of the nested value property.
|
void |
setBooleanValue(boolean literal)
Sets the boolean representation of the value property.
|
void |
setDoubleValue(double literal)
Sets the double representation of the value property.
|
void |
setIntegerValue(int literal)
Sets the integer representation of the value property.
|
void |
setNestedIdentity(URI uri)
Sets the nested URI for this annotation.
|
void |
setNestedQName(QName qName)
Sets the nested QName for this annotation.
|
void |
setQName(QName qName)
Sets the QName of this annotation.
|
void |
setStringValue(String literal)
Sets the string representation of the value property.
|
void |
setURIValue(URI literal)
Sets the string representation of the value property.
|
String |
toString() |
public Annotation(QName qName, String literal) throws SBOLValidationException
qName
- the QName of this annotationliteral
- a string type valueSBOLValidationException
- if any of the following SBOL validation rules was violated:
12201, 12203public Annotation(QName qName, int literal) throws SBOLValidationException
qName
- the QName of this annotationliteral
- an integer type valueSBOLValidationException
- if any of the following SBOL validation rules was violated:
12201, 12203public Annotation(QName qName, double literal) throws SBOLValidationException
qName
- the QName of this annotationliteral
- a double type valueSBOLValidationException
- if any of the following SBOL validation rules was violated:
12201, 12203public Annotation(QName qName, boolean literal) throws SBOLValidationException
qName
- the QName of this annotationliteral
- a boolean type valueSBOLValidationException
- if any of the following SBOL validation rules was violated:
12201, 12203public Annotation(QName qName, URI literal) throws SBOLValidationException
URI
type literal.qName
- the QName of this annotationliteral
- a URI type valueSBOLValidationException
- if any of the following SBOL validation rules was violated:
12201, 12203public Annotation createAnnotation(QName qName, QName nestedQName, String nestedId, List<Annotation> annotations) throws SBOLValidationException
qName
- the QName of the annotation to be creatednestedQName
- the QName of the nested annotationnestedId
- the id for the nested annotationannotations
- the list of annotations used to construct the nested annotationSBOLValidationException
- if any of the following SBOL validation rules was violated:
10401, 10501, 10701, 10801, 10901, 11101, 11201, 11301, 11401, 11501, 11601, 11701, 11801, 11901, 12001, 12101, 12301.public int compareTo(Annotation annotation)
compareTo
in interface Comparable<Annotation>
public QName getQName()
public void setQName(QName qName) throws SBOLValidationException
qName
- the QName for this annotation.SBOLValidationException
- if any of the following SBOL validation rules was violated:
12201public void setBooleanValue(boolean literal)
literal
- the boolean representation of the value propertypublic boolean isBooleanValue()
true
if the value property is a boolean, false
otherwise.public Boolean getBooleanValue()
null
otherwise.public void setDoubleValue(double literal)
literal
- the double representation of the value propertypublic boolean isDoubleValue()
false
otherwisepublic Double getDoubleValue()
null
otherwise.public void setIntegerValue(int literal)
literal
- the integer representation of the value propertypublic boolean isIntegerValue()
true
if the value property is an integer, false
otherwisepublic Integer getIntegerValue()
null
otherwise.public void setStringValue(String literal) throws SBOLValidationException
literal
- the string representation of the value propertySBOLValidationException
- if any of the following SBOL validation rules was violated:
12203public boolean isStringValue()
false
otherwisepublic String getStringValue()
null
otherwise.public void setURIValue(URI literal) throws SBOLValidationException
literal
- the URI representation of the value propertySBOLValidationException
- if any of the following SBOL validation rules was violated:
12203public boolean isURIValue()
value
property.value
property.public URI getURIValue()
null
otherwise.public void setNestedQName(QName qName) throws SBOLValidationException
qName
- the nested QName for this annotation.SBOLValidationException
- if any of the following SBOL validation rules was violated:
12204public QName getNestedQName()
null
otherwise.public URI getNestedIdentity()
null
otherwise.public void setNestedIdentity(URI uri) throws SBOLValidationException
uri
- the nested uri for this annotation.SBOLValidationException
- if any of the following SBOL validation rules was violated:
12205public boolean isNestedAnnotations()
false
otherwisepublic void setAnnotations(List<Annotation> annotations) throws SBOLValidationException
annotations
- the list of Annotations for the nested value property.SBOLValidationException
- if any of the following SBOL validation rules was violated:
12206public List<Annotation> getAnnotations()
null
otherwise.