Package uk.ac.starlink.votable
Class FieldElement
java.lang.Object
uk.ac.starlink.votable.dom.DelegatingNode
uk.ac.starlink.votable.dom.DelegatingElement
uk.ac.starlink.votable.VOElement
uk.ac.starlink.votable.FieldElement
- Direct Known Subclasses:
ParamElement
Table column characteristics represented by a FIELD element in a VOTable.
- Author:
- Mark Taylor (Starlink)
-
Field Summary
Fields inherited from interface org.w3c.dom.Node
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
-
Method Summary
Modifier and TypeMethodDescriptionReturns a VALUES child of this element with the attribute type='actual', or null if none exists.long[]
Returns the array size.Returns the COOSYS element corresponding to this field, if any.Returns the value of the datatype attribute.int
getIndexInTable
(TableElement table) Returns the index of this field in a given table; that is the index of the column it represents.Returns a VALUES child of this element with the attribute type='legal', or null if none exists.getNull()
Returns the 'null' value for this FieldElement.Returns the TIMESYS element corresponding to this field, if any.getUcd()
Returns the value of the ucd attribute, or null if there is none.getUnit()
Returns the value of the unit attribute, or null if there is none.getUtype()
Returns the value of the utype attribute, or null if there is none.getXtype()
Returns the value of the xtype attribute, or null if there is none.toString()
Returns the same value asVOElement.getHandle()
.Methods inherited from class uk.ac.starlink.votable.VOElement
getChildByName, getChildren, getChildrenByName, getDescription, getElementsByVOTagName, getElementSequence, getHandle, getID, getName, getParent, getReferencedElement, getSystemId, getVOTagName
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 Details
-
getArraysize
public long[] getArraysize()Returns the array size. The returned value is an array of long, with one element for each dimension. The final dimension only may have the value -1, which indicates that this dimension is unknown. All other elements will be positive.- Returns:
- array giving dimensions of data in this field.
-
getNull
Returns the 'null' value for this FieldElement. This is the value of the 'null' attribute of the VALUES child with type='legal', or if that doesn't exist the 'null' attribute of the VALUES child with type='actual' (this is some kind of guesswork based on what is not written in the VOTable document). This has nothing to do with the java null value.- Returns:
- the bad ("null") value or, confusingly, null if none is defined
-
getDatatype
Returns the value of the datatype attribute. If no datatype attribute has been defined (which is illegal, but not uncommon) then "char" will be returned.- Returns:
- the datatype
-
getUnit
Returns the value of the unit attribute, or null if there is none.- Returns:
- the unit string
-
getUcd
Returns the value of the ucd attribute, or null if there is none.- Returns:
- the ucd string
- See Also:
-
UCD
-
getUtype
Returns the value of the utype attribute, or null if there is none.- Returns:
- the utype string
-
getXtype
Returns the value of the xtype attribute, or null if there is none.- Returns:
- the xtype string
-
getIndexInTable
Returns the index of this field in a given table; that is the index of the column it represents. The first FIELD child of a TABLE element has index 0, and so on. If this field is not associated with table, -1 is returned.- Parameters:
table
- table within which to locate this field- Returns:
- 0-based index of this field in table, or -1
-
getLegalValues
Returns a VALUES child of this element with the attribute type='legal', or null if none exists.- Returns:
- the 'legal' Values object
-
getActualValues
Returns a VALUES child of this element with the attribute type='actual', or null if none exists.- Returns:
- the 'actual' Values object
-
getCoosys
Returns the COOSYS element corresponding to this field, if any.- Returns:
- referenced element with tagname COOSYS, or null
-
getTimesys
Returns the TIMESYS element corresponding to this field, if any.- Returns:
- referenced element with tagname TIMESYS, or null
-
toString
Description copied from class:VOElement
Returns the same value asVOElement.getHandle()
.
-