org.jscience.ml.om
Class SchemaElement

java.lang.Object
  extended by org.jscience.ml.om.SchemaElement
All Implemented Interfaces:
ISchemaElement
Direct Known Subclasses:
EquPosition, Eyepiece, Finding, Imager, Observation, Observer, Scope, Session, Site, Target

public abstract class SchemaElement
extends java.lang.Object
implements ISchemaElement

The SchemaElement represents the root class for all schema element classes. It provides a simple implemantation of the ISchemaInterface, so that any subclass inherits a unique ID.

Since:
1.0

Field Summary
 
Fields inherited from interface org.jscience.ml.om.ISchemaElement
XML_ELEMENT_ATTRIBUTE_ID
 
Constructor Summary
SchemaElement()
          Constructs a new instance of a Schema Element.
 
Method Summary
abstract  java.lang.String getDisplayName()
          Returns a display name for this element.
 java.lang.String getID()
          Returns a unique ID of this schema element.
 void setID(java.lang.String newID)
          Sets a unique ID of this schema element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaElement

public SchemaElement()
Constructs a new instance of a Schema Element.
Any instance of a Schema Element has a unique ID which identifies the element, and which allows to link serveral elements.

Method Detail

getID

public java.lang.String getID()
Returns a unique ID of this schema element.
The ID is used to link this element with other XML elements in the schema.

Specified by:
getID in interface ISchemaElement
Returns:
Returns a String representing a unique ID of this schema element.

setID

public void setID(java.lang.String newID)
Sets a unique ID of this schema element.
The ID is used to link this element with other XML elements in the schema.
Call this method only, if your know what you're doing.

Parameters:
newID - The new unique ID for this object.

getDisplayName

public abstract java.lang.String getDisplayName()
Returns a display name for this element.
The method differs from the toString() method as toString() shows more technical information about the element. Also the formating of toString() can spread over several lines.
This method returns a string (in one line) that can be used as displayname in e.g. a UI dropdown box.

Specified by:
getDisplayName in interface ISchemaElement
Returns:
Returns a String with a one line display name
See Also:
java.lang.Object.toString();