|
|||||||||
| 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.Lens
public class Lens
A Lens describes a lens used to extend or reduce a focal length. Implementations of Lens can be Barlow lenses or Shapley lenses depending on the given factor. The model name and the factor are mandatory fields which have to be set.
| Field Summary |
|---|
| Fields inherited from interface de.lehmannet.om.ILens |
|---|
XML_ELEMENT_FACTOR, XML_ELEMENT_LENS, XML_ELEMENT_MODEL, XML_ELEMENT_VENDOR |
| Fields inherited from interface de.lehmannet.om.ISchemaElement |
|---|
XML_ELEMENT_ATTRIBUTE_ID |
| Constructor Summary | |
|---|---|
Lens(org.w3c.dom.Node lens)
Constructs a new instance of a Lens from an given XML Schema Node. |
|
Lens(java.lang.String model,
float factor)
Constructs a new instance of a Lens. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Element |
addAsLinkToXmlElement(org.w3c.dom.Element element)
Adds the lens link to an given XML DOM Element The lens element itself will be attached to given elements ownerDocument. |
org.w3c.dom.Element |
addToXmlElement(org.w3c.dom.Element element)
Adds this Lens to a given parent XML DOM Element. |
java.lang.String |
getDisplayName()
Returns a display name for this element. |
float |
getFactor()
Returns the focal length factor of this lens. |
java.lang.String |
getModel()
Returns the model name of the lens. |
java.lang.String |
getVendor()
Returns the vendor name of the lens. |
void |
setFactor(float factor)
Sets the focal length factor of the lens. |
void |
setModel(java.lang.String modelname)
Sets the model name for the lens. |
void |
setVendor(java.lang.String vendorname)
Sets the vendor name of the lens. |
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 Lens(org.w3c.dom.Node lens)
throws SchemaException,
java.lang.IllegalArgumentException
lens - The XML Schema element that represents this lens
java.lang.IllegalArgumentException - if parameter is null,
SchemaException - if the given Node does not match the XML Schema
specifications
public Lens(java.lang.String model,
float factor)
throws java.lang.IllegalArgumentException
model - The lens model namefactor - The focal length factor of the lensjava.lang.IllegalArgumentException - if model is null or
factor is Float.NaN or <= 0| Method Detail |
|---|
public java.lang.String getDisplayName()
getDisplayName in interface ISchemaElementgetDisplayName in class SchemaElementjava.lang.Object.toString();public java.lang.String toString()
Lens Model: Powermate
Vendor: TeleVue
Focal length factor: 5.0
toString in class java.lang.ObjectObjectpublic org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element element)
addToXmlElement in interface ILensparent - The parent element for this Lens
null if parent was null.Elementpublic org.w3c.dom.Element addAsLinkToXmlElement(org.w3c.dom.Element element)
addAsLinkToXmlElement in interface ILenselement - The element under which the the lens link is created
null if element was null.Elementpublic float getFactor()
getFactor in interface ILenspublic java.lang.String getModel()
getModel in interface ILenspublic java.lang.String getVendor()
getVendor in interface ILensnull is returned the vendor name was never set.
public void setFactor(float factor)
throws java.lang.IllegalArgumentException
setFactor in interface ILensfactor - The new focal length factor to be set.
java.lang.IllegalArgumentException - if factor was Float.NaN or <= 0
public void setModel(java.lang.String modelname)
throws java.lang.IllegalArgumentException
setModel in interface ILensmodelname - The new model name to be set.
java.lang.IllegalArgumentException - if modelname was nullpublic void setVendor(java.lang.String vendorname)
setVendor in interface ILensvendorname - The new vendor name to be set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||