org.jscience.ml.om
Interface ITarget

All Superinterfaces:
IExtendableSchemaElement, ISchemaElement
All Known Implementing Classes:
DeepSkyTarget, DeepSkyTargetDN, DeepSkyTargetDS, DeepSkyTargetGC, DeepSkyTargetGN, DeepSkyTargetGX, DeepSkyTargetNA, DeepSkyTargetOC, DeepSkyTargetPN, DeepSkyTargetQS, SolarSystemTarget, SolarSystemTargetComet, SolarSystemTargetMinorPlanet, SolarSystemTargetMoon, SolarSystemTargetPlanet, SolarSystemTargetSun, Target

public interface ITarget
extends ISchemaElement, IExtendableSchemaElement

An ITarget describes a celestial object which might be interessting for astronomical observation.
An ITraget is a very general description of an astronomical object, representing just the objects name, the celestial position and some optional alias names. The optional names might be used for colloquial names of a astronomical object.
E.g. the Messier catalogue object M51 is also known as "Whirlpool Galaxy".

Since:
1.0

Field Summary
static java.lang.String XML_ELEMENT_ALIASNAME
          Constant for XML representation: Targets alias name element name.
static java.lang.String XML_ELEMENT_CONSTELLATION
          Constant for XML representation: Celestial constellation where the target can be found.
static java.lang.String XML_ELEMENT_DATASOURCE
          Constant for XML representation: Datasource that is the origin of this target.
static java.lang.String XML_ELEMENT_NAME
          Constant for XML representation: Targets name element name.
static java.lang.String XML_ELEMENT_TARGET
          Constant for XML representation: ITarget element name.
static java.lang.String XML_XSI_TYPE
          Constant for XML Schema Instance type.
 
Fields inherited from interface org.jscience.ml.om.ISchemaElement
XML_ELEMENT_ATTRIBUTE_ID
 
Method Summary
 boolean addAliasName(java.lang.String newAliasName)
          Adds a new alias name to the target.
 org.w3c.dom.Element addAsLinkToXmlElement(org.w3c.dom.Element parent)
          Adds the target link to an given XML DOM Element The target element itself will be attached to given elements ownerDocument.
 org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element element)
          Adds this Target to a given parent XML DOM Element.
 java.lang.String[] getAliasNames()
          Returns all alias names.
 java.lang.String getConstellation()
          Returns the celestial constellation, where the target can be found.
 java.lang.String getDatasource()
          Returns the datasource which is the origin of the target.
 java.lang.String getName()
          Returns the name of the target.
 IObserver getObserver()
          Returns the observer who is the originator of the target.
 EquPosition getPosition()
          Returns the position of the target.
 boolean removeAliasName(java.lang.String aliasName)
          Removes a alias name from the target.
 void setAliasNames(java.lang.String[] newAliasNames)
          Sets an array of new alias names to this target.
 void setConstellation(java.lang.String constellation)
          Sets the celestial constellation, where the target can be found.
 void setDatasource(java.lang.String datasource)
          Sets the datasource of the target.
 void setName(java.lang.String name)
          Sets the name of the target.
 void setObserver(IObserver observer)
          Sets the observer who is the originator of the target.
 void setPosition(EquPosition position)
          Sets the position of the target.
 
Methods inherited from interface org.jscience.ml.om.ISchemaElement
getDisplayName, getID
 
Methods inherited from interface org.jscience.ml.om.IExtendableSchemaElement
getXSIType
 

Field Detail

XML_ELEMENT_TARGET

static final java.lang.String XML_ELEMENT_TARGET
Constant for XML representation: ITarget element name.
Example:
<target>More stuff goes here</target>

See Also:
Constant Field Values

XML_XSI_TYPE

static final java.lang.String XML_XSI_TYPE
Constant for XML Schema Instance type.
As target elements my differ from type to type (i.e. DeepSkyTarget, VariableStarTarget...) this constant can identifies a type.
Example:
<target xsi:type="fgca:deepSkyGX">More stuff goes here</target>

See Also:
Constant Field Values

XML_ELEMENT_NAME

static final java.lang.String XML_ELEMENT_NAME
Constant for XML representation: Targets name element name.
Example:
<target>
More stuff goes here <name>Target name goes here</name> More stuff goes here </target>

See Also:
Constant Field Values

XML_ELEMENT_ALIASNAME

static final java.lang.String XML_ELEMENT_ALIASNAME
Constant for XML representation: Targets alias name element name.
Example:
<target>
More stuff goes here <name>Target name goes here</name> <alias>Target alias name goes here</alias> More stuff goes here </target>

See Also:
Constant Field Values

XML_ELEMENT_CONSTELLATION

static final java.lang.String XML_ELEMENT_CONSTELLATION
Constant for XML representation: Celestial constellation where the target can be found.
Example:
<target>
More stuff goes here <constellation>Constellationname goes here</constellation> More stuff goes here </target>

See Also:
Constant Field Values

XML_ELEMENT_DATASOURCE

static final java.lang.String XML_ELEMENT_DATASOURCE
Constant for XML representation: Datasource that is the origin of this target.
Whether the datasource is given, or a observer is referenced. Example:
<target>
More stuff goes here <datasource>Datasource goes here</datasource> More stuff goes here </target>

See Also:
Constant Field Values
Method Detail

addToXmlElement

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

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

addAsLinkToXmlElement

org.w3c.dom.Element addAsLinkToXmlElement(org.w3c.dom.Element parent)
Adds the target link to an given XML DOM Element The target element itself will be attached to given elements ownerDocument. If the ownerDocument has no target container, it will be created.
Example:
<parameterElement>
<targetLink>123</targetLink>
</parameterElement>
More stuff of the xml document goes here
<targetContainer>
<target id="123">
target description goes here
</target>
</targetContainer>

Parameters:
parent - The element under which the the target link is created
Returns:
Returns the Element given as parameter with a additional target link, and the target element under the target container of the ownerDocument Might return null if element was null.
See Also:
Element

addAliasName

boolean addAliasName(java.lang.String newAliasName)
Adds a new alias name to the target.
The alias name can be any alternative name of the astronomical object.
Example:
Object name = M51
Alias name = Whirlpool Galaxy

Parameters:
newAliasName - A alias name of the astronomical object
Returns:
Returns true if the alias name could be added to the target.

setAliasNames

void setAliasNames(java.lang.String[] newAliasNames)
Sets an array of new alias names to this target.
All current aliasNames will be deleted! If you want to add alias names without deleting the existing ones, please use Target.addAliasNames(String) or Target.addAliasName(String).
If null is passed, the given alias names are deleted.

Parameters:
newAliasNames - An arry with new alias name

removeAliasName

boolean removeAliasName(java.lang.String aliasName)
Removes a alias name from the target.

Parameters:
aliasName - The alias name that should be removed
Returns:
Returns true if the alias name could be removed from the target. If false is returned the given alias name could not be found in the targets alias name list.

getConstellation

java.lang.String getConstellation()
Returns the celestial constellation, where the target can be found.
Might return NULL if constellation was never set

Returns:
The celestial constellation

setConstellation

void setConstellation(java.lang.String constellation)
Sets the celestial constellation, where the target can be found.

Parameters:
constellation - The celestial constellation of the target

setDatasource

void setDatasource(java.lang.String datasource)
Sets the datasource of the target.

Parameters:
datasource - The datasource of the astronomical object

setObserver

void setObserver(IObserver observer)
Sets the observer who is the originator of the target.

Parameters:
observer - The observer who is the originator of this target

getObserver

IObserver getObserver()
Returns the observer who is the originator of the target.

Returns:
The observer who is the originator of this target. Might return null if observer was never set. (In this case a dataSource must exist)

getDatasource

java.lang.String getDatasource()
Returns the datasource which is the origin of the target.

Returns:
The datasource which is the origin of this target Might return null if datasource was never set. (In this case a observer must exist)

getAliasNames

java.lang.String[] getAliasNames()
Returns all alias names.

Returns:
Returns a String array with all alias names. If no alias names were set null is returned.

getName

java.lang.String getName()
Returns the name of the target.
The name should clearly identify the astronomical object. Use alias names for colloquial names of the object.

Returns:
Returns the name of the astronomical object

setName

void setName(java.lang.String name)
Sets the name of the target.
The name should clearly identify the astronomical object. For alternative names of the object add a new alias name.
If a name is already set to the target, the old name will be overwritten with new new name.

Parameters:
name - DOCUMENT ME!

getPosition

EquPosition getPosition()
Returns the position of the target.
The position of the target describes the location of the astronomical object in any popular celestial coordination system.

Returns:
The celestial position of the astronomical object

setPosition

void setPosition(EquPosition position)
Sets the position of the target.
The position of the target describes the location of the astronomical object in a popular celestial coordination system.

Parameters:
position - The position of the astronomical object in a popular coordination system