cds.simbad.ident
Class CatalogFull

java.lang.Object
  extended bycds.simbad.ident.Catalog
      extended bycds.simbad.ident.CatalogFull
All Implemented Interfaces:
java.io.Serializable

public class CatalogFull
extends Catalog

Full Catalog definition. This object adds the catalogue definition entries that are required to update a catalogue definition and write it back to the file, but are not requested for the regular job of identifier normalisation.

Version:
1.0 June 2003
Author:
Marc Wenger/CDS
See Also:
Serialized Form

Field Summary
private  java.lang.String comment
           
private  java.util.ArrayList examples
           
private  java.util.ArrayList formats
           
private static java.lang.String[] NULL_STRING_ARRAY
           
private  java.util.ArrayList synonyms
           
private  java.util.ArrayList versions
           
 
Fields inherited from class cds.simbad.ident.Catalog
description, otype, pgmList, reList, size, stdName
 
Constructor Summary
CatalogFull(java.lang.String stdName)
           
 
Method Summary
 void addExample(java.lang.String example)
          adds a example.
 void addFormat(java.lang.String fmt)
          adds a format.
 void addPgm(Pgm pgm, int idx)
          Add a programme at a given position
 void addSynonym(java.lang.String syn)
          adds a synonym.
 void addVersion(java.lang.String version)
          adds a version definition.
 void clearExamples()
          clears the list of examples.
 void clearFormats()
          clears the list of formats.
 void clearSynonyms()
          clears the list of synonyms.
 void clearVersions()
          clears the list of versions.
 java.lang.String getComment()
          returns the comment associated with the catalogue
 java.lang.String[] getExamples()
          returns a String array with all the examples.
 java.lang.String[] getFormats()
          returns a String array with all the formats.
 java.lang.String[] getSynonyms()
          returns a String array with all the synonyms.
 java.lang.String[] getVersions()
          returns a String array with all the versions.
 void movePgm(int idxOrigin, int idxDest)
          Move a programme from one position to another
 void removePgm(int idx)
          Remove a programme
 void replacePgm(Pgm pgm, int idx)
          Replace a programme by a new version
 void setComment(java.lang.String comment)
          adds a general comment.
 java.lang.String toString()
          Edits the whole catalogue object in the same format as it was read from the catalogue description file
 
Methods inherited from class cds.simbad.ident.Catalog
addPgm, equals, getDescription, getName, getOType, getPgm, getPgmList, getSize, setDescription, setName, setOType, setSize, toRE
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_STRING_ARRAY

private static final java.lang.String[] NULL_STRING_ARRAY

formats

private java.util.ArrayList formats

examples

private java.util.ArrayList examples

synonyms

private java.util.ArrayList synonyms

versions

private java.util.ArrayList versions

comment

private java.lang.String comment
Constructor Detail

CatalogFull

public CatalogFull(java.lang.String stdName)
Method Detail

clearFormats

public void clearFormats()
clears the list of formats.

Overrides:
clearFormats in class Catalog

addFormat

public void addFormat(java.lang.String fmt)
adds a format.

Overrides:
addFormat in class Catalog
Parameters:
fmt - format

getFormats

public java.lang.String[] getFormats()
returns a String array with all the formats.

Overrides:
getFormats in class Catalog
Returns:
the array of formats. It may be empty

clearExamples

public void clearExamples()
clears the list of examples.

Overrides:
clearExamples in class Catalog

addExample

public void addExample(java.lang.String example)
adds a example.

Overrides:
addExample in class Catalog
Parameters:
example - example to add

getExamples

public java.lang.String[] getExamples()
returns a String array with all the examples.

Overrides:
getExamples in class Catalog
Returns:
the array of examples. It may be empty

clearSynonyms

public void clearSynonyms()
clears the list of synonyms.

Overrides:
clearSynonyms in class Catalog

addSynonym

public void addSynonym(java.lang.String syn)
adds a synonym.

Overrides:
addSynonym in class Catalog
Parameters:
syn - synonym to add

getSynonyms

public java.lang.String[] getSynonyms()
returns a String array with all the synonyms.

Overrides:
getSynonyms in class Catalog
Returns:
the array of synonyms. It may be empty

clearVersions

public void clearVersions()
clears the list of versions.

Overrides:
clearVersions in class Catalog

addVersion

public void addVersion(java.lang.String version)
adds a version definition.

Overrides:
addVersion in class Catalog
Parameters:
version - version to add

getVersions

public java.lang.String[] getVersions()
returns a String array with all the versions.

Overrides:
getVersions in class Catalog
Returns:
the array of versions. It may be empty

setComment

public void setComment(java.lang.String comment)
adds a general comment. This method does nothing. See CatalogFull

Overrides:
setComment in class Catalog
Parameters:
comment - comment to add

getComment

public java.lang.String getComment()
returns the comment associated with the catalogue

Overrides:
getComment in class Catalog
Returns:
the comment string. It may be empty

addPgm

public void addPgm(Pgm pgm,
                   int idx)
Add a programme at a given position

Parameters:
pgm - Programme to add
idx - position where to add the programme

movePgm

public void movePgm(int idxOrigin,
                    int idxDest)
Move a programme from one position to another

Parameters:
idxOrigin - initial position
idxDest - final position

removePgm

public void removePgm(int idx)
Remove a programme

Parameters:
idx - position in the list of the programme to remove

replacePgm

public void replacePgm(Pgm pgm,
                       int idx)
Replace a programme by a new version

Parameters:
pgm - new version of aprogramme
idx - position of the programme to replace

toString

public java.lang.String toString()
Edits the whole catalogue object in the same format as it was read from the catalogue description file

Overrides:
toString in class Catalog
Returns:
the catalogue description as a string