NAME

Parser::Citation - Extract metadata from journal citation strings.


SYNOPSIS

 $cite = new Parser::Citation($str);

  
 $SourceString   = $cite->srcText(); 
 $Authors        = $cite->list_authours();
 $First_author   = $cite->first_author();
 $Article_title  = $cite->atitle();
 $Journal_title  = $cite->jtitle();
 $Volume         = $cite->volume();
 $Issue          = $cite->issue();
 $Supplement     = $cite->supplement();
 $Start_page     = $cite->startpage();
 $Year           = $cite->year();

 $cite->display_metadata();
 $cite->display_metadata_xml();


DESCRIPTION

This module implements the Citation class. Objects of this class represent citation strings, for eaxmple:

 G. Baym, C. Pethick, and D. Pines, Nature 224 (1969) 673.

It was written for processing journal citations, hence is not suitable for extracting metadata from the citations to books, conference proceedings, technical reports, etc.


CONSTRUCTOR

$cite = new Parser::Citation($str)

Note: the citation string should be a single line, containing no line breaks.


METHODS

The following methods are used to access individual metadata:

$cite->srcText()
This method returns the original citation string.

$cite->list_authours()
This method returns a list of authors, separated by a colon.

$cite->first_author()
This methods returns the full name of the first author, in the form of first name, initials, last name.

$cite->atitle()
This methods returns the article title. Currently it only returns titles quoted by double quotes in the original citation string.

$cite->jtitle()
This method returns the journal title.

$cite->volume()
This method returns the volume number of the journal.

$cite->issue()
This method returns the issue number of the journal.

$cite->supplement()
This method returns the supplement number of the journal.

$cite->startpage()
This method returns the start page of an article.

$cite->year()
This method returns the year of publication.

$cite->display_metadata([<int>])
This methods displays all metadata extracted from the citation string, together with markup tags. The optional <int> parameter indecates the amount of the indentation (i.e. leading spaces on each line).

$cite->display_metadata_xml()
This method displays all metadata extracted from the citation string, in XML format.


EXAMPLE

$cite = new Parser::Citation('G. Baym, C. Pethick, and D. Pines, Nature 224 (1969) 673');

$cite->display_metadata();

will create:

 <citation>
     <literal>G. Baym, C. Pethick, and D. Pines, Nature 224 (1969) 673</literal>
     <authors>G.Baym:C.Pethick:D.Pines</authors>
     <first_author>G.Baym</first_author>
     <journaltitle>NATURE</journaltitle>
     <volume>224</volume>
     <startpage>673</startpage>
     <year>1969</year>
 </citation>   


AUTHOR

Zhuoan Jiao, zj@ecs.soton.ac.uk
(14/08/01)