|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.ml.om.SchemaElement
org.jscience.ml.om.Observation
public class Observation
An IObservation describes an astronomical oberservation of exactly one
celestial object (target).
The observation must have one start date to be correct, but does not have
to have an end date (as the end date might be lost in older observations).
Inside the XML Schema the Observation is the central entry point for
accessing all other kinds of data. (See: XML
Schema Doc) Therefore the IObservation provides access to almost all
other XML Schema elements.
| Field Summary |
|---|
| Fields inherited from interface org.jscience.ml.om.IObservation |
|---|
XML_ELEMENT_ACCESSORIES, XML_ELEMENT_BEGIN, XML_ELEMENT_END, XML_ELEMENT_FAINTESTSTAR, XML_ELEMENT_IMAGE, XML_ELEMENT_MAGNIFICATION, XML_ELEMENT_OBSERVATION, XML_ELEMENT_SEEING |
| Fields inherited from interface org.jscience.ml.om.ISchemaElement |
|---|
XML_ELEMENT_ATTRIBUTE_ID |
| Constructor Summary | |
|---|---|
Observation(java.util.Calendar begin,
java.util.Calendar end,
float faintestStar,
int seeing,
float magnification,
ITarget target,
IObserver observer,
ISite site,
IScope scope,
java.lang.String accessories,
IEyepiece eyepiece,
IImager imager,
ISession session,
IFinding result)
Constructs a new instance of an Observation. |
|
Observation(java.util.Calendar begin,
java.util.Calendar end,
float faintestStar,
int seeing,
float magnification,
ITarget target,
IObserver observer,
ISite site,
IScope scope,
java.lang.String accessories,
IEyepiece eyepiece,
IImager imager,
ISession session,
java.util.List results)
Constructs a new instance of an Observation. |
|
Observation(java.util.Calendar begin,
java.util.Calendar end,
ITarget target,
IObserver observer,
IFinding result)
Constructs a new instance of an Observation. |
|
Observation(java.util.Calendar begin,
java.util.Calendar end,
ITarget target,
IObserver observer,
java.util.List results)
Constructs a new instance of an Observation. |
|
Observation(java.util.Calendar begin,
ITarget target,
IObserver observer,
IFinding result)
Constructs a new instance of an Observation. |
|
Observation(java.util.Calendar begin,
ITarget target,
IObserver observer,
java.util.List results)
Constructs a new instance of an Observation. |
|
Observation(org.w3c.dom.Node observation,
ITarget[] targets,
IObserver[] observers,
ISite[] sites,
IScope[] scopes,
ISession[] sessions,
IEyepiece[] eyepieces,
IImager[] imagers)
Constructs a new Observation instance from a given XML Schema Node. |
|
| Method Summary | |
|---|---|
void |
addImage(java.lang.String imagePath)
Adds a new image (path) to this observation. |
boolean |
addImages(java.util.List images)
Adds a List of image paths (String) to this observation. |
void |
addResult(IFinding result)
Adds a new result to this observation. |
boolean |
addResults(java.util.List results)
Adds a List of results for this observation. |
org.w3c.dom.Element |
addToXmlElement(org.w3c.dom.Element parent)
Adds this Observation to a given parent XML DOM Element. |
boolean |
equals(java.lang.Object obj)
Overwrittes equals(Object) method from java.lang.Object. |
java.lang.String |
getAccessories()
Returns the accessories used for this observation. |
java.util.Calendar |
getBegin()
Returns the start date of the observation. |
java.lang.String |
getDisplayName()
Returns a display name for this element. |
java.util.Calendar |
getEnd()
Returns the end date of the observation. |
IEyepiece |
getEyepiece()
Returns the eyepiece with which the observation was made. |
float |
getFaintestStar()
Returns the magnitude of the faintest star that could be seen during observation time with the unaided eye. |
IImager |
getImager()
Returns the imager that was used for this observation. |
java.util.List |
getImages()
Returns a list of images (relativ path to images), taken at this observation. |
float |
getMagnification()
Returns the magnification used for this observation. |
IObserver |
getObserver()
Returns the observer who made the observation. |
java.util.List |
getResults()
Returns a List with one or more results of the observation. |
IScope |
getScope()
Returns the scope that was used for the observation. |
int |
getSeeing()
Returns the seeing during this observation. |
ISession |
getSession()
Returns the session this observation belongs to. |
ISite |
getSite()
Returns the site where the observation took place. |
ITarget |
getTarget()
Returns the target which was observed. |
void |
setAccessories(java.lang.String accessories)
Sets the accessories used during the observation. |
void |
setBegin(java.util.Calendar begin)
Sets the start date of the observation. |
void |
setEnd(java.util.Calendar end)
Sets the end date of the observation. |
void |
setEyepiece(IEyepiece eyepiece)
Sets the eyepiece of the observation. |
void |
setFaintestStar(float faintestStar)
Sets the magnitude value of the faintest star which could be seen with the unaided eye during the observation. |
void |
setImager(IImager imager)
Sets an imager used for this observation. |
boolean |
setImages(java.util.List imagesList)
Sets a List of images (path as String) for this observation. |
void |
setMagnification(float magnification)
Sets the magnification used at the observation. |
void |
setObserver(IObserver observer)
Sets the observer of the observation. |
boolean |
setResult(IFinding result)
Sets a single IFinding as result for this observation. |
boolean |
setResults(java.util.List results)
Sets a List of results for this observation. |
void |
setScope(IScope scope)
Sets the scope of the observation. |
void |
setSeeing(int seeing)
Sets the seeing during this observation. |
void |
setSession(ISession session)
Sets the session which this observation belongs to. |
void |
setSite(ISite site)
Sets the site where this observation took place. |
void |
setTarget(ITarget target)
Sets the target of this observation. |
java.lang.String |
toString()
Overwrittes toString() method from java.lang.Object. |
| Methods inherited from class org.jscience.ml.om.SchemaElement |
|---|
getID, setID |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jscience.ml.om.ISchemaElement |
|---|
getID |
| Constructor Detail |
|---|
public Observation(org.w3c.dom.Node observation,
ITarget[] targets,
IObserver[] observers,
ISite[] sites,
IScope[] scopes,
ISession[] sessions,
IEyepiece[] eyepieces,
IImager[] imagers)
throws SchemaException,
java.lang.IllegalArgumentException
null.
observation - the XML Schema Node that represents this Observation objecttargets - Array of ITarget that might be linked from this observationobservers - Array of IObserver that might be linked from this observationsites - Array of ISite that might be linked from this observationscopes - Array of IScope that might be linked from this observation
(as Site is optional by XML Schema, this parameter can be NULL
if passed Observation Node has no sessions - Array of ISession that might be linked from this observation
(as Session is optional by XML Schema, this parameter can be NULL
if passed Observation Node has no eyepieces - Array of IEyepiece that might be linked from this observation
(as Eyepiece is optional by XML Schema, this parameter can be NULL
if passed Observation Node has no imagers - Array of IImagers that might be linked from this observation
(as Imager is optional by XML Schema, this parameter can be NULL
if passed Observation Node has no java.lang.IllegalArgumentException - if parameter observation is null
or Observation Node has subelements of which no according array was passed (or the
passed array was empty).
SchemaException - if the given Node does not match the XML Schema
specifications
public Observation(java.util.Calendar begin,
ITarget target,
IObserver observer,
IFinding result)
throws java.lang.IllegalArgumentException
begin - Start date of observationtarget - The target of the observationobserver - The observer who made the observationresult - The result of this observation
java.lang.IllegalArgumentException - if one of the parameters is null
public Observation(java.util.Calendar begin,
ITarget target,
IObserver observer,
java.util.List results)
throws java.lang.IllegalArgumentException
begin - Start date of observationtarget - The target of the observationobserver - The observer who made the observationresults - The results of this observation as List
java.lang.IllegalArgumentException - if one of the parameters is null
or the result list is empty
public Observation(java.util.Calendar begin,
java.util.Calendar end,
ITarget target,
IObserver observer,
java.util.List results)
throws java.lang.IllegalArgumentException
begin - Start date of observationend - End date of observationtarget - The target of the observationobserver - The observer who made the observationresults - The results of this observation as List
java.lang.IllegalArgumentException - if one of the parameters,
except end date, is null, or the result
list is empty
public Observation(java.util.Calendar begin,
java.util.Calendar end,
ITarget target,
IObserver observer,
IFinding result)
throws java.lang.IllegalArgumentException
begin - Start date of observationend - End date of observationtarget - The target of the observationobserver - The observer who made the observationresult - The result of this observation
java.lang.IllegalArgumentException - if one of the parameters,
except end date, is null
public Observation(java.util.Calendar begin,
java.util.Calendar end,
float faintestStar,
int seeing,
float magnification,
ITarget target,
IObserver observer,
ISite site,
IScope scope,
java.lang.String accessories,
IEyepiece eyepiece,
IImager imager,
ISession session,
IFinding result)
throws java.lang.IllegalArgumentException
begin - Start date of observationend - End date of observationfaintestStar - Faintest star visible with the naked eye (in magnitude)seeing - The seeing during observation (1=best, 5=worst)magnification - Magnification used at the observationtarget - The target of the observationobserver - The observer who made the observationsite - The place where the observation took placescope - The scope used for this observationeyepiece - The eyepiece used for this observationimager - The imager used for this observationsession - The session this observation belongs toresult - The result of this observation
java.lang.IllegalArgumentException - if one of the follwing parameters,
is null: begin, target, observer, site, result
or seeing is < 1 or > 5
public Observation(java.util.Calendar begin,
java.util.Calendar end,
float faintestStar,
int seeing,
float magnification,
ITarget target,
IObserver observer,
ISite site,
IScope scope,
java.lang.String accessories,
IEyepiece eyepiece,
IImager imager,
ISession session,
java.util.List results)
throws java.lang.IllegalArgumentException
begin - Start date of observationend - End date of observationfaintestStar - Faintest star visible with the naked eye (in magnitude)seeing - The seeing during observation (1=best, 5=worst)magnification - Magnification used at the observationtarget - The target of the observationobserver - The observer who made the observationsite - The place where the observation took placescope - The scope used for this observationeyepiece - The eyepiece used for this observationimager - The imager used for this observationsession - The session this observation belongs toresults - The results of this observation as List
java.lang.IllegalArgumentException - if one of the follwing parameters,
is null: begin, target, observer, site, results or
result list is empty. Also if seeing is < 1 or > 5| 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 boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The Object to compare this Observation with.
true if the given Object is an instance of
IObservation and its start date, target, observer and result
list is equal to this observation.Objectpublic org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element parent)
addToXmlElement in interface IObservationparent - The parent element for this Observation
null if parent was
null.Elementpublic java.util.Calendar getBegin()
getBegin in interface IObservationpublic java.lang.String getAccessories()
null if no accessories have been used.
getAccessories in interface IObservationnull if no
accessories were usedpublic java.util.Calendar getEnd()
null if no end date was given.
getEnd in interface IObservationnull if no end
date was givenpublic IEyepiece getEyepiece()
null if no eyepiece was used at all.
getEyepiece in interface IObservationnull if no
eyepiece was used.public IImager getImager()
getImager in interface IObservationpublic float getMagnification()
Float.NaN if no value was set at all.
getMagnification in interface IObservationFloat.NaN if no value was set.public float getFaintestStar()
Float.NaN if no value was set at all.
getFaintestStar in interface IObservationFloat.NaN if no value was set.public java.util.List getImages()
null if images were set.
getImages in interface IObservationnull if no images were set.public int getSeeing()
-1 if no value was set at all.
getSeeing in interface IObservation-1 if
no value was set for seeing.public IObserver getObserver()
getObserver in interface IObservation
public boolean setResult(IFinding result)
throws java.lang.IllegalArgumentException
null, an
IllegalArgumentException is thrown.
setResult in interface IObservationresult - A new result for this observation
java.lang.IllegalArgumentException - if the new result is nullorg.jscience.ml.om.IObservation#addResults(java.util.Listresults),
org.jscience.ml.om.IObservation#addResult(IFindingresult),
org.jscience.ml.om.IObservation#setResults(Listresults),
IFinding
public boolean setResults(java.util.List results)
throws java.lang.IllegalArgumentException
null, an
IllegalArgumentException is thrown.
setResults in interface IObservationresults - The new list of results for this observation
java.lang.IllegalArgumentException - if new results list is
null or emptyorg.jscience.ml.om.IObservation#addResults(java.util.Listresults),
org.jscience.ml.om.IObservation#addResult(IFindingresult),
IFindingpublic void setAccessories(java.lang.String accessories)
setAccessories in interface IObservationaccessories - The accessories of the observation
public boolean setImages(java.util.List imagesList)
throws java.lang.IllegalArgumentException
null, an
IllegalArgumentException is thrown.
setImages in interface IObservationimagesList - The new (String) list of images for this observation
java.lang.IllegalArgumentException - if new image list is null
or emptyorg.jscience.ml.om.IObservation#addImages(java.util.Listimages),
org.jscience.ml.om.IObservation#addImage(Stringimage)public void setImager(IImager imager)
setImager in interface IObservationimager - The imager used for this observationpublic boolean addResults(java.util.List results)
null, the old result list will remain unchanged.
addResults in interface IObservationresults - A list with more results for this observation
org.jscience.ml.om.IObservation#setResults(java.util.Listresults)public void addResult(IFinding result)
addResult in interface IObservationresult - A new result for this observationpublic boolean addImages(java.util.List images)
null, the old result list will remain unchanged.
addImages in interface IObservationimages - A list (containing Strings) with additional images (path)
for this observation
org.jscience.ml.om.IObservation#setResults(java.util.Listimages)public void addImage(java.lang.String imagePath)
addImage in interface IObservationimagePath - A new image for this observationpublic java.util.List getResults()
getResults in interface IObservationpublic IScope getScope()
null if the observation was not made with any
scope.
getScope in interface IObservationnull if no scope was used at all.public ISession getSession()
null if the observation is not part of any
observation session.
getSession in interface IObservationnull if
the observation does not belong to any session.public ISite getSite()
getSite in interface IObservationnull if the
observation has no sitepublic ITarget getTarget()
getTarget in interface IObservation
public void setBegin(java.util.Calendar begin)
throws java.lang.IllegalArgumentException
setBegin in interface IObservationbegin - The start date of the observation
java.lang.IllegalArgumentException - if new begin date is nullpublic void setEnd(java.util.Calendar end)
setEnd in interface IObservationend - The end date of the observationpublic void setEyepiece(IEyepiece eyepiece)
setEyepiece in interface IObservationeyepiece - The eyepiece of the observationpublic void setFaintestStar(float faintestStar)
setFaintestStar in interface IObservationfaintestStar - The faintestStar of the observation in magnitudepublic void setMagnification(float magnification)
setMagnification in interface IObservationmagnification - The magnification used at the observation
public void setSeeing(int seeing)
throws java.lang.IllegalArgumentException
setSeeing in interface IObservationseeing - A int between 1-5 representing the seeing
java.lang.IllegalArgumentException - DOCUMENT ME!
public void setObserver(IObserver observer)
throws java.lang.IllegalArgumentException
setObserver in interface IObservationobserver - The observer of the observation
java.lang.IllegalArgumentException - if new observer is nullpublic void setScope(IScope scope)
setScope in interface IObservationscope - The scope of the observation
public void setSession(ISession session)
throws java.lang.IllegalArgumentException
setSession in interface IObservationsession - The session this observation belongs to
java.lang.IllegalArgumentException - if this observations start date is not
between the session start and end datepublic void setSite(ISite site)
setSite in interface IObservationsite - The site this observation took place
public void setTarget(ITarget target)
throws java.lang.IllegalArgumentException
setTarget in interface IObservationtarget - The target of this observation
java.lang.IllegalArgumentException - if new Target is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||