NAME

VOTABLE::LINK - VOTABLE LINK XML element class


SYNOPSIS

use VOTABLE::LINK;


DESCRIPTION

This class implements the LINK element from the VOTABLE DTD. This element is used to store traditional HTTP hyperlinks to supporting information (using the href attribute), or a more general-purpose link (using the gref attribute).

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

 <!ELEMENT LINK (#PCDATA)>
 <!ATTLIST LINK
         ID ID #IMPLIED
         content-role (query | hints | doc) #IMPLIED
         content-type CDATA #IMPLIED
         title CDATA #IMPLIED
         value CDATA #IMPLIED
         href CDATA #IMPLIED
         gref CDATA #IMPLIED
         action CDATA #IMPLIED
 >

Methods

new($str_or_ref, %options)

Create a new VOTABLE::LINK object, and return a reference to it. If the first argument ($str_or_ref) is a string, it is used as the initial PCDATA content of the LINK element. If the first argument is a reference to a XML::DOM::Element object, that object is used to initialize the new LINK element (implicitly assuming that the XML::DOM::Element object contains a valid LINK element). The %options hash is used to set the attributes of the new element. If the first argument is missing or undefined, or an empty string, create and return an empty VOTABLE::LINK 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_action

Return the value of the action attribute. Return undef if the attribute has not been set, or an error occurs.

set_action($action)

Set the value of the action attribute to the specified value. Return the new value of the attribute on success, or undef if an error occurs.

get_content_role

Return the value of the content-role attribute. Return undef if the attribute has not been set, or an error occurs.

set_content_role($content_role)

Set the value of the content-role attribute to the specified value. Return the new value of the attribute on success, or undef if an error occurs.

get_content_type

Return the value of the content-type attribute. Return undef if the attribute has not been set, or an error occurs.

set_content_type($content_type)

Set the value of the content-type attribute to the specified value. Return the new value of the attribute on success, or undef if an error occurs.

get_gref

Return the value of the gref attribute. Return undef if the attribute has not been set, or an error occurs.

set_gref($gref)

Set the value of the gref attribute to the specified value. Return the new value of the attribute on success, or undef if an error occurs.

get_href

Return the value of the href attribute. Return undef if the attribute has not been set, or an error occurs.

set_href($href)

Set the value of the href attribute to the specified value. Return the new value of the attribute on success, or undef if an error occurs.

get_title

Return the value of the title attribute. Return undef if the attribute has not been set, or an error occurs.

set_title($title)

Set the value of the title attribute to the specified value. Return the new value of the attribute on success, or undef if an error occurs.

get_value

Return the value of the value attribute. Return undef if the attribute has not been set, or an error occurs.

set_value($value)

Set the value of the value attribute to the specified value. Return the new value of the attribute on success, or undef if an error occurs.

get

Return a string containing the PCDATA content of the LINK element. Return undef if the element has no PCDATA content, or an error occurs.

set($str)

Set the PCDATA content of the LINK element to the specified string. Return the string on success, or undef if an error occurs.

Notes on class internals


WARNINGS


SEE ALSO

VOTABLE, VOTABLE::FIELD, VOTABLE::PARAM, VOTABLE::RESOURCE, VOTABLE::TABLE


AUTHOR

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


VERSION

$Id: LINK.pm,v 1.1.1.7 2002/05/21 14:11:17 elwinter Exp $