|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.lehmannet.om.SchemaElement
de.lehmannet.om.EquPosition
public class EquPosition
EquPosition provides a representation of a equatorial
celestial position.
A equatorial position is given with three values. The
right ascension and the declination
are used to define the celestial position while both
values are valid within a special reference time frame
(the third value).
| Field Summary | |
|---|---|
static java.lang.String |
DEC_DEG
|
static java.lang.String |
DEC_MIN
|
static java.lang.String |
DEC_SEC
|
static java.lang.String |
RA_HOUR
|
static java.lang.String |
RA_MIN
|
static java.lang.String |
RA_SEC
|
static java.lang.String |
XML_ELEMENT_DEC
|
static java.lang.String |
XML_ELEMENT_POSITION
|
static java.lang.String |
XML_ELEMENT_RA
|
| Fields inherited from interface de.lehmannet.om.ISchemaElement |
|---|
XML_ELEMENT_ATTRIBUTE_ID |
| Constructor Summary | |
|---|---|
EquPosition(Angle ra,
Angle dec)
|
|
EquPosition(org.w3c.dom.Node positionNode)
Constructs a new instance of a EquPosition from a given DOM target Element. |
|
EquPosition(java.lang.String ra,
java.lang.String dec)
|
|
| Method Summary | |
|---|---|
org.w3c.dom.Element |
addToXmlElement(org.w3c.dom.Element parent)
Adds this EquPosition to an given parent XML DOM Element. |
boolean |
equals(java.lang.Object obj)
Overwrittes equals(Object) method from java.lang.Object. |
java.lang.String |
getDec()
Returns the declination of this equatorial position.. |
Angle |
getDecAngle()
Returns the declination of this equatorial position as Angle. |
static java.lang.String |
getDecString(int deg,
int min,
int sec)
Returns a correct formed declination string. |
java.lang.String |
getDisplayName()
Returns a display name for this element. |
EquPositionReferenceFrame |
getFrame()
Returns the position reference frame of this equatorial position. |
java.lang.String |
getRa()
Returns the right ascension of this equatorial position. |
Angle |
getRaAngle()
Returns the right ascension of this equatorial position as Angle. |
double |
getRaDecimalHours()
Returns the right ascension of this equatorial position in decimal hours |
static java.lang.String |
getRaString(int hours,
int min,
int sec)
Returns a correct formed right ascension string. |
void |
setDec(java.lang.String dec)
Sets the declination of the equatorial position. |
void |
setDecAngle(Angle dec)
Sets the declination of the equatorial position. |
void |
setFrame(EquPositionReferenceFrame frame)
Sets the position reference frame of this equatorial position. |
void |
setRa(java.lang.String ra)
Sets the right ascension of this equatorial position. |
void |
setRaAngle(Angle ra)
Sets the right ascension of this equatorial position. |
java.lang.String |
toString()
Overwrittes toString() method from java.lang.Object. |
| Methods inherited from class de.lehmannet.om.SchemaElement |
|---|
getID, setID |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String XML_ELEMENT_POSITION
public static final java.lang.String XML_ELEMENT_RA
public static final java.lang.String XML_ELEMENT_DEC
public static final java.lang.String RA_HOUR
public static final java.lang.String RA_MIN
public static final java.lang.String RA_SEC
public static final java.lang.String DEC_DEG
public static final java.lang.String DEC_MIN
public static final java.lang.String DEC_SEC
| Constructor Detail |
|---|
public EquPosition(org.w3c.dom.Node positionNode)
throws SchemaException
positionNode - The origin XML DOM position Element
SchemaException - if given positionNode was null
public EquPosition(Angle ra,
Angle dec)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public EquPosition(java.lang.String ra,
java.lang.String dec)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException| Method Detail |
|---|
public java.lang.String getDisplayName()
getDisplayName in interface ISchemaElementgetDisplayName in class SchemaElementjava.lang.Object.toString();public java.lang.String toString()
Right ascension: 4.159876545 RAD
Declination: -0.258774154 RAD
Reference frame: Topocentric J2000.0
toString in class java.lang.ObjectObjectpublic boolean equals(java.lang.Object obj)
equals in class SchemaElementobj - The Object to compare this EquPosition with.
true if the given Object is an instance of EquPosition
and its right ascension, declination and position reference frame are equal
with this EquPosition.Object
public static java.lang.String getRaString(int hours,
int min,
int sec)
hour - Hour valuemin - Minute valuesec - Second value
public static java.lang.String getDecString(int deg,
int min,
int sec)
deg - Degree valuemin - Minute valuesec - Second value
public org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element parent)
parent - The parent element for this EquPosition
null if parent was null.Elementpublic Angle getDecAngle()
public java.lang.String getDec()
public Angle getRaAngle()
public java.lang.String getRa()
public double getRaDecimalHours()
public void setDec(java.lang.String dec)
throws java.lang.IllegalArgumentException
dec - The new declination of the equatorial position
java.lang.IllegalArgumentException - if dec was null
or the string was malformed
public void setRa(java.lang.String ra)
throws java.lang.IllegalArgumentException
ra - The right ascension of the equatorial position
java.lang.IllegalArgumentException - if ra is null or
the string was malformed
public void setDecAngle(Angle dec)
throws java.lang.IllegalArgumentException
dec - The new declination of the equatorial position
java.lang.IllegalArgumentException - if dec was null
public void setRaAngle(Angle ra)
throws java.lang.IllegalArgumentException
ra - The right ascension of the equatorial position
java.lang.IllegalArgumentException - if ra is null or
ra value is negativepublic EquPositionReferenceFrame getFrame()
public void setFrame(EquPositionReferenceFrame frame)
null is passed the new position reference frame
that is set is geocentric with equinox J2000.0
frame - The new position reference frame
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||