cds.simbad
Class Journal

java.lang.Object
  extended bycds.simbad.Journal
All Implemented Interfaces:
java.io.Serializable

public class Journal
extends java.lang.Object
implements java.io.Serializable

A journal object contains all data linked to a astronomical journal. These data are are taken from the "journals" Parameters set.

See Also:
Serialized Form

Field Summary
private  java.lang.String abbrev
           
private  java.lang.String fullName
           
private  java.lang.String genericName
           
static java.lang.String JOURNAL_TYPES
           
private  boolean sectNumber
           
private  java.lang.String shortName
           
private  java.lang.String type
           
private  boolean vol5
           
private  java.util.HashMap volumes
           
private  java.lang.String wenzelName
           
private  java.util.HashMap yearRanges
           
 
Constructor Summary
Journal(java.lang.String abbreviation)
          Constructor with the (quite) mandatory items
 
Method Summary
 void addSubTitle(int volume, java.lang.String shortname, java.lang.String fullname)
          Add a subTitle definition to journals having a generic name, for which the real name depends on the volume.
 void addYearRanges(int year, int low, int high)
          Adds the year range for each volume This information is taken from a file whose name is the limjnl directory
 boolean checkRange(int year, int volume)
          Check a volume number for a particular year
 boolean equals(java.lang.Object o)
          MOD-BB 21-01-04 Ajout de cette methode.
 boolean existYearRanges()
          Checks if the journal has volume range values
 java.lang.String getAbbreviation()
          Get the journal abbreviation, as used in bibcodes
 java.lang.String getName(char namecode)
          Gets one of the names of the journal.
 java.lang.String getSubTitleFullName(int volume)
          Get the full name of a subTitle
 java.lang.String getSubTitleShortName(int volume)
          Get the short name of a subTitle
 java.lang.String getType()
           
 int getYearFromVolume(int vol)
          Returns the year corresponding to a volume number
 boolean isSectionNumber()
          returns whether the page number is in the format section - number
 boolean isVolume5()
          returns whether the volume number can be on 5 digits
 void setFormat(java.lang.String fmt)
          Sets peculiarities of the bibcode format
Currently, two peciliarities are recognized:
volume:vvvvv : volume number on 5 digits
page:sssnn : page number replaced by section, number in section
(involves the M char, which becomes numerical)
 void setName(char namecode, java.lang.String name)
          Sets one of the names of the journal.
 void setType(java.lang.String type)
          Sets a document type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOURNAL_TYPES

public static final java.lang.String JOURNAL_TYPES
See Also:
Constant Field Values

abbrev

private java.lang.String abbrev

shortName

private java.lang.String shortName

fullName

private java.lang.String fullName

wenzelName

private java.lang.String wenzelName

type

private java.lang.String type

genericName

private java.lang.String genericName

volumes

private java.util.HashMap volumes

vol5

private boolean vol5

sectNumber

private boolean sectNumber

yearRanges

private java.util.HashMap yearRanges
Constructor Detail

Journal

public Journal(java.lang.String abbreviation)
Constructor with the (quite) mandatory items

Parameters:
abbreviation - journal abbreviation, used in the bibcode (max: 5 chars)
Method Detail

getAbbreviation

public java.lang.String getAbbreviation()
Get the journal abbreviation, as used in bibcodes

Returns:
the journal abbreviation (5 chars maximum)

setName

public void setName(char namecode,
                    java.lang.String name)
Sets one of the names of the journal.

Parameters:
namecode - character code defining the name:
S=short, F=full, W=wenzel, G=generic name
If the code is incorrect, nothing happens...
name - corresponding name of the journal

getName

public java.lang.String getName(char namecode)
Gets one of the names of the journal.

Parameters:
namecode - character code defining the name:
S=short, F=full, W=wenzel, G=generic name
If the code is incorrect, nothing happens...
Returns:
the corresponding name of the journal (null if it doesn't exist or the namecode is unknown

setType

public void setType(java.lang.String type)
Sets a document type.

The possible values are:
B = Book
R = Report
T = Thesis
C = Catalogue
S = ?
U = ?

Parameters:
type - type character. If the character is incorrect, it is not set

getType

public java.lang.String getType()

setFormat

public void setFormat(java.lang.String fmt)
Sets peculiarities of the bibcode format
Currently, two peciliarities are recognized:
volume:vvvvv : volume number on 5 digits
page:sssnn : page number replaced by section, number in section
(involves the M char, which becomes numerical)

Parameters:
fmt - format description string. Several items can be written, separated by a comma

isVolume5

public boolean isVolume5()
returns whether the volume number can be on 5 digits

Returns:
true if the bibcode has the volume on 5 digits, false otherwise

isSectionNumber

public boolean isSectionNumber()
returns whether the page number is in the format section - number

Returns:
true if the bibcode has the page number replaced by section and number in the section

addSubTitle

public void addSubTitle(int volume,
                        java.lang.String shortname,
                        java.lang.String fullname)
Add a subTitle definition to journals having a generic name, for which the real name depends on the volume.

Parameters:
volume - volume number for this issue of the journal
shortname - short name of the issue
fullname - full description of the issue

getSubTitleShortName

public java.lang.String getSubTitleShortName(int volume)
Get the short name of a subTitle

Parameters:
volume - volume of the searched subtitle
Returns:
the short name (or null if it doesn't exist)

getSubTitleFullName

public java.lang.String getSubTitleFullName(int volume)
Get the full name of a subTitle

Parameters:
volume - volume of the searched subtitle
Returns:
the full name (or null if it doesn't exist)

addYearRanges

public void addYearRanges(int year,
                          int low,
                          int high)
Adds the year range for each volume This information is taken from a file whose name is the limjnl directory

Parameters:
year - publication year
low - minimum volume number
high - maximum volume number

existYearRanges

public boolean existYearRanges()
Checks if the journal has volume range values

Returns:
true if it has. false otherwise

checkRange

public boolean checkRange(int year,
                          int volume)
Check a volume number for a particular year

Parameters:
year - publication year
volume - volume number to check
Returns:
true if the volume number is in the given year, false otherwise

getYearFromVolume

public int getYearFromVolume(int vol)
Returns the year corresponding to a volume number

Parameters:
vol - volume for which we search the year
Returns:
the corresponding year or -1 if it can not be found. Either because the journalhas no volume range information, either because the volume is outside the known ranges

equals

public boolean equals(java.lang.Object o)
MOD-BB 21-01-04 Ajout de cette methode. Test d'egalite de Journal.

Parameters:
o - Objet a comparer.
Returns:
Vrai si o est identique a this, faux sinon.