new($xmldom_element, %options)
get_ID
set_ID($id)
get_name
set_name($name)
get_type
set_type($type)
get_description
set_description($votable_description)
get_info
set_info(@votable_info)
get_coosys
set_coosys(@votable_coosys)
get_param
set_param(@votable_param)
get_link
set_link(@votable_link)
get_table
set_table(@votable_table)
get_resource
set_resource(@votable_resource)
VOTABLE::RESOURCE - VOTABLE RESOURCE XML element class
use VOTABLE::RESOURCE;
This class implements the RESOURCE
element from the VOTABLE
DTD. This element is the high-level container for data resources
within the VOTABLE framework.
The RESOURCE
element is a Tier 5 element, and is described by the
following excerpt from the VOTABLE
1.0 DTD:
<!ELEMENT RESOURCE (DESCRIPTION?, INFO*, COOSYS*, PARAM*, LINK*, TABLE*, RESOURCE*)> <!ATTLIST RESOURCE name CDATA #IMPLIED ID ID #IMPLIED type (results | meta) "results" >
new($xmldom_element, %options)
Create and return a new VOTABLE::RESOURCE
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::RESOURCE
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_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_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_description
Return the VOTABLE::DESCRIPTION
object for the DESCRIPTION
element child of this RESOURCE
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 RESOURCE
element to the specified object. Any
existing DESCRIPTION
child element is first removed. Return the new
DESCRIPTION
object on success, or undef
if an error occurs.
get_info
Return a list of the VOTABLE::INFO
objects for the INFO
elements
which are the children of this RESOURCE
element. Return an empty
list if no INFO
elements are found, or if an error occurs.
set_info(@votable_info)
Set the INFO
elements for this RESOURCE
element using the
supplied list of VOTABLE::INFO
objects. Any previously existing
INFO
elements are first removed. Return the input list on success,
or an empty list if an error occurs.
get_coosys
Return a list of the VOTABLE::COOSYS
objects for the COOSYS
elements which are the children of this RESOURCE
element. Return an
empty list if no COOSYS
elements are found, or if an error occurs.
set_coosys(@votable_coosys)
Set the COOSYS
elements for this RESOURCE
element using the
supplied list of VOTABLE::COOSYS
objects. Any previously existing
COOSYS
elements are first removed. Return the input list on
success, or an empty list if an error occurs.
get_param
Return a list of the VOTABLE::PARAM
objects for the PARAM
elements which are the children of this RESOURCE
element. Return an
empty list if no PARAM
elements are found, or if an error occurs.
set_param(@votable_param)
Set the PARAM
elements for this RESOURCE
element using the
supplied list of VOTABLE::PARAM
objects. Any previously existing
PARAM
elements are first removed. 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 RESOURCE
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 RESOURCE
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_table
Return a list of the VOTABLE::TABLE
objects for the TABLE
elements which are the children of this RESOURCE
element. Return an
empty list if no TABLE
elements are found, or if an error occurs.
set_table(@votable_table)
Set the TABLE
elements for this RESOURCE
element using the
supplied list of VOTABLE::TABLE
objects. Any previously existing
TABLE
elements are first removed. Return the input list on success,
or an empty list if an error occurs.
get_resource
Return a list of the VOTABLE::RESOURCE
objects for the RESOURCE
elements which are the children of this RESOURCE
element. Return an
empty list if no RESOURCE
elements are found, or if an error
occurs.
set_resource(@votable_resource)
Set the RESOURCE
elements for this RESOURCE
element using the
supplied list of VOTABLE::RESOURCE
objects. Any previously existing
RESOURCE
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::COOSYS
, VOTABLE::DESCRIPTION
,
VOTABLE::INFO
, VOTABLE::LINK
, VOTABLE::PARAM
,
VOTABLE::TABLE
Eric Winter, NASA GSFC (elwinter@milkyway.gsfc.nasa.gov)
$Id: RESOURCE.pm,v 1.1.1.11 2002/05/21 14:12:47 elwinter Exp $