net.aerith.misao.util.star
Class Star

java.lang.Object
  |
  +--net.aerith.misao.util.Position
        |
        +--net.aerith.misao.util.star.StarPosition
              |
              +--net.aerith.misao.util.star.Star
Direct Known Subclasses:
CatalogStar, MergedStar, StarImage

public class Star
extends StarPosition
implements Coordinates

The Star represents a star which consists of (x,y) position, R.A. and Decl., and magnitude. They are expressed in float data. It also has a color to plot on a chart.


Field Summary
protected  java.awt.Color color
          The colot to plot on a chart.
protected  StarPair container_pair
          The pair which contains this object.
protected  Coor coor
          The R.A.
 
Fields inherited from class net.aerith.misao.util.star.StarPosition
mag
 
Fields inherited from class net.aerith.misao.util.Position
x, y
 
Constructor Summary
Star()
          Constructs an empty Star.
 
Method Summary
 boolean equals(Star star)
          Returns true when the specified star equals to this object.
 java.awt.Color getColor()
          Gets the colot to plot on a chart.
 Coor getCoor()
          Gets R.A.
 java.lang.String getCoorString()
          Gets a string representing the R.A.
 java.lang.String getCoorStringWithoutUnit()
          Gets a string representing the R.A.
 double getDecl()
          Gets Decl.
static java.lang.String getItemDelimiter()
          Gets a string representing the delimiter between each items, that is two space characters.
static java.lang.String getKeyAndValueDelimiter()
          Gets a string representing the delimiter between the key and the value, that is a colon.
 KeyAndValue[] getKeyAndValues()
          Gets an array of keys and values to output.
 java.lang.String getName()
          Gets the name of this star.
 java.lang.String getOutputString()
          Returns a string representation of the state of this object.
 java.lang.String[] getOutputStringsWithXY()
          Returns an array of string representations of the state of stars contained in this object.
 java.lang.String getOutputStringWithoutName()
          Returns a string representation of the state of this object.
 java.lang.String getOutputStringWithXY()
          Returns a string representation of the state of this object.
 StarPair getPair()
          Gets the pair which contains this object.
 java.lang.String getPositionString()
          Gets a string representing the (x,y) position.
 java.lang.String getPxfString()
          Returns a string representation of the state of this object for PXF output.
 java.lang.String[] getPxfStringsWithXY()
          Returns an array of string representations of the state of stars contained in this object.
 java.lang.String getPxfStringWithXY()
          Returns a string representation of the state of this object for PXF output.
 double getRA()
          Gets R.A.
 java.lang.String getVsnetName()
          Gets the name of this star in a format for the VSNET (Variable Star Network).
 void mapCoordinatesToXY(ChartMapFunction cmf)
          Maps the R.A.
 void mapCoordinatesToXY(ChartMapFunction cmf, DistortionField df)
          Maps the R.A.
 void mapXYToCoordinates(ChartMapFunction cmf)
          Maps the (x,y) position to the R.A.
 void mapXYToCoordinates(ChartMapFunction cmf, DistortionField df)
          Maps the (x,y) position to the R.A.
 void setColor(java.awt.Color new_color)
          Sets the colot to plot on a chart.
 void setCoor(Coor new_coor)
          Sets R.A.
 void setKeyAndValue(KeyAndValue key_and_value)
          Sets the value of the specified key.
 void setPair(StarPair pair)
          Sets the pair which contains this object.
 
Methods inherited from class net.aerith.misao.util.star.StarPosition
getMag, getOutputStrings, paramString, setMag, toString
 
Methods inherited from class net.aerith.misao.util.Position
add, getDistanceFrom, getPositionAngleTo, getX, getY, rescale, setPosition, setX, setY
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

coor

protected Coor coor
The R.A. and Decl.

container_pair

protected StarPair container_pair
The pair which contains this object.

color

protected java.awt.Color color
The colot to plot on a chart.
Constructor Detail

Star

public Star()
Constructs an empty Star. All member fields are set as 0.
Method Detail

getRA

public double getRA()
Gets R.A.
Specified by:
getRA in interface Coordinates
Returns:
the R.A.

getDecl

public double getDecl()
Gets Decl.
Specified by:
getDecl in interface Coordinates
Returns:
the Decl.

getCoor

public Coor getCoor()
Gets R.A. and Decl.
Returns:
the R.A. and Decl.

setCoor

public void setCoor(Coor new_coor)
Sets R.A. and Decl.
Parameters:
new_coor - the new R.A. and Decl.

getColor

public java.awt.Color getColor()
Gets the colot to plot on a chart.

setColor

public void setColor(java.awt.Color new_color)
Sets the colot to plot on a chart.

getName

public java.lang.String getName()
Gets the name of this star. In principle, this method must be overrided in subclasses. This method returns such a string as J123456.78+012345.6. The name can have some single space characters, but cannot have double space characters.
Returns:
the name of this star.

getVsnetName

public java.lang.String getVsnetName()
Gets the name of this star in a format for the VSNET (Variable Star Network). In principle, this method must be overrided in subclasses. This method returns the name itself. The name cannot have any space characters.
Returns:
the name of this star.

mapCoordinatesToXY

public void mapCoordinatesToXY(ChartMapFunction cmf)
Maps the R.A. and Decl. to the (x,y) position based on the specified ChartMapFunction.
Parameters:
cmf - the map function.

mapCoordinatesToXY

public void mapCoordinatesToXY(ChartMapFunction cmf,
                               DistortionField df)
Maps the R.A. and Decl. to the (x,y) position based on the specified ChartMapFunction.
Parameters:
cmf - the map function.
df - the distortion field.

mapXYToCoordinates

public void mapXYToCoordinates(ChartMapFunction cmf)
Maps the (x,y) position to the R.A. and Decl. based on the specified ChartMapFunction.
Parameters:
cmf - the map function.

mapXYToCoordinates

public void mapXYToCoordinates(ChartMapFunction cmf,
                               DistortionField df)
Maps the (x,y) position to the R.A. and Decl. based on the specified ChartMapFunction.
Parameters:
cmf - the map function.
df - the distortion field.

getPair

public StarPair getPair()
Gets the pair which contains this object.
Returns:
the pair which contains this object.

setPair

public void setPair(StarPair pair)
Sets the pair which contains this object.
Parameters:
pair - the pair which contains this object.

equals

public boolean equals(Star star)
Returns true when the specified star equals to this object.
Returns:
true when the specified star equals to this object.

getItemDelimiter

public static final java.lang.String getItemDelimiter()
Gets a string representing the delimiter between each items, that is two space characters.
Returns:
the string representing the delimiter between each items.

getKeyAndValueDelimiter

public static final java.lang.String getKeyAndValueDelimiter()
Gets a string representing the delimiter between the key and the value, that is a colon.
Returns:
the string representing the delimiter between the key and the value.

getCoorString

public java.lang.String getCoorString()
Gets a string representing the R.A. and Decl. in a proper format and accuracy. This method can be overrided in subclasses. This method returns such a string as 12h34m56s.78 +01o23'45".6.
Returns:
the string representing R.A. and Decl.

getCoorStringWithoutUnit

public java.lang.String getCoorStringWithoutUnit()
Gets a string representing the R.A. and Decl. in a proper format and accuracy without unit.
Returns:
the string representing R.A. and Decl.

getPositionString

public java.lang.String getPositionString()
Gets a string representing the (x,y) position. This method returns such a string as (1234.56, 1234.56).
Returns:
the string representing (x,y) position.

getKeyAndValues

public KeyAndValue[] getKeyAndValues()
Gets an array of keys and values to output. In principle, this method must be overrided in subclasses. This method returns an empty array.
Returns:
an array of keys and values to output.

setKeyAndValue

public void setKeyAndValue(KeyAndValue key_and_value)
Sets the value of the specified key. In principle, this method must be overrided in subclasses.
Parameters:
key_and_value - the key and value to set.

getOutputString

public java.lang.String getOutputString()
Returns a string representation of the state of this object.
Overrides:
getOutputString in class StarPosition
Returns:
a string representation of the state of this object.

getOutputStringWithoutName

public java.lang.String getOutputStringWithoutName()
Returns a string representation of the state of this object.
Returns:
a string representation of the state of this object.

getOutputStringWithXY

public java.lang.String getOutputStringWithXY()
Returns a string representation of the state of this object.
Returns:
a string representation of the state of this object.

getOutputStringsWithXY

public java.lang.String[] getOutputStringsWithXY()
Returns an array of string representations of the state of stars contained in this object. In general, it only returns a string representation of the state of only this object itself, except for UnifiedStar and BlendingStar, the subclasses of Star.
Returns:
an array of string representations.

getPxfString

public java.lang.String getPxfString()
Returns a string representation of the state of this object for PXF output.
Returns:
a string representation of the state of this object.

getPxfStringWithXY

public java.lang.String getPxfStringWithXY()
Returns a string representation of the state of this object for PXF output.
Returns:
a string representation of the state of this object.

getPxfStringsWithXY

public java.lang.String[] getPxfStringsWithXY()
Returns an array of string representations of the state of stars contained in this object. In general, it only returns a string representation of the state of only this object itself, except for UnifiedStar and BlendingStar, the subclasses of Star.
Returns:
an array of string representations.