NAME

Astro::ADS::Result - Results from an ADS Query

SYNOPSIS

$result = new Astro::ADS::Result( Papers => \@papers );

DESCRIPTION

Stores the results returned from an ADS search as a hash of Astro::ADS::Result::Paper objects, with the papers being indexed by bibcode.

REVISION

$Id: Result.pm,v 1.13 2001/11/10 20:58:43 timj Exp $

METHODS

Constructor

new

Create a new instance from a hash of options

$result = new Astro::ADS::Result( Papers => \@papers );

returns a reference to an ADS Result object.

Accessor Methods

sizeof

Return the number of papers in the Astro::ADS::Result object.

$paper = $result->sizeof();
pushpaper

Push a new paper onto the end of the Astro::ADS::Result object

$result->pushpaper( $paper );

returns the number of papers now in the Result object.

poppaper

Pop a paper from the end of the Astro::ADS::Result object

$paper = $result->poppaper();

the method deletes the paper and returns the deleted paper object.

papers

Return a list of all the Astro::ADS::Result::Paper objects stored in the results object.

@papers = $result->papers;
paperbyindex

Return the Astro::ADS::Result::Paper object at index $index

$paper = $result->paperbyindex( $index );

the first paper is at index 0 (not 1). Returns undef if no arguements are provided.

General Methods

configure

Configures the object, takes an options hash as argument

$result->configure( %options );

Takes a hash as argument with the following keywords:

Papers

An reference to an array of Astro::ADS::Result::Paper objects.

Does nothing if these keys are not supplied.

summary

Return a summary of the object as either plain text table or in XML. Simply invokes the summary method of each paper in turn and combines the results as a single string.

The arguments are passed through to the summary method unchanged.

stringify

Method called automatically when the object is printed in a string context. Simple invokes the summary() method with default arguments.

COPYRIGHT

Copyright (C) 2001 University of Exeter. All Rights Reserved.

This program was written as part of the eSTAR project and is free software; you can redistribute it and/or modify it under the terms of the GNU Public License.

AUTHORS

Alasdair Allan <aa@astro.ex.ac.uk>,