public class VOElement extends DelegatingElement
This class is extended to provide the classes associated with
specific VOTable elements. These in turn provide more additional
methods associated with the specific properties of such elements,
for instance the TableElement
class has a getData
which returns the actual table cell data. Those element types
which don't require any extra associated functionality (such as
RESOURCE) don't have their own subclass, they are just represented
as VOElements. The class of each element in the DOM
is determined by its tag name - so every TABLE element will be
represented in the DOM as a TableElement
and so on.
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Modifier and Type | Method and Description |
---|---|
VOElement |
getChildByName(java.lang.String votagname)
Returns the first child element of this element which has a given
name in the VOTable namespace.
|
VOElement[] |
getChildren()
Returns the child elements of this element.
|
VOElement[] |
getChildrenByName(java.lang.String votagname)
Returns all the child elements of this element which have a given
name in the VOTable namespace.
|
java.lang.String |
getDescription()
Returns the text of a DESCRIPTION element associated with this object,
or null if none exists.
|
org.w3c.dom.NodeList |
getElementsByVOTagName(java.lang.String voTagName)
Returns a NodeList of all descendant Elements with a given
unqualified tag name in the VOTable namespace, in the order
in which they are encountered in a preorder traversal of this
Element tree.
|
int |
getElementSequence()
Returns the number of elements with the same tag name as this one
which were present in the document when this one was added to it.
|
java.lang.String |
getHandle()
Returns something that can be used informally as a name for this
element.
|
java.lang.String |
getID()
Returns the ID attribute value for this element,
or null if none exists.
|
java.lang.String |
getName()
Returns the name attribute value for this element,
or null if none exists.
|
VOElement |
getParent()
Returns the parent element of this element as a VOElement.
|
VOElement |
getReferencedElement(java.lang.String refAtt,
java.lang.String votagname)
Returns an element from the same document whose ID-typed attribute
matches the value of a given (reference) attribute of this element.
|
java.lang.String |
getSystemId()
Returns any system ID associated with this node.
|
java.lang.String |
getVOTagName()
Returns the name of this element in the VOTable namespace.
|
java.lang.String |
toString()
Returns the same value as
getHandle() . |
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
public java.lang.String getDescription()
getChildByName("DESCRIPTION")
.public java.lang.String getID()
public java.lang.String getName()
public VOElement getParent()
public VOElement[] getChildren()
public VOElement[] getChildrenByName(java.lang.String votagname)
Note that since STIL v2.8, but not before, the namespacing of
the argument to this method is influenced by the
default Namespacing
class.
votagname
- the unqualified element name in the VOTable
namespace required (such as "TABLE")public VOElement getChildByName(java.lang.String votagname)
Note that since STIL v2.8, but not before, the namespacing of
the argument to this method is influenced by the
default Namespacing
class.
votagname
- the unqualified element name in the VOTable
namespace required (such as "TABLE")public java.lang.String toString()
getHandle()
.toString
in class java.lang.Object
public java.lang.String getHandle()
public java.lang.String getSystemId()
public java.lang.String getVOTagName()
public int getElementSequence()
public VOElement getReferencedElement(java.lang.String refAtt, java.lang.String votagname)
refAtt
- name of referencing attribute of this elementvotagname
- the unqualified element name in the VOTable
namespace required (such as "TABLE")public org.w3c.dom.NodeList getElementsByVOTagName(java.lang.String voTagName)
Element.getElementsByTagName(java.lang.String)
,
but takes care of VOTable namespacing issues;
calling it with the argument "TABLE" will find all VOTable TABLE
descendants.voTagName
- unqualified element name in VOTable namespace