org.jscience.ml.om.extension.deepsky
Class DeepSkyTargetOC

java.lang.Object
  extended by org.jscience.ml.om.SchemaElement
      extended by org.jscience.ml.om.Target
          extended by org.jscience.ml.om.extension.deepsky.DeepSkyTarget
              extended by org.jscience.ml.om.extension.deepsky.DeepSkyTargetOC
All Implemented Interfaces:
IExtendableSchemaElement, ISchemaElement, ITarget

public class DeepSkyTargetOC
extends DeepSkyTarget

DeepSkyTargetOC extends the org.jscience.ml.om.extension.deepsky.DeepSkyTarget class.
Its specialised for open clusters.

Since:
1.0

Field Summary
 
Fields inherited from interface org.jscience.ml.om.ITarget
XML_ELEMENT_ALIASNAME, XML_ELEMENT_CONSTELLATION, XML_ELEMENT_DATASOURCE, XML_ELEMENT_NAME, XML_ELEMENT_TARGET, XML_XSI_TYPE
 
Fields inherited from interface org.jscience.ml.om.ISchemaElement
XML_ELEMENT_ATTRIBUTE_ID
 
Constructor Summary
DeepSkyTargetOC(org.w3c.dom.Node targetElement, IObserver[] observers)
          Constructs a new instance of a DeepSkyTargetOC from a given DOM target Element.
DeepSkyTargetOC(java.lang.String name, IObserver observer)
          Constructs a new instance of a DeepSkyTargetOC.
DeepSkyTargetOC(java.lang.String name, java.lang.String datasource)
          Constructs a new instance of a DeepSkyTargetOC.
 
Method Summary
 org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element element)
          Adds this Target to a given parent XML DOM Element.
 int getAmountOfStars()
          Returns the amount of stars in the open cluster.
 double getBrightestStar()
          Returns the magnitude of the brightest star in the open cluster.
 java.lang.String getClusterClassification()
          Returns the classification (according to Trumpler) of the open cluster.
 java.lang.String getXSIType()
          Returns the XML schema instance type of the implementation.
 void setAmountOfStars(int newAmountOfStars)
          Sets the amount of stars in the open cluster.
 void setBrightestStar(double newBrightestStar)
          Sets the magnitude of the brightest star in the open cluster
 void setClusterClassification(java.lang.String newClassification)
          Sets the cluster classification (according to Trumpler).
 
Methods inherited from class org.jscience.ml.om.extension.deepsky.DeepSkyTarget
createXmlDeepSkyTargetElement, equals, getLargeDiameter, getSmallDiameter, getSurfaceBrightness, getVisibleMagnitude, setLargeDiameter, setSmallDiameter, setSurfaceBrightness, setVisibleMagnitude, toString
 
Methods inherited from class org.jscience.ml.om.Target
addAliasName, addAliasNames, addAsLinkToXmlElement, createXmlTargetElement, getAliasNames, getConstellation, getDatasource, getDisplayName, getName, getObserver, getPosition, removeAliasName, setAliasNames, setConstellation, setDatasource, setName, setObserver, setPosition
 
Methods inherited from class org.jscience.ml.om.SchemaElement
getID, setID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jscience.ml.om.ISchemaElement
getID
 

Constructor Detail

DeepSkyTargetOC

public DeepSkyTargetOC(org.w3c.dom.Node targetElement,
                       IObserver[] observers)
                throws SchemaException
Constructs a new instance of a DeepSkyTargetOC from a given DOM target Element.
Normally this constructor is called by org.jscience.ml.om.util.SchemaLoader. Please mind that Target has to have a element, or a element. If a element is set, a array with Observers must be passed to check, whether the link is valid.

Parameters:
observers - Array of IObserver that might be linked from this observation, can be NULL if datasource element is set
targetElement - The origin XML DOM Element
Throws:
SchemaException - if given targetElement was null

DeepSkyTargetOC

public DeepSkyTargetOC(java.lang.String name,
                       java.lang.String datasource)
Constructs a new instance of a DeepSkyTargetOC.

Parameters:
name - The name of the open cluster
datasource - The datasource of the open cluster

DeepSkyTargetOC

public DeepSkyTargetOC(java.lang.String name,
                       IObserver observer)
Constructs a new instance of a DeepSkyTargetOC.

Parameters:
name - The name of the open cluster
observer - The observer who is the originator of the open cluster
Method Detail

addToXmlElement

public 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.

Specified by:
addToXmlElement in interface ITarget
Specified by:
addToXmlElement in class DeepSkyTarget
Parameters:
parent - 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

getXSIType

public java.lang.String getXSIType()
Returns the XML schema instance type of the implementation.
Example:


Specified by:
getXSIType in interface IExtendableSchemaElement
Specified by:
getXSIType in class DeepSkyTarget
Returns:
The xsi:type value of this implementation

getAmountOfStars

public int getAmountOfStars()
Returns the amount of stars in the open cluster.

Returns:
The amount of stars in the open cluster. The returned value might be -1 if the value was never set

getClusterClassification

public java.lang.String getClusterClassification()
Returns the classification (according to Trumpler) of the open cluster.

Returns:
The classification of the open cluster (according to Trumpler) The returned value might be null if the value was never set

getBrightestStar

public double getBrightestStar()
Returns the magnitude of the brightest star in the open cluster.

Returns:
The magnitude of the brightest star in the open cluster. The returned value might be Double.NaN if the value was never set

setAmountOfStars

public void setAmountOfStars(int newAmountOfStars)
Sets the amount of stars in the open cluster. All passed values lower than 1 are treated as -1, which means that the value was never set.

Parameters:
newAmountOfStars - The new amount of stars in the open cluster

setBrightestStar

public void setBrightestStar(double newBrightestStar)
Sets the magnitude of the brightest star in the open cluster

Parameters:
newBrightestStar - The new magnitude of the birghtest star in the open cluster

setClusterClassification

public void setClusterClassification(java.lang.String newClassification)
Sets the cluster classification (according to Trumpler).

Parameters:
newClassification - The new cluster classification as String