NAME

VOTABLE::TABLE - VOTABLE TABLE XML element class


SYNOPSIS

 use VOTABLE::TABLE;


DESCRIPTION

This class implements the TABLE element from the VOTABLE DTD. This is the primary element used for storing tables of data.

The TABLE element is a Tier 4 element, and is described by the following excerpt from the VOTABLE 1.0 DTD:

 <!ELEMENT TABLE (DESCRIPTION?, FIELD*, LINK*, DATA?)>
 <!ATTLIST TABLE
         ID ID #IMPLIED
         name CDATA #IMPLIED
         ref IDREF #IMPLIED
 >

Methods

new($xmldom_element, %options)

Create and return a new VOTABLE::TABLE 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::TABLE 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. Use undef as the argument to clear any existing value of the attribute. 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. Use undef as the argument to clear any existing value of the attribute. 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. Use undef as the argument to clear any existing value of the attribute. 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 child of this TABLE object. Return undef if no DESCRIPTION element is found, or if an error occurs.

set_description($votable_description)

Set the VOTABLE::DESCRIPTION object for the DESCRIPTION child element of this TABLE element to the specified object. Use undef as the argument to clear any existing instance of the element. Any existing DESCRIPTION child element is first removed. Return the new DESCRIPTION object on success, or undef if an error occurs.

get_field

Return a list of the VOTABLE::FIELD objects for the FIELD elements which are the children of this TABLE element. Return an empty list if no FIELD elements are found, or if an error occurs.

set_field(@votable_field)

Set the FIELD elements for this TABLE element using the supplied list of VOTABLE::FIELD objects. Use an empty list as the argument to clear any existing instances of the elements. Any previously existing FIELD elements are first removed. FIELD elements are stored in the TABLE element in the same order as provided in the @votable_field array (this is important for tables with binary data). Return the input list on success, or an empty list if an error occurs.

get_link

Return a list of the VOTABLE::LINK objects for the LINK elements which are the children of this TABLE 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 TABLE element using the supplied list of VOTABLE::LINK objects. Use an empty list as the argument to clear any existing instances of the elements. Any previously existing LINK elements are first removed. Return the input list on success, or an empty list if an error occurs.

get_data

Return the VOTABLE::DATA object for the DATA element child of this TABLE object. Return undef if no DATA element is found, or if an error occurs.

set_data($votable_data)

Set the VOTABLE::DATA object for the DATA child element of this TABLE element to the specified object. Use undef as the argument to clear any existing instance of the element. Any existing DATA child element is first removed. Return the new DATA object on success, or undef if an error occurs.

get_row($rownum)

Return row $rownum of the data, as an array of values. The array elements should be interpreted in the same order as the FIELD elements in the TABLE. Return an empty list if an error occurs.

set_row($rownum, @values)

Set the contents of row $rownum to the values provided in the @values array. Use an empty list as the argument to clear the row. Return the new values on success, or an empty list on error.

Notes on class internals


WARNINGS


SEE ALSO

VOTABLE, VOTABLE::DATA, VOTABLE::DESCRIPTION, VOTABLE::FIELD, VOTABLE::LINK, VOTABLE::RESOURCE


AUTHOR

Eric Winter, NASA GSFC (elwinter@milkyway.gsfc.nasa.gov)


VERSION

$Id: TABLE.pm,v 1.1.1.21 2002/06/09 21:13:08 elwinter Exp $