de.lehmannet.om
Interface ILens

All Superinterfaces:
ISchemaElement
All Known Implementing Classes:
Lens

public interface ILens
extends ISchemaElement

An ILens describes a lens used to extend or reduce a focal length. Implementations of ILens 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.

Since:
1.7
Author:
doergn@users.sourceforge.net

Field Summary
static java.lang.String XML_ELEMENT_FACTOR
          Constant for XML representation: factor element name Example:
<lens>
More stuff goes here <factor>lens focal length factor goes here</factor> More stuff goes here </lens>
static java.lang.String XML_ELEMENT_LENS
          Constant for XML representation: lens element name
static java.lang.String XML_ELEMENT_MODEL
          Constant for XML representation: model element name Example:
<lens>
More stuff goes here <model>Model name goes here</model> More stuff goes here </lens>
static java.lang.String XML_ELEMENT_VENDOR
          Constant for XML representation: vendor element name Example:
<lens>
More stuff goes here <vendor>Vendor name goes here</vendor> More stuff goes here </lens>
 
Fields inherited from interface de.lehmannet.om.ISchemaElement
XML_ELEMENT_ATTRIBUTE_ID
 
Method Summary
 org.w3c.dom.Element addAsLinkToXmlElement(org.w3c.dom.Element parent)
          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.
 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.
 
Methods inherited from interface de.lehmannet.om.ISchemaElement
getDisplayName, getID
 

Field Detail

XML_ELEMENT_LENS

static final java.lang.String XML_ELEMENT_LENS
Constant for XML representation: lens element name

See Also:
Constant Field Values

XML_ELEMENT_MODEL

static final java.lang.String XML_ELEMENT_MODEL
Constant for XML representation: model element name Example:
<lens>
More stuff goes here <model>Model name goes here</model> More stuff goes here </lens>

See Also:
Constant Field Values

XML_ELEMENT_VENDOR

static final java.lang.String XML_ELEMENT_VENDOR
Constant for XML representation: vendor element name Example:
<lens>
More stuff goes here <vendor>Vendor name goes here</vendor> More stuff goes here </lens>

See Also:
Constant Field Values

XML_ELEMENT_FACTOR

static final java.lang.String XML_ELEMENT_FACTOR
Constant for XML representation: factor element name Example:
<lens>
More stuff goes here <factor>lens focal length factor goes here</factor> More stuff goes here </lens>

See Also:
Constant Field Values
Method Detail

addToXmlElement

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

Parameters:
parent - The parent element for this Lens
Returns:
Returns the element given as parameter with this Lens 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 lens link to an given XML DOM Element The lens element itself will be attached to given elements ownerDocument. If the ownerDocument has no lens container, it will be created.
Example:
<parameterElement>
<lensLink>123</lensLink>
</parameterElement>
More stuff of the xml document goes here
<lensContainer>
<lens id="123">
lens description goes here
</lens>
</lensContainer>

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

getFactor

float getFactor()
Returns the focal length factor of this lens.
Factors > 1 represent barlow lenses
Factors < 1 represent shapley lenses
Factors <= 0 are not allowed

Returns:
Returns the focal length factor of the lens.

getModel

java.lang.String getModel()
Returns the model name of the lens.

Returns:
Returns a String representing the lenses model name.

getVendor

java.lang.String getVendor()
Returns the vendor name of the lens.

Returns:
Returns a String representing the lenses vendor name.
If null is returned the vendor name was never set.

setFactor

void setFactor(float factor)
Sets the focal length factor of the lens.
Value must be > 0.
Factors > 1 represent barlow lenses
Factors < 1 represent shapley lenses
Factors <= 0 are not allowed

Parameters:
factor - The new focal length factor to be set.

setModel

void setModel(java.lang.String modelname)
Sets the model name for the lens.

Parameters:
modelname - The new model name to be set.

setVendor

void setVendor(java.lang.String vendorname)
Sets the vendor name of the lens.

Parameters:
vendorname - The new vendor name to be set.