|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.ml.om.SchemaElement
org.jscience.ml.om.Eyepiece
public class Eyepiece
Eyepiece implements the class org.jscience.ml.om.IEyepiece. An Eyepiece describes a optical eyepiece. The model name and the focalLength are mandatory fields which have to be set.
| Field Summary |
|---|
| Fields inherited from interface org.jscience.ml.om.IEyepiece |
|---|
XML_ELEMENT_APPARENTFOV, XML_ELEMENT_EYEPIECE, XML_ELEMENT_FOCALLENGTH, XML_ELEMENT_MODEL, XML_ELEMENT_VENDOR |
| Fields inherited from interface org.jscience.ml.om.ISchemaElement |
|---|
XML_ELEMENT_ATTRIBUTE_ID |
| Constructor Summary | |
|---|---|
Eyepiece(org.w3c.dom.Node eyepiece)
Constructs a new instance of an Eyepiece from an given XML Schema Node. |
|
Eyepiece(java.lang.String model,
float focalLength)
Constructs a new instance of an Eyepiece. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Element |
addAsLinkToXmlElement(org.w3c.dom.Element element)
Adds the eyepiece link to an given XML DOM Element The eyepiece element itself will be attached to given elements ownerDocument. |
org.w3c.dom.Element |
addToXmlElement(org.w3c.dom.Element element)
Adds this Eyepiece to a given parent XML DOM Element. |
boolean |
equals(java.lang.Object obj)
Overwrittes equals(Object) method from java.lang.Object. |
Angle |
getApparentFOV()
Returns the apparent field of view of this eyepiece. |
java.lang.String |
getDisplayName()
Returns a display name for this element. |
float |
getFocalLength()
Returns the focal length of this eyepiece. |
java.lang.String |
getModel()
Returns the model name of the eyepiece. |
java.lang.String |
getVendor()
Returns the vendor name of the eyepiece. |
boolean |
setApparentFOV(Angle apparentFOV)
Sets the apparent field of view of this eyepiece. |
void |
setFocalLength(float focalLength)
Sets the focal length of the eyepiece. |
void |
setModel(java.lang.String modelname)
Sets the model name for the eyepiece. |
void |
setVendor(java.lang.String vendorname)
Sets the vendor name of the eyepiece. |
java.lang.String |
toString()
Overwrittes toString() method from java.lang.Object. |
| 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 |
|---|
public Eyepiece(org.w3c.dom.Node eyepiece)
throws SchemaException,
java.lang.IllegalArgumentException
eyepiece - The XML Schema element that represents this eyepiece
java.lang.IllegalArgumentException - if parameter is null,
SchemaException - if the given Node does not match the XML Schema
specifications
public Eyepiece(java.lang.String model,
float focalLength)
throws java.lang.IllegalArgumentException
model - The eyepieces model namefocalLength - The focal length of the eyepiece
java.lang.IllegalArgumentException - if model is null or
focalLength is Float.NaN| Method Detail |
|---|
public java.lang.String getDisplayName()
getDisplayName in interface ISchemaElementgetDisplayName in class SchemaElementjava.lang.Object.toString();public java.lang.String toString()
Eyepiece Model: Ultra Wide Angle 8.8mm
* Vendor: Meade Focal length: 8.8 Apparent field of view: 84 DEG
toString in class java.lang.ObjectObjectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The Object to compare this Eyepiece with.
true if the given Object is an instance of
IEyepiece and its modelname, vendorname, focalLength and
apparent field of view matches with this Eyepiece.Objectpublic org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element element)
addToXmlElement in interface IEyepieceelement - The parent element for this Eyepiece
null if parent was
null.Elementpublic org.w3c.dom.Element addAsLinkToXmlElement(org.w3c.dom.Element element)
addAsLinkToXmlElement in interface IEyepieceelement - The element under which the the eyepiece link is created
null
if element was null.Elementpublic Angle getApparentFOV()
getApparentFOV in interface IEyepiecenull is returned the apparent field of
view value was never set.Anglepublic float getFocalLength()
getFocalLength in interface IEyepiecepublic java.lang.String getModel()
getModel in interface IEyepiecepublic java.lang.String getVendor()
getVendor in interface IEyepiecenull is returned the vendor name was never
set.public boolean setApparentFOV(Angle apparentFOV)
setApparentFOV in interface IEyepieceapparentFOV - The new apparent field of view to be set.
true if the new apparent field of view
could be set. If false is returned the parameter
was null, or the Angles value was negative or 0 (apparent field
of view will not be changed if false is returned).
public void setFocalLength(float focalLength)
throws java.lang.IllegalArgumentException
setFocalLength in interface IEyepiecefocalLength - The new focal length to be set.
java.lang.IllegalArgumentException - if focalLength was
Float.NaN
public void setModel(java.lang.String modelname)
throws java.lang.IllegalArgumentException
setModel in interface IEyepiecemodelname - The new model name to be set.
java.lang.IllegalArgumentException - if modelname was nullpublic void setVendor(java.lang.String vendorname)
setVendor in interface IEyepiecevendorname - The new vendor name to be set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||