|
|||||||||
| 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.Session
public class Session
A Session can be used to link several observations together. Typically a session would describe an observation night, where several observations took place. Therefore an Session requires two mandatory fields: a start date and an end date. All observations of the session should have a start date that is inbetween the sessions start and end date.
| Field Summary |
|---|
| Fields inherited from interface de.lehmannet.om.ISession |
|---|
XML_ELEMENT_ATTRIBUTE_LANGUAGE, XML_ELEMENT_BEGIN, XML_ELEMENT_COMMENTS, XML_ELEMENT_COOBSERVER, XML_ELEMENT_END, XML_ELEMENT_EQUIPMENT, XML_ELEMENT_SESSION, XML_ELEMENT_SITE, XML_ELEMENT_WEATHER |
| Fields inherited from interface de.lehmannet.om.ISchemaElement |
|---|
XML_ELEMENT_ATTRIBUTE_ID |
| Constructor Summary | |
|---|---|
Session(java.util.Calendar begin,
java.util.Calendar end,
ISite site)
Constructs a new instance of a Session. |
|
Session(org.w3c.dom.Node session,
IObserver[] observers,
ISite[] sites)
Constructs a new Session instance from a given XML Schema Node. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Element |
addAsLinkToXmlElement(org.w3c.dom.Element element)
Adds the session link to an given XML DOM Element The session element itself will be attached to given elements ownerDocument. |
boolean |
addCoObserver(IObserver coObserver)
Adds a single coobserver to this session. |
boolean |
addCoObservers(java.util.List coObservers)
Adds a List of coobservers to this session. |
org.w3c.dom.Element |
addToXmlElement(org.w3c.dom.Element element)
Adds this Session to a given parent XML DOM Element. |
java.util.Calendar |
getBegin()
Returns the start date of the session. |
java.lang.String |
getComments()
Returns a comment about this session. |
java.util.List |
getCoObservers()
Returns a List of coobservers who joined this session. |
java.lang.String |
getDisplayName()
Returns a display name for this element. |
java.util.Calendar |
getEnd()
Returns the end date of the session. |
java.lang.String |
getEquipment()
Returns a string describing equipment which was used during this session. |
java.lang.String |
getLanguage()
Returns the language in which this session is described as ISO language string. |
ISite |
getSite()
Returns the site of the session. |
java.lang.String |
getWeather()
Returns a describtion of the weather conditions during the session. |
void |
setBegin(java.util.Calendar begin)
Sets the start date of the session. |
void |
setComments(java.lang.String comments)
Sets a comment to the session. |
boolean |
setCoObservers(java.util.List coObservers)
Sets a new List of coobservers to this session. |
void |
setEnd(java.util.Calendar end)
Sets the end date of the session. |
void |
setEquipment(java.lang.String equipment)
Sets a equipment description to the session. |
void |
setLanguage(java.lang.String language)
Sets the language in which this session is described. |
void |
setSite(ISite site)
Sets a site (location) where the session took place. |
void |
setWeather(java.lang.String weather)
Sets the weather conditions of the session. |
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 Session(org.w3c.dom.Node session,
IObserver[] observers,
ISite[] sites)
throws SchemaException,
java.lang.IllegalArgumentException
null
session - the XML Schema Node that represents this Session objectobservers - Needed if the Session Node has java.lang.IllegalArgumentException - if parameter session is null
or Node has SchemaException - if the given Node does not match the XML Schema
specifications
public Session(java.util.Calendar begin,
java.util.Calendar end,
ISite site)
throws java.lang.IllegalArgumentException
begin - The start date of the sessionend - The end date of the sessionend - The site of the session
java.lang.IllegalArgumentException - if site, begin or end date
is null| 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 ISessionparent - The parent element for this Session
null if parent was null.Elementpublic org.w3c.dom.Element addAsLinkToXmlElement(org.w3c.dom.Element element)
addAsLinkToXmlElement in interface ISessionelement - The element under which the the Session link is created
null if element was null.Elementpublic java.util.Calendar getBegin()
getBegin in interface ISessionpublic java.lang.String getComments()
null if no
comment was set to this session.
getComments in interface ISessionnull if
no comment was set at all.public java.util.Calendar getEnd()
getEnd in interface ISessionpublic ISite getSite()
getSite in interface ISessionpublic java.lang.String getEquipment()
null if no
equipment was set to this session.
getEquipment in interface ISessionnull if
no additional equipment was used at all.public java.lang.String getWeather()
null if no
weather conditions were added to this session.
getWeather in interface ISessionnull if
no weather conditions were added at all.public java.lang.String getLanguage()
null if no
language was set for this session.
getLanguage in interface ISessionnull if
no language was set at all.
public void setBegin(java.util.Calendar begin)
throws java.lang.IllegalArgumentException
setBegin in interface ISessionbegin - The new start date of the session.
java.lang.IllegalArgumentException - if new start date is nullpublic void setComments(java.lang.String comments)
setComments in interface ISessioncomments - A new comment for the session
public void setEnd(java.util.Calendar end)
throws java.lang.IllegalArgumentException
setEnd in interface ISessionend - The new end date of the session.
java.lang.IllegalArgumentException - if new end date is nullpublic void setEquipment(java.lang.String equipment)
setEquipment in interface ISessionequipment - The new equipment of the session
public void setSite(ISite site)
throws java.lang.IllegalArgumentException
setSite in interface ISessionsite - The site where the session took place.
java.lang.IllegalArgumentException - if site is nullpublic boolean setCoObservers(java.util.List coObservers)
setCoObservers in interface ISessioncoObservers - The new List of coobservers of the session
public boolean addCoObservers(java.util.List coObservers)
addCoObservers in interface ISessioncoObservers - A List of coobservers which will be added to
the existing List of coobservers which is stored in the session
public boolean addCoObserver(IObserver coObserver)
addCoObserver in interface ISessioncoObserver - A new coobserver who will be addded to the List
of coobservers
nullpublic java.util.List getCoObservers()
null if no
coobservers were added to this session.
getCoObservers in interface ISessionnull if
coobservers were never added.public void setWeather(java.lang.String weather)
setWeather in interface ISessionweather - A string describing the weather conditions during the
sessionpublic void setLanguage(java.lang.String language)
setLanguage in interface ISessionlanguage - ISO language string
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||