new($xmldom_element, %options)
get_tr
set_tr(@votable_tr)
append_tr($votable_tr)
get_row($rownum)
set_row($rownum, @values)
VOTABLE::TABLEDATA - VOTABLE TABLEDATA XML element class
use VOTABLE::TABLEDATA;
This class implements the TABLEDATA
element from the VOTABLE
DTD. This element is the container for completely self-contained,
XML-formatted data tables.
The TABLEDATA
element is a Tier 2 element, and is described by the
following excerpt from the VOTABLE
1.0 DTD:
<!ELEMENT TABLEDATA (TR*)>
new($xmldom_element, %options)
Create and return a new VOTABLE::TABLEDATA
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::TABLEDATA
object. Return undef
if an error occurs.
get_tr
Return a list of the VOTABLE::TR
objects for the TR
elements
which are the children of this TABLEDATA
element. Return an empty
list if no TR
elements are found, or if an error occurs.
set_tr(@votable_tr)
Set the TR
elements for this TABLEDATA
element using the
supplied list of VOTABLE::TR
objects. Any previously existing TR
elements are first removed. Return the input list on success, or an
empty list if an error occurs.
append_tr($votable_tr)
Append the specified TR
element to the end of the list of TR
elements for this TABLEDATA
element. Return the new TR
element
on success, or undef
if an error occurs.
get_row($rownum)
Return the contents of row $rownum
as a list. Return an empty list
if an error occurs.
set_row($rownum, @values)
Set the values of row $rownum
using the values in the array
@values
. Return the new values 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::DATA
, VOTABLE::TR
Eric Winter, NASA GSFC (elwinter@milkyway.gsfc.nasa.gov)
$Id: TABLEDATA.pm,v 1.1.1.13 2002/06/09 21:13:08 elwinter Exp $