|
|||||||||
| 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.Site
public class Site
An Site describes an observation site where an observation took place.
A site can be identified by its latitude and longitude values, but
as for processing reasons this class has some more
mandatory fields, such as e.g. elevation and timezone.
| Field Summary |
|---|
| Fields inherited from interface de.lehmannet.om.ISite |
|---|
XML_ELEMENT_ELEVATION, XML_ELEMENT_IAUCODE, XML_ELEMENT_LATITUDE, XML_ELEMENT_LONGITUDE, XML_ELEMENT_NAME, XML_ELEMENT_SITE, XML_ELEMENT_TIMEZONE |
| Fields inherited from interface de.lehmannet.om.ISchemaElement |
|---|
XML_ELEMENT_ATTRIBUTE_ID |
| Constructor Summary | |
|---|---|
Site(org.w3c.dom.Node site)
Constructs a new Site instance from a given XML Schema Node. |
|
Site(java.lang.String name,
Angle longitude,
Angle latitude,
int timezone)
Constructs a new instance of a Site. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Element |
addAsLinkToXmlElement(org.w3c.dom.Element element)
Adds the site link to an given XML DOM Element The site element itself will be attached to given elements ownerDocument. |
org.w3c.dom.Element |
addToXmlElement(org.w3c.dom.Element element)
Adds this Site to a given parent XML DOM Element. |
java.lang.String |
getDisplayName()
Returns a display name for this element. |
float |
getElevation()
Returns the elevation of the site. |
java.lang.String |
getIAUCode()
Returns the IAU station code of the site. |
Angle |
getLatitude()
Returns the latitude of the site. |
Angle |
getLongitude()
Returns the longitude of the site. |
java.lang.String |
getName()
Returns the name of the site. |
int |
getTimezone()
Returns the timezone of the site. |
void |
setElevation(float elevation)
Sets the elevation of the site. |
void |
setIAUCode(java.lang.String IAUCode)
Sets the IAU code of the site. |
void |
setLatitude(Angle latitude)
Sets the latitude of the site. |
void |
setLongitude(Angle longitude)
Sets the longitude of the site. |
void |
setName(java.lang.String name)
Sets the name of the site. |
void |
setTimezone(int timezone)
Sets the timezone of the site. |
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 Site(org.w3c.dom.Node site)
throws SchemaException,
java.lang.IllegalArgumentException
site - The XML Schema Node that represents this Site object
java.lang.IllegalArgumentException - if the parameter is null
SchemaException - if the given Node does not match the XML
Schema specifications
public Site(java.lang.String name,
Angle longitude,
Angle latitude,
int timezone)
throws java.lang.IllegalArgumentException
name - The sites namelongitude - The sites longitudelatitude - The sites latitudetimezone - The sites timezone offset in minutes from GMT
java.lang.IllegalArgumentException| Method Detail |
|---|
public java.lang.String getDisplayName()
getDisplayName in interface ISchemaElementgetDisplayName in class SchemaElementjava.lang.Object.toString();public java.lang.String toString()
toString in class java.lang.ObjectObjectpublic org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element element)
addToXmlElement in interface ISiteparent - The parent element for this Site
null if parent was null.Elementpublic org.w3c.dom.Element addAsLinkToXmlElement(org.w3c.dom.Element element)
addAsLinkToXmlElement in interface ISiteelement - The element under which the the site link is created
null if element was null.Elementpublic Angle getLatitude()
getLatitude in interface ISitepublic Angle getLongitude()
getLongitude in interface ISitepublic java.lang.String getName()
getName in interface ISitepublic int getTimezone()
getTimezone in interface ISite
public void setLatitude(Angle latitude)
throws java.lang.IllegalArgumentException
setLatitude in interface ISitelatitude - The new latitude for this site
java.lang.IllegalArgumentException - if latitude is null
public void setLongitude(Angle longitude)
throws java.lang.IllegalArgumentException
setLongitude in interface ISitelongitude - The new longitude for this site
java.lang.IllegalArgumentException - if longitude is null
public void setName(java.lang.String name)
throws java.lang.IllegalArgumentException
setName in interface ISitename - The new name for this site
java.lang.IllegalArgumentException - if name is null
public void setTimezone(int timezone)
throws java.lang.IllegalArgumentException
setTimezone in interface ISitetimezone - The new timezone for this site in minutes
java.lang.IllegalArgumentException - if new timezone is greater than
720 (12*60) or lower than -720 (12*60)public void setIAUCode(java.lang.String IAUCode)
setIAUCode in interface ISiteIAUCode - The new IAU code for this sitepublic void setElevation(float elevation)
setElevation in interface ISiteelevation - The new elevation for this sitepublic float getElevation()
getElevation in interface ISiteNULL if value was never setpublic java.lang.String getIAUCode()
null as the site may not
have an IAU (International Astronomical Union) station code.
getIAUCode in interface ISitenull
if no code exists, or was never set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||