public class Annotation extends Object
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,
QName nestedQName,
URI nestedURI,
List<Annotation> annotations)
Constructs a nested annotation using the given qName, nested qName,
nested URI, and list of annotations.
|
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 |
---|---|
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)
qName
- the QName of this annotationliteral
- a string type valuepublic Annotation(QName qName, int literal)
qName
- the QName of this annotationliteral
- an integer type valuepublic Annotation(QName qName, double literal)
qName
- the QName of this annotationliteral
- a double type valuepublic Annotation(QName qName, boolean literal)
qName
- the QName of this annotationliteral
- a boolean type valuepublic Annotation(QName qName, URI literal)
URI
type literal.qName
- the QName of this annotationliteral
- a URI type valuepublic Annotation(QName qName, QName nestedQName, URI nestedURI, List<Annotation> annotations)
qName
- the QName of this annotationnestedQName
- the QName of the nested annotationnestedURI
- the identity URI for the nested annotationannotations
- the list of annotations to construct the nested annotationpublic QName getQName()
public void setQName(QName qName)
qName
- the QName for this annotation.public 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)
literal
- the string representation of the value propertypublic boolean isStringValue()
false
otherwisepublic String getStringValue()
null
otherwise.public void setURIValue(URI literal)
literal
- the URI representation of the value propertypublic boolean isURIValue()
value
property.value
property.public URI getURIValue()
null
otherwise.public void setNestedQName(QName qName)
qName
- the nested QName for this annotation.public QName getNestedQName()
null
otherwise.public URI getNestedIdentity()
null
otherwise.public void setNestedIdentity(URI uri)
uri
- the nested uri for this annotation.public boolean isNestedAnnotations()
false
otherwisepublic void setAnnotations(List<Annotation> annotations)
annotations
- the list of Annotations for the nested value property.public List<Annotation> getAnnotations()
null
otherwise.Copyright © 2017. All rights reserved.