Astro::VO::VOEvent

Astro::VO::VOEvent is an object interface to parse and create VOEvent messages.
Download

Astro::VO::VOEvent Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Alasdair Allan
  • Publisher web site:
  • http://search.cpan.org/~aallan/XML-Document-RTML-1.16/RTML.pm

Astro::VO::VOEvent Tags


Astro::VO::VOEvent Description

Astro::VO::VOEvent is an object interface to parse and create VOEvent messages. Astro::VO::VOEvent is an object interface to parse and create VOEvent messages.SYNOPSISTo parse a VOEvent file, $object = new Astro::VO::VOEvent( File => $file_name );or $object = new Astro::VO::VOEvent( XML => $scalar );Or to build a VOEVENT file, $xml = $object->build( %hash );The module can parse VOEvent messages, and serves as a limited convenience layer for building new messages. Functionality is currently very limited.METHODSConstructornewCreate a new instance from a hash of options $object = new Astro::VO::VOEvent( );returns a reference to an VOEvent object.Accessor MethodsbuildBuild a VOEvent document $xml = $object->build( Type => $string, Role => $string, ID => $url, Reference => { URL => $url, Type => $string } );or $xml = $object->build( Type => $string, Role => $string, ID => $url, Description => $string, Citations => , Who => { Publisher => $url, Contact => { Name => $string, Institution => $string, Address => $string, Telephone => $string, Email => $string, }, Date => $string }, WhereWhen => { RA => $ra, Dec => $dec, Error => $error, Time => $time }, How => { Name => $string, Location => $string, RTML => $url, Reference => { URL => $url, Type => $string, Name => $string } }, What => , Why => , }, { Group => , }, { Name => $string, UCD => $string, Value => $string, Units => $string }, . . . { Name => $string, UCD => $string, Value => $string, Units => $string } ],this will probably NOT be the final API for the build() method, as it is overly complex. It is probably one or more convenience methods will be put ontop of this routine to make it easier to use. See the t/2_simple.t file in the test suite for an example which makes use of the complex form of the What tag above.NB: This is the low level interface to build a message, this is subject to change without notice as higher level "easier to use" accessor methods are added to the module. It may eventually be reclassified as a PRIVATE method.idReturn the id of the VOEvent document $object = new Astro::VO::VOEvent( XML => $scalar ); $id = $object->id();roleReturn the role of the VOEvent document $object = new Astro::VO::VOEvent( XML => $scalar ); $id = $object->role();versionReturn the version of the VOEvent document $object = new Astro::VO::VOEvent( XML => $scalar ); $version = $object->version();descriptionReturn the human readable description from the VOEvent document $object = new Astro::VO::VOEvent( XML => $scalar ); $string = $object->description();B{ra}Return the RA of the object as given in the tag $object = new Astro::VO::VOEvent( XML => $scalar ); $ra = $object->ra();B{dec}Return the Dec of the object as given in the tag $object = new Astro::VO::VOEvent( XML => $scalar ); $dec = $object->dec();B{epoch}Return the Dec of the object as given in the tag $object = new Astro::VO::VOEvent( XML => $scalar ); $epoch = $object->epoch();B{equinox}Return the Dec of the object as given in the tag $object = new Astro::VO::VOEvent( XML => $scalar ); $equinox = $object->equinox();B{time}Return the Time of the object as given in the tag $object = new Astro::VO::VOEvent( XML => $scalar ); $time = $object->time();B{what}Return the < Param > and < Group >'s of < Param >s in the < What > tag, $object = new Astro::VO::VOEvent( XML => $scalar ); %what = $object->what();General MethodsconfigureConfigures the object, takes an options hash as an argument $rtml->configure( %options );does nothing if the hash is not supplied. Requirements: · Perl


Astro::VO::VOEvent Related Software