StructuredAnnotations_Choice
Bases: NBOBaseClass
Represents the XML choice in element StructuredAnnotations.
getTypeName()
Returns the class type name.
Returns:
| Type | Description |
|---|---|
string
|
The class type name |
getXMLName()
Returns the XML element name corresponding to this class.
Returns:
| Type | Description |
|---|---|
string
|
The XML element name |
getNBOType()
Returns the NBO Type corresponding to this class.
Returns:
| Type | Description |
|---|---|
int
|
The NBO Type value |
getChildren()
Returns a list of all classes derived from this class.
Returns:
| Type | Description |
|---|---|
List[NBOBaseClass]
|
The list of derived classes |
getSubElements()
Returns a list of all child elements contained in this class.
Returns:
| Type | Description |
|---|---|
List[NBOBaseClass]
|
The list of child classes |
fromJsonFile(path)
Populates this object from a JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
string
|
The path to the JSON file |
required |
fromJsonString(json_string)
Populates this object from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_string
|
string
|
The JSON content as a string |
required |
fromXmlFile(path)
Populates this object from a XML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
string
|
The path to the XML file |
required |
fromXmlString(xml_string)
Populates this object from a XML string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xml_string
|
string
|
The XML content as a string |
required |
toXmlFile(filename)
Serializes this object to an XML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
string
|
The path to the output XML file |
required |
toXmlString()
Serializes this object to an XML string.
Returns:
| Type | Description |
|---|---|
string
|
A string containing the XML representation of this object |
addXMLAnnotation(value)
Adds a new XMLAnnotation element to this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
XMLAnnotation
|
The element to add |
required |
containsXMLAnnotation()
Checks whether this object contains at least one XMLAnnotation element.
Returns:
| Type | Description |
|---|---|
boolean
|
true if a XMLAnnotation element is present, false otherwise |
addFileAnnotation(value)
Adds a new FileAnnotation element to this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
FileAnnotation
|
The element to add |
required |
containsFileAnnotation()
Checks whether this object contains at least one FileAnnotation element.
Returns:
| Type | Description |
|---|---|
boolean
|
true if a FileAnnotation element is present, false otherwise |
addListAnnotation(value)
Adds a new ListAnnotation element to this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
ListAnnotation
|
The element to add |
required |
containsListAnnotation()
Checks whether this object contains at least one ListAnnotation element.
Returns:
| Type | Description |
|---|---|
boolean
|
true if a ListAnnotation element is present, false otherwise |
addLongAnnotation(value)
Adds a new LongAnnotation element to this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
LongAnnotation
|
The element to add |
required |
containsLongAnnotation()
Checks whether this object contains at least one LongAnnotation element.
Returns:
| Type | Description |
|---|---|
boolean
|
true if a LongAnnotation element is present, false otherwise |
addDoubleAnnotation(value)
Adds a new DoubleAnnotation element to this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
DoubleAnnotation
|
The element to add |
required |
containsDoubleAnnotation()
Checks whether this object contains at least one DoubleAnnotation element.
Returns:
| Type | Description |
|---|---|
boolean
|
true if a DoubleAnnotation element is present, false otherwise |
addCommentAnnotation(value)
Adds a new CommentAnnotation element to this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
CommentAnnotation
|
The element to add |
required |
containsCommentAnnotation()
Checks whether this object contains at least one CommentAnnotation element.
Returns:
| Type | Description |
|---|---|
boolean
|
true if a CommentAnnotation element is present, false otherwise |
addBooleanAnnotation(value)
Adds a new BooleanAnnotation element to this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
BooleanAnnotation
|
The element to add |
required |
containsBooleanAnnotation()
Checks whether this object contains at least one BooleanAnnotation element.
Returns:
| Type | Description |
|---|---|
boolean
|
true if a BooleanAnnotation element is present, false otherwise |
addTimestampAnnotation(value)
Adds a new TimestampAnnotation element to this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
TimestampAnnotation
|
The element to add |
required |
containsTimestampAnnotation()
Checks whether this object contains at least one TimestampAnnotation element.
Returns:
| Type | Description |
|---|---|
boolean
|
true if a TimestampAnnotation element is present, false otherwise |
addTagAnnotation(value)
Adds a new TagAnnotation element to this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
TagAnnotation
|
The element to add |
required |
containsTagAnnotation()
Checks whether this object contains at least one TagAnnotation element.
Returns:
| Type | Description |
|---|---|
boolean
|
true if a TagAnnotation element is present, false otherwise |
addTermAnnotation(value)
Adds a new TermAnnotation element to this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
TermAnnotation
|
The element to add |
required |
containsTermAnnotation()
Checks whether this object contains at least one TermAnnotation element.
Returns:
| Type | Description |
|---|---|
boolean
|
true if a TermAnnotation element is present, false otherwise |
addMapAnnotation(value)
Adds a new MapAnnotation element to this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
MapAnnotation
|
The element to add |
required |
containsMapAnnotation()
Checks whether this object contains at least one MapAnnotation element.
Returns:
| Type | Description |
|---|---|
boolean
|
true if a MapAnnotation element is present, false otherwise |