VOTABLE::TR - VOTABLE TR XML element class
use VOTABLE::TR;
This class implements the TR
element from the VOTABLE
DTD. This
element is used to store a single row in a data table.
The TR
element is a Tier 1 element, and is described by the
following excerpt from the VOTABLE
1.0 DTD:
<!ELEMENT TR (TD+)>
new($xmldom_element, %options)
Create and return a new VOTABLE::TR
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::TR
object. Return
undef if an error occurs.
get_td
Return a list of the VOTABLE::TD
objects for the TD
elements
which are the children of this TR
element. Return an empty list if
no TD
elements are found, or if an error occurs.
set_td(@votable_td)
Set the TD
elements for this TR
element using the supplied list
of VOTABLE::TD
objects. Any previously existing TD
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::TR
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::TABLEDATA
, VOTABLE::TD
Eric Winter, NASA GSFC (elwinter@milkyway.gsfc.nasa.gov)
$Id: TR.pm,v 1.1.1.10 2002/05/21 14:14:07 elwinter Exp $