NAME

Astro::ADS::Query - Object definining an prospective ADS query.

SYNOPSIS

$query = new Astro::ADS::Query( Authors     => \@authors,
                                AuthorLogic => $aut_logic,
                                Objects     => \@objects,
                                ObjectLogic => $obj_logic  );

my $results = $query->querydb();

DESCRIPTION

Stores information about an prospective ADS query and allows the query to be made, returning an Astro::ADS::Result object.

The object will by default pick up the proxy information from the HTTP_PROXY and NO_PROXY environment variables, see the LWP::UserAgent documentation for details.

REVISION

$Id: Query.pm,v 1.16 2001/11/10 17:35:52 aa Exp $

METHODS

Constructor

new

Create a new instance from a hash of options

$query = new Astro::ADS::Query( Authors     => \@authors,
                                AuthorLogic => $aut_logic,
                                Objects     => \@objects,
                                ObjectLogic => $obj_logic );

returns a reference to an ADS query object.

Accessor Methods

querydb

Returns an Astro::ADS::Result object for an inital ADS query

$results = $query->querydb();
followup

Returns an Astro::ADS::Result object for a followup query, e.g. CITATIONS, normally called using accessor methods from an Astro::ADS::Paper object, but can be called directly.

$results = $query->followup( $bibcode, $link_type );

returns undef if no arguements passed. Possible $link_type values are AR, CITATIONS, REFERENCES and TOC.

proxy

Return (or set) the current proxy for the ADS request.

$query->proxy( 'http://wwwcache.ex.ac.uk:8080/' );
$proxy_url = $query->proxy();
timeout

Return (or set) the current timeout in seconds for the ADS request.

$query->timeout( 30 );
$proxy_timeout = $query->timeout();
Authors

Return (or set) the current authors defined for the ADS query.

@authors = $query->authors();
$first_author = $query->authors();
$query->authors( \@authors );

if called in a scalar context it will return the first author.

AuthorLogic

Return (or set) the logic when dealing with multiple authors for a search, possible values for this parameter are OR, AND, SIMPLE, BOOL and FULLMATCH.

$author_logic = $query->authorlogic();
$query->authorlogic( "AND" );

if called with no arguements, or invalid arguements, then the method will return the current logic.

Objects

Return (or set) the current objects defined for the ADS query.

@objects = $query->objects();
$query->objects( \@objects );
ObjectLogic

Return (or set) the logic when dealing with multiple objects in a search, possible values for this parameter are OR, AND, SIMPLE, BOOL and FULLMATCH.

$obj_logic = $query->objectlogic();
$query->objectlogic( "AND" );

if called with no arguements, or invalid arguements, then the method will return the current logic.

Bibcode

Return (or set) the current bibcode used for the ADS query.

$bibcode = $query->bibcode();
$query->bibcode( "1996PhDT........42J" );

General Methods

configure

Configures the object, takes an options hash as an argument

$query->configure( %options );

Does nothing if the array is not supplied.

Authors

A list of authors for the query. By default author logic is set to OR rather than the potentially more useful AND.

AuthorLogic

By default the author logic, i.e. how the author names are combined during the search, is set to OR. Other options include; AND, combine with AND; SIMPLE, use simple logic (use +,-); BOOL, full boolean logic and FULLMATCH, do an AND query and calculate the score according to how many words in the author field match in the paper.

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

1 POD Error

The following errors were encountered while parsing the POD:

Around line 1102:

You forgot a '=back' before '=head1'