org.jscience.ml.om
Interface ISite

All Superinterfaces:
ISchemaElement
All Known Implementing Classes:
Site

public interface ISite
extends ISchemaElement

An ISite 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 its implementation should have more mandatory fields, such as elevation and timezone.

Since:
1.0

Field Summary
static java.lang.String XML_ELEMENT_ELEVATION
          Constant for XML representation: Site elevation element name.
static java.lang.String XML_ELEMENT_IAUCODE
          Constant for XML representation: Site IAU code element name.
static java.lang.String XML_ELEMENT_LATITUDE
          Constant for XML representation: Site latitude element name.
static java.lang.String XML_ELEMENT_LONGITUDE
          Constant for XML representation: Site longitude element name.
static java.lang.String XML_ELEMENT_NAME
          Constant for XML representation: Site name element name.
static java.lang.String XML_ELEMENT_SITE
          Constant for XML representation: Site element name.
static java.lang.String XML_ELEMENT_TIMEZONE
          Constant for XML representation: Site timezone element name.
 
Fields inherited from interface org.jscience.ml.om.ISchemaElement
XML_ELEMENT_ATTRIBUTE_ID
 
Method Summary
 org.w3c.dom.Element addAsLinkToXmlElement(org.w3c.dom.Element parent)
          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.
 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.
 
Methods inherited from interface org.jscience.ml.om.ISchemaElement
getDisplayName, getID
 

Field Detail

XML_ELEMENT_SITE

static final java.lang.String XML_ELEMENT_SITE
Constant for XML representation: Site element name.
Example:
<site>More stuff goes here</site>

See Also:
Constant Field Values

XML_ELEMENT_NAME

static final java.lang.String XML_ELEMENT_NAME
Constant for XML representation: Site name element name.
Example:
<site>
More stuff goes here <name>Site name goes here</name> More stuff goes here </site>

See Also:
Constant Field Values

XML_ELEMENT_LONGITUDE

static final java.lang.String XML_ELEMENT_LONGITUDE
Constant for XML representation: Site longitude element name.
Example:
<site>
More stuff goes here <longitude>Site longitude goes here</longitude> More stuff goes here </site>

See Also:
Constant Field Values

XML_ELEMENT_LATITUDE

static final java.lang.String XML_ELEMENT_LATITUDE
Constant for XML representation: Site latitude element name.
Example:
<site>
More stuff goes here <latitude>Site latitude goes here</latitude> More stuff goes here </site>

See Also:
Constant Field Values

XML_ELEMENT_ELEVATION

static final java.lang.String XML_ELEMENT_ELEVATION
Constant for XML representation: Site elevation element name.
Example:
<site>
More stuff goes here <elevation>Site elevation goes here</elevation> More stuff goes here </site>

See Also:
Constant Field Values

XML_ELEMENT_TIMEZONE

static final java.lang.String XML_ELEMENT_TIMEZONE
Constant for XML representation: Site timezone element name.
Example:
<site>
More stuff goes here <timezone>Sites timezone goes here</timezone> More stuff goes here </site>

See Also:
Constant Field Values

XML_ELEMENT_IAUCODE

static final java.lang.String XML_ELEMENT_IAUCODE
Constant for XML representation: Site IAU code element name.
Example:
<site>
More stuff goes here <code>Sites IAU code goes here</code> More stuff goes here </site>

See Also:
Constant Field Values
Method Detail

addToXmlElement

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

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

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

getLatitude

Angle getLatitude()
Returns the latitude of the site.
The latitude is a positiv angle if its north of the equator, and negative if south of the equator.

Returns:
Returns an Angle with the geographical latitude

getLongitude

Angle getLongitude()
Returns the longitude of the site.
The longitude is a positiv angle if its east of Greenwich, and negative if west of Greenwich.

Returns:
Returns an Angle with the geographical longitude

getName

java.lang.String getName()
Returns the name of the site.
The name may be any string describing the site as precise as it can be.

Returns:
Returns the name of the site

getIAUCode

java.lang.String getIAUCode()
Returns the IAU station code of the site.
This method may return null as the site may not have an IAU (International Astronomical Union) station code.

Returns:
Returns the IAU code of the site, or null if no code exists, or was never set.

getTimezone

int getTimezone()
Returns the timezone of the site.
The timezone is given as positiv or negative value, depending on the sites timezone difference to the GMT in minutes.

Returns:
Returns timzone offset (in comparism to GMT) in minutes

getElevation

float getElevation()
Returns the elevation of the site.
The elevation is given in meters above/under sea level.

Returns:
Returns the sites elevation in meters above or under sea level, or NULL if value was never set

setElevation

void setElevation(float elevation)
Sets the elevation of the site.
The elevation should be given in meters above/under sea level.

Parameters:
elevation - The new elevation for this site

setLatitude

void setLatitude(Angle latitude)
                 throws java.lang.IllegalArgumentException
Sets the latitude of the site.
The latitude must be a positiv angle if its north of the equator, and negative if south of the equator.

Parameters:
latitude - The new latitude for this site
Throws:
java.lang.IllegalArgumentException - if latitude is null

setLongitude

void setLongitude(Angle longitude)
                  throws java.lang.IllegalArgumentException
Sets the longitude of the site.
The longitude must be a positiv angle if its east of Greenwich, and negative if west of Greenwich.

Parameters:
longitude - The new longitude for this site
Throws:
java.lang.IllegalArgumentException - if longitude is null

setName

void setName(java.lang.String name)
             throws java.lang.IllegalArgumentException
Sets the name of the site.
The name should be any string describing the site as precise as it can be.

Parameters:
name - The new name for this site
Throws:
java.lang.IllegalArgumentException - if name is null

setIAUCode

void setIAUCode(java.lang.String IAUCode)
Sets the IAU code of the site.

Parameters:
IAUCode - The new IAU code for this site

setTimezone

void setTimezone(int timezone)
                 throws java.lang.IllegalArgumentException
Sets the timezone of the site.
The timezone must be given as positiv or negative value, depending on the sites timezone difference to the GMT in minutes.

Parameters:
timezone - The new timezone for this site in minutes
Throws:
java.lang.IllegalArgumentException - if new timezone is greater than 720 (1260) or lower than -720 (1260)