org.jscience.ml.om
Class EquPositionReferenceFrame

java.lang.Object
  extended by org.jscience.ml.om.EquPositionReferenceFrame

public class EquPositionReferenceFrame
extends java.lang.Object

EquPositionReferenceFrame describes the landscape in which certain position values are valid.
This class should be used by all instances of org.jscience.ml.om.IPosition to describe in which position reference frame their position values are valid.

Since:
1.0

Field Summary
static java.lang.String EQUINOX_2000
          DOCUMENT ME!
static java.lang.String ORIGIN_GEOCENTRIC
          DOCUMENT ME!
static java.lang.String ORIGIN_TOPOCENTRIC
          DOCUMENT ME!
 
Constructor Summary
EquPositionReferenceFrame(java.lang.String origin, java.lang.String equinox)
          Creates an instance of an EquPositionReferenceFrame.
 
Method Summary
 org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element parent)
          Adds this EquPositionReferenceFrame to an given parent XML DOM Element.
 boolean equals(java.lang.Object obj)
          Overwrittes equals(Object) method from java.lang.Object.
 java.lang.String getEquinox()
          Returns the equinox date of this position reference frame.
 java.lang.String getOrigin()
          Returns the origin of this position reference frame.
 void setEquinox(java.lang.String equinox)
          Sets the equinox date of this position reference frame.
 void setOrigin(java.lang.String origin)
          Sets the origin of this position reference frame.
 java.lang.String toString()
          Overwrittes toString() method from java.lang.Object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ORIGIN_GEOCENTRIC

public static final java.lang.String ORIGIN_GEOCENTRIC
DOCUMENT ME!

See Also:
Constant Field Values

ORIGIN_TOPOCENTRIC

public static final java.lang.String ORIGIN_TOPOCENTRIC
DOCUMENT ME!

See Also:
Constant Field Values

EQUINOX_2000

public static final java.lang.String EQUINOX_2000
DOCUMENT ME!

See Also:
Constant Field Values
Constructor Detail

EquPositionReferenceFrame

public EquPositionReferenceFrame(java.lang.String origin,
                                 java.lang.String equinox)
                          throws java.lang.IllegalArgumentException
Creates an instance of an EquPositionReferenceFrame.

Parameters:
origin - The origin of the position reference frame. All valid values can be accessed by this classes constants.
equinox - A equinox date. Should be formed like e.g. J2000.0
Throws:
java.lang.IllegalArgumentException - if origin or equinox is null or origin does not have a valid value.
Method Detail

toString

public java.lang.String toString()
Overwrittes toString() method from java.lang.Object.
Returns the position reference frame as string in form:
Example:
Topocentric J2000.0

Overrides:
toString in class java.lang.Object
Returns:
A string representing the position reference frame
See Also:
Object

equals

public boolean equals(java.lang.Object obj)
Overwrittes equals(Object) method from java.lang.Object.
Checks if this EquPositionReferenceFrame and the given Object are equal. The given object is equal with this EquPositionReferenceFrame, if its an instance from class EquPositionReferenceFrame and its equinox date and the position origin are equal with this instances values.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The Object to compare this EquPositionReferenceFrame with.
Returns:
true if the given Object is an instance of EquPositionReferenceFrame and its equinox date and origin are equal with this PositionReferenceFrames values.
*
See Also:
Object

addToXmlElement

public org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element parent)
Adds this EquPositionReferenceFrame to an given parent XML DOM Element. The EquPositionReferenceFrame Element will be set as a child element of the passed Element.

Parameters:
parent - The parent element for this EquPositionReferenceFrame
Returns:
Returns the Element given as parameter with this EquPositionReferenceFrame as child Element.
* Might return null if parent was null.
See Also:
Element

getEquinox

public java.lang.String getEquinox()
Returns the equinox date of this position reference frame.

Returns:
The equinox date of this position reference frame

getOrigin

public java.lang.String getOrigin()
Returns the origin of this position reference frame.

Returns:
The origin of this position reference frame

setEquinox

public void setEquinox(java.lang.String equinox)
                throws java.lang.IllegalArgumentException
Sets the equinox date of this position reference frame.
String should be formed like J2000.0

Parameters:
equinox - The equinox date to set
Throws:
java.lang.IllegalArgumentException - if equinox was null

setOrigin

public void setOrigin(java.lang.String origin)
               throws java.lang.IllegalArgumentException
Sets the origin of this position reference frame.
All valid origin values can be accessed by this classes constants.

Parameters:
origin - The new origin of this position reference frame
Throws:
java.lang.IllegalArgumentException - if origin was null or did not have valid value.