new($xmldom_element, %options)
get_ID
set_ID($id)
get_arraysize
set_arraysize($arraysize)
get_datatype
set_datatype($datatype)
get_name
set_name($name)
get_precision
set_precision($precision)
get_ref
set_ref($ref)
get_type
set_type($type)
get_ucd
set_ucd($ucd)
get_unit
set_unit($unit)
get_width
set_width($width)
get_description
set_description($votable_description)
get_link
set_link(@votable_link)
get_values
set_values(@votable_values)
VOTABLE::FIELD - VOTABLE FIELD XML element class
use VOTABLE::FIELD;
This class implements the FIELD
element from the VOTABLE
DTD. This class stores metadata for a single field (column) in a
table.
The FIELD
element is a Tier 3 element, and is described by the
following excerpt from the VOTABLE
1.0 DTD:
<!ELEMENT FIELD (DESCRIPTION?, VALUES*, LINK*)> <!ATTLIST FIELD ID ID #IMPLIED unit CDATA #IMPLIED datatype (boolean | bit | unsignedByte | short | int | long | char | unicodeChar | float | double | floatComplex | doubleComplex) #IMPLIED precision CDATA #IMPLIED width CDATA #IMPLIED ref IDREF #IMPLIED name CDATA #IMPLIED ucd CDATA #IMPLIED arraysize CDATA #IMPLIED type (hidden | no_query | trigger) #IMPLIED >
new($xmldom_element, %options)
Create and return a new VOTABLE::FIELD
object, based on the
supplied XML::DOM::Element
object, using %options
to set the
attributes of the new object. If no XML::DOM::Element
object is
specified, or is undefined, create and return an empty
VOTABLE::FIELD
object. Return undef
if an error occurs.
get_ID
Return the value of the ID
attribute. Return undef
if the
attribute has not been set, or an error occurs.
set_ID($id)
Set the value of the ID
attribute to the specified value. Return
the new value of the attribute on success, or undef
if an error
occurs.
get_arraysize
Return the value of the arraysize
attribute. Return undef
if the
attribute has not been set, or an error occurs.
set_arraysize($arraysize)
Set the value of the arraysize
attribute to the specified
value. Return the new value of the attribute on success, or undef
if an error occurs.
get_datatype
Return the value of the datatype
attribute. Return undef
if the
attribute has not been set, or an error occurs.
set_datatype($datatype)
Set the value of the datatype
attribute to the specified
value. Return the new value of the attribute on success, or undef
if an error occurs.
get_name
Return the value of the name
attribute. Return undef
if the
attribute has not been set, or an error occurs.
set_name($name)
Set the value of the name
attribute to the specified value. Return
the new value of the attribute on success, or undef
if an error
occurs.
get_precision
Return the value of the precision
attribute. Return undef
if the
attribute has not been set, or an error occurs.
set_precision($precision)
Set the value of the precision
attribute to the specified
value. Return the new value of the attribute on success, or undef
if an error occurs.
get_ref
Return the value of the ref
attribute. Return undef
if the
attribute has not been set, or an error occurs.
set_ref($ref)
Set the value of the ref
attribute to the specified value. Return
the new value of the attribute on success, or undef
if an error
occurs.
get_type
Return the value of the type
attribute. Return undef
if the
attribute has not been set, or an error occurs.
set_type($type)
Set the value of the type
attribute to the specified value. Return
the new value of the attribute on success, or undef
if an error
occurs.
get_ucd
Return the value of the ucd
attribute. Return undef
if the
attribute has not been set, or an error occurs.
set_ucd($ucd)
Set the value of the ucd
attribute to the specified value. Return
the new value of the attribute on success, or undef
if an error
occurs.
get_unit
Return the value of the unit
attribute. Return undef
if the
attribute has not been set, or an error occurs.
set_unit($unit)
Set the value of the unit
attribute to the specified value. Return
the new value of the attribute on success, or undef
if an error
occurs.
get_width
Return the value of the width
attribute. Return undef
if the
attribute has not been set, or an error occurs.
set_width($width)
Set the value of the width
attribute to the specified value. Return
the new value of the attribute on success, or undef
if an error
occurs.
get_description
Return the VOTABLE::DESCRIPTION
object for the DESCRIPTION
element of this FIELD
element. Return undef
If no DESCRIPTION
element is found, or an error occurs.
set_description($votable_description)
Set the DESCRIPTION
element for this FIELD
element to the
supplied VOTABLE::DESCRIPTION
object. Return the
VOTABLE::DESCRIPTION
object on success, or undef
if an error
occurs.
get_link
Return a list of the VOTABLE::LINK
objects for the LINK
elements
which are the children of this FIELD
element. Return an empty list
if no LINK
elements are found, or if an error occurs.
set_link(@votable_link)
Set the LINK
elements for this FIELD
element using the supplied
list of VOTABLE::LINK
objects. Any previously existing LINK
elements are first removed. Return the input list on success, or an
empty list if an error occurs.
get_values
Return a list of the VOTABLE::VALUES
objects for the VALUES
elements which are the children of this FIELD
element. Return an
empty list if no VALUES
elements are found, or if an error occurs.
set_values(@votable_values)
Set the VALUES
elements for this FIELD
element using the
supplied list of VOTABLE::VALUES
objects. Any previously existing
VALUES
elements are first removed. Return the input list on
success, or an empty list if an error occurs.
_
') are for
internal use only, and should not be used outside of the VOTABLE
class hierarchy.
get_XXX
and set_XXX
accessors for attributes
and elements are derived directly from the names of the attributes or
elements. Attribute and element names containing embedded hyphens
('-
') use accessors where the hyphen is mapped to an underscore
('_
') in the name of the accessor method. This is a necessity,
since the hyphen is not a valid name character in Perl.
VOTABLE::TABLEDATA
object always has an underlying
XML::DOM::Element
object. As long as the internal structure is
manipulated only by the publicly-available methods, this should be an
adequate assumption. If a method detects an aberrant case, a warning
message is printed (using the Carp::carp
subroutine), and the
method fails.
XML::DOM
methods always
succeed. If a method detects an aberrant case, a warning message is
printed (using the Carp::carp
subroutine), and the method fails.
set_XXX
accessors do not perform validation of the
new attribute values. The exceptions are the accessors for attributes
with enumerated values; the new value is checked against the list of
acceptable values, as defined in the DTD.
VOTABLE
, VOTABLE::DESCRIPTION
, VOTABLE::LINK
,
VOTABLE::TABLE
, VOTABLE::VALUES
Eric Winter, NASA GSFC (elwinter@milkyway.gsfc.nasa.gov)
$Id: FIELD.pm,v 1.1.1.8 2002/05/21 14:10:33 elwinter Exp $