|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.votable.dom.DelegatingNode
uk.ac.starlink.votable.dom.DelegatingElement
uk.ac.starlink.votable.VOElement
public class VOElement
Element implementation for use within VOTable documents. This implements the DOM Element interface, and so can be used just as a normal DOM element (including adding/removing/editing nodes). However, it also provides a few extra convenience methods, some of which are based on knowledge of the nature of the elements within a VOTable document.
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.
Field Summary |
---|
Method Summary | |
---|---|
VOElement |
getChildByName(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(String votagname)
Returns all the child elements of this element which have a given name in the VOTable namespace. |
String |
getDescription()
Returns the text of a DESCRIPTION element associated with this object, or null if none exists. |
NodeList |
getElementsByVOTagName(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. |
String |
getHandle()
Returns something that can be used informally as a name for this element. |
String |
getID()
Returns the ID attribute value for this element, or null if none exists. |
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. |
String |
getSystemId()
Returns any system ID associated with this node. |
String |
getVOTagName()
Returns the name of this element in the VOTable namespace. |
String |
toString()
Returns the same value as getHandle() . |
Methods inherited from class uk.ac.starlink.votable.dom.DelegatingElement |
---|
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
Methods inherited from class uk.ac.starlink.votable.dom.DelegatingNode |
---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
---|
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 |
Method Detail |
---|
public String getDescription()
getChildByName("DESCRIPTION")
.
public String getID()
public String getName()
public VOElement getParent()
public VOElement[] getChildren()
public VOElement[] getChildrenByName(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(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 String toString()
getHandle()
.
toString
in class Object
public String getHandle()
public String getSystemId()
public String getVOTagName()
public int getElementSequence()
public NodeList getElementsByVOTagName(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
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |