|
|||||||||
| 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.Eyepiece
public class Eyepiece
Eyepiece implements the class de.lehmannet.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 de.lehmannet.om.IEyepiece |
|---|
XML_ELEMENT_APPARENTFOV, XML_ELEMENT_EYEPIECE, XML_ELEMENT_FOCALLENGTH, XML_ELEMENT_MAXFOCALLENGTH, XML_ELEMENT_MODEL, XML_ELEMENT_VENDOR |
| Fields inherited from interface de.lehmannet.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. |
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. |
float |
getMaxFocalLength()
Returns the maximal focal length of this eyepiece in case this eyepiece is a zoom eyepiece. |
java.lang.String |
getModel()
Returns the model name of the eyepiece. |
java.lang.String |
getVendor()
Returns the vendor name of the eyepiece. |
boolean |
isZoomEyepiece()
Returns true if this eyepiece is a zoom 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 |
setMaxFocalLength(float maxFocalLength)
Sets the maximal focal length of the zoom 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 de.lehmannet.om.SchemaElement |
|---|
equals, getID, setID |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.lehmannet.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 org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element element)
addToXmlElement in interface IEyepieceparent - 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 IEyepiecegetMaxFocalLength()public float getMaxFocalLength()
Float.NaN in case this eyepiece is not
a zoom eyepiece.
getMaxFocalLength 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 isZoomEyepiece()
true if this eyepiece is a zoom eyepiece.
isZoomEyepiece in interface IEyepiecetrue if this eyepiece is a zoom eyepiecepublic 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.NaNpublic void setMaxFocalLength(float maxFocalLength)
setMaxFocalLength in interface IEyepiecemaxFocalLength - The new maximal focal length to be set.
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 | ||||||||