org.indi.objects
Class Element

java.lang.Object
  extended by org.indi.objects.Object<Object>
      extended by org.indi.objects.Element
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Blob, Light, Number, Switch, Text

public abstract class Element
extends Object<Object>
implements java.io.Serializable

A class representing a single indielement to be accomodated by an indivector

Author:
Dirk Hünniger
See Also:
Serialized Form

Field Summary
protected  java.lang.String label
          the label of the indielement to be uses in a GUI
protected  java.lang.String name
          the name of the indielement to identify it uniquely
protected  java.lang.String value
          the value of the indielement
 
Fields inherited from class org.indi.objects.Object
children, message, transferType
 
Constructor Summary
Element(java.lang.String name, java.lang.String label, java.lang.String value)
          class constructor
 
Method Summary
 java.lang.String getEndTag(TransferType type)
          Get the closing XML tag for the element
 java.lang.String getName()
           
 java.lang.String getStartTag(TransferType type)
          Get the opening XML tag for the element
protected abstract  java.lang.String getType()
           
 java.lang.String getValue(TransferType type)
          get the value of the indielement
 java.lang.String getXML(TransferType type)
           
 int hashCode()
           
 boolean oEquals(Object o)
          Check the equality with an other object, exculding subobject.
 void setValue(java.lang.String value)
          set the value of the indielement
 
Methods inherited from class org.indi.objects.Object
equals, getChildren, getMessage, getTransferType, getXML, setTransferType, treeEquals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected java.lang.String value
the value of the indielement


label

protected java.lang.String label
the label of the indielement to be uses in a GUI


name

protected java.lang.String name
the name of the indielement to identify it uniquely

Constructor Detail

Element

public Element(java.lang.String name,
               java.lang.String label,
               java.lang.String value)
class constructor

Parameters:
name - the name of the indielement (unique identiyer)
label - the label of the indielement (for use in GUI)
value - the indielement (the data it carries)
Method Detail

getType

protected abstract java.lang.String getType()
Returns:
the type of the indi element

getStartTag

public java.lang.String getStartTag(TransferType type)
Get the opening XML tag for the element

Parameters:
type - the transfertype to be used
Returns:
the generated opening tag

getEndTag

public java.lang.String getEndTag(TransferType type)
Get the closing XML tag for the element

Parameters:
type - the transfertype to be used
Returns:
the generated closing tag

getValue

public java.lang.String getValue(TransferType type)
get the value of the indielement

Parameters:
type - the treansfertype to be used
Returns:
the value of the indiobject

setValue

public void setValue(java.lang.String value)
set the value of the indielement

Parameters:
value - the new value to be set

getXML

public java.lang.String getXML(TransferType type)
Parameters:
type - the transfertype to be used
Returns:
an xml representation of the indielement

getName

public java.lang.String getName()
Returns:
the name of the indielement

oEquals

public boolean oEquals(Object o)
Description copied from class: Object
Check the equality with an other object, exculding subobject. So the equality of children etc. is ignored

Specified by:
oEquals in class Object<Object>
Returns:
true if the given object is equal to this object

hashCode

public int hashCode()
Specified by:
hashCode in class Object<Object>


Copyright © 2008. All Rights Reserved.