|
|||||||||
| 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.Observer
public class Observer
An Observer describes person, who does astronomical observations.
The Observer class provides access to at least the name and
surname of the person. Additionally address informations may be
stored here.
| Field Summary |
|---|
| Fields inherited from interface de.lehmannet.om.IObserver |
|---|
XML_ELEMENT_CONTACT, XML_ELEMENT_DSL, XML_ELEMENT_NAME, XML_ELEMENT_OBSERVER, XML_ELEMENT_SURNAME |
| Fields inherited from interface de.lehmannet.om.ISchemaElement |
|---|
XML_ELEMENT_ATTRIBUTE_ID |
| Constructor Summary | |
|---|---|
Observer(org.w3c.dom.Node observer)
Constructs a new Observer instance from a given XML Schema Node. |
|
Observer(java.lang.String name,
java.lang.String surname)
Constructs a new instance of an Observer. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Element |
addAsLinkToXmlElement(org.w3c.dom.Element element,
java.lang.String NameOfLinkElement)
Adds a Observer link to an given XML DOM Element. |
boolean |
addContact(java.lang.String newContact)
Adds a new contact information to the observer. |
org.w3c.dom.Element |
addToXmlElement(org.w3c.dom.Element element)
Adds this Observer to a given parent XML DOM Element. |
java.util.List |
getContacts()
Returns a List with contact information of the observer The returned List may contain e-Mail address, phone number, fax number, postal adress, webpage....whatever. |
java.lang.String |
getDisplayName()
Returns a display name for this element. |
java.lang.String |
getDSLCode()
Returns the DeepSkyList (DSL) Code of the observer Might return NULL if observer has no DSL code |
java.lang.String |
getName()
Returns the name of the observer The name (and the surname) are the only mandatory fields this interface requires. |
java.lang.String |
getSurname()
Returns the surname of the observer The surname (and the name) are the only mandatory fields this interface requires. |
int |
hashCode()
Overwrittes hashCode() method from java.lang.Object. |
boolean |
setContacts(java.util.List newContacts)
Sets the contact information to the observer. |
void |
setDSLCode(java.lang.String DSLCode)
Sets the DeepSkyList (DSL) Code of the observer |
void |
setName(java.lang.String name)
Sets a new name to the observer. |
void |
setSurname(java.lang.String surname)
Sets a new surname to the observer. |
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, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.lehmannet.om.ISchemaElement |
|---|
getID |
| Constructor Detail |
|---|
public Observer(org.w3c.dom.Node observer)
throws SchemaException,
java.lang.IllegalArgumentException
observer - The XML Schema Node that represents this Observer object
java.lang.IllegalArgumentException - if the given parameter is null
SchemaException - if the given Node does not match the XML
Schema specifications
public Observer(java.lang.String name,
java.lang.String surname)
throws java.lang.IllegalArgumentException
name - The observers namesurname - The observers surname
java.lang.IllegalArgumentException - if one of the given parameters 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 int hashCode()
hashCode in class java.lang.ObjectObjectpublic org.w3c.dom.Element addToXmlElement(org.w3c.dom.Element element)
addToXmlElement in interface IObserverparent - The parent element for this Observer
null if parent was null.Element
public org.w3c.dom.Element addAsLinkToXmlElement(org.w3c.dom.Element element,
java.lang.String NameOfLinkElement)
addAsLinkToXmlElement in interface IObserverelement - The element at which the Observer link will be created.NameOfLinkElement - The name of the link element, which is set under the passed
element
null if element was null.Elementpublic java.util.List getContacts()
null
getContacts in interface IObservernull if not informations are given.public boolean addContact(java.lang.String newContact)
addContact in interface IObservernewContact - the additional contact information
public boolean setContacts(java.util.List newContacts)
setContacts in interface IObservernewContacts - new list of contact informations
public java.lang.String getName()
getName in interface IObserverpublic java.lang.String getDSLCode()
NULL if observer has no DSL code
getDSLCode in interface IObserverNULL
if DSL was never setpublic java.lang.String getSurname()
getSurname in interface IObserverpublic void setDSLCode(java.lang.String DSLCode)
setDSLCode in interface IObserverDSLCode - the DeepSkyList (DSL) Code of the observer
public void setName(java.lang.String name)
throws java.lang.IllegalArgumentException
null
setName in interface IObservername - the new name of the observer
java.lang.IllegalArgumentException - if the given name is nullpublic void setSurname(java.lang.String surname)
null
setSurname in interface IObserversurname - the new surname of the observer
java.lang.IllegalArgumentException - if the given surname is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||