NAME

VOTABLE::RESOURCE - VOTABLE RESOURCE XML element class


SYNOPSIS

use VOTABLE::RESOURCE;


DESCRIPTION

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"
 >

Methods

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.

Notes on class internals


WARNINGS


SEE ALSO

VOTABLE, VOTABLE::COOSYS, VOTABLE::DESCRIPTION, VOTABLE::INFO, VOTABLE::LINK, VOTABLE::PARAM, VOTABLE::TABLE


AUTHOR

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


VERSION

$Id: RESOURCE.pm,v 1.1.1.11 2002/05/21 14:12:47 elwinter Exp $