cds.simbad
Class PosData

java.lang.Object
  extended bycds.util.Nodata
      extended bycds.simbad.BasicData
          extended bycds.simbad.PosData
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Coordinates, GalaxyDimension, Parallax, ProperMotion, RadialVelocity

public class PosData
extends BasicData

Basic class for Coordinate fields This includes Coordinates, proper motions, parallaxes and radial velocity
For the moment, this class keeps the data in String format

Version:
1.0 Apr 2002 (MW)
1.1 Oct 2002 (SJ) : Chgt de type pour error (avant : String)
1.2 30 Oct 2002 (SJ) : Type de error : ErrorData (permet les elipses d'erreurs)
Methode toString()
Author:
Marc Wenger/CDS, Sylvaine Jaehn (Stage UTBM)
See Also:
Serialized Form

Field Summary
private  Bibcode bibcode
           
private  ErrorData error
           
private  java.lang.String quality
           
 
Fields inherited from class cds.simbad.BasicData
dataExists
 
Fields inherited from class cds.util.Nodata
NODATA, NODATA_DBL, NODATA_FLT, NODATA_SHT, NODATA_STR
 
Constructor Summary
PosData()
          Constructor with no data
PosData(ErrorData err, java.lang.String qual, Bibcode bib)
          Constructor with data.
 
Method Summary
 Bibcode getBibcode()
          returns the bibcode
 ErrorData getError()
          returns the error value(s)
 java.lang.String getQuality()
          returns the quality flag
 void set(PosData pdata)
          Sets the PosData parameters from another PosData object.
 PosData setBibcode(Bibcode bib)
          Sets the bibcode field
 PosData setBibcode(java.lang.String bibstr)
          Sets the bibcode field
 PosData setError(ErrorData err)
          Sets the error field
 PosData setQuality(java.lang.String qual)
          Sets the quality field.
 java.lang.String toString()
          Edition de l'erreur, de la qualite et du bibcode
 
Methods inherited from class cds.simbad.BasicData
exists, setExist, setNodata
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

error

private ErrorData error

quality

private java.lang.String quality

bibcode

private Bibcode bibcode
Constructor Detail

PosData

public PosData()
Constructor with no data


PosData

public PosData(ErrorData err,
               java.lang.String qual,
               Bibcode bib)
Constructor with data. An absent data is represented by a ~(tilde) char

Parameters:
err - error value(s)
qual - quality flag (A-E)
bib - bibcode number
Method Detail

set

public void set(PosData pdata)
Sets the PosData parameters from another PosData object. It can also be an object from a derived class (Coordinates, ProperMotion, ...).

Parameters:
pdata - PosData object or derived class object

setError

public PosData setError(ErrorData err)
Sets the error field

Parameters:
err - error value(s)
Returns:
the PosData object

setQuality

public PosData setQuality(java.lang.String qual)
Sets the quality field. It must be one char between A and E. If the quality string is not in this range, it is set to NODATA (~)

Parameters:
qual - quality flag (A-E)
Returns:
the PosData object

setBibcode

public PosData setBibcode(java.lang.String bibstr)
                   throws BibcodeException
Sets the bibcode field

Parameters:
bibstr - bibcode as a string (it will be normalized)
Returns:
the PosData object
Throws:
BibcodeException - if the bibcode string is not parsable

setBibcode

public PosData setBibcode(Bibcode bib)
Sets the bibcode field

Parameters:
bib - bibcode number
Returns:
the PosData object

getError

public ErrorData getError()
returns the error value(s)

Returns:
the error

getQuality

public java.lang.String getQuality()
returns the quality flag

Returns:
the quality flag (A-E)

getBibcode

public Bibcode getBibcode()
returns the bibcode

Returns:
the bibcode

toString

public java.lang.String toString()
Edition de l'erreur, de la qualite et du bibcode

Returns:
chaine contenant l'erreur, la qualite et la bibcode