ist.palcom.communication.ast
Class ControlItem

java.lang.Object
  extended by ist.palcom.communication.ast.ASTNode
      extended by ist.palcom.communication.ast.ControlItem
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Command, Group, Param

public abstract class ControlItem
extends ASTNode
implements Cloneable


Field Summary
 
Fields inherited from class ist.palcom.communication.ast.ASTNode
CHANGE, children, generatedWithCacheCycle, generatedWithCircularEnabled, IN_CIRCLE, LAST_CYCLE, numChildren, parent
 
Constructor Summary
ControlItem()
           
 
Method Summary
 Object clone()
           
 ControlItem findItem(String id)
          Returns the ControlItem within the sub-tree rooted at this ControlItem that has the sought ID, or null if none exists.
 Command findMatchingCommand(Command command)
          Returns a matching command in the ControlItem sub-tree rooted at this ControlItem, or null if none exists.
 void flushCache()
           
 String getID()
          Forwarding methods
abstract  Info getInfoAsInfo()
          Workaround for static typing.
 Message getMessage()
           
 ServiceProxy getServiceProxy()
          Returns the closest surrounding ServiceProxy, or null if there is none.
 String getTagName()
           
 void initializeFromElement(XmlPullParser parser)
           
protected  int numChildren()
           
abstract  void setDataRefsAndAddDataToList(ArrayList dataList)
           
abstract  void setDataAccordingToDataRefs(byte[][] data)
           
protected  void writeStartTagAndAttributes(KXmlSerializer serializer)
           
 void writeXMLElement(KXmlSerializer serializer)
           
 
Methods inherited from class ist.palcom.communication.ast.ASTNode
addChild, copy, fullCopy, getChild, getChildNoTransform, getIndexOfChild, getNumChild, getParent, insertChild, remove, removeChild, setChild, setParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, println, toString
 

Constructor Detail

ControlItem

public ControlItem()
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class ASTNode
Throws:
CloneNotSupportedException

flushCache

public void flushCache()
Overrides:
flushCache in class ASTNode

numChildren

protected int numChildren()
Overrides:
numChildren in class ASTNode

getInfoAsInfo

public abstract Info getInfoAsInfo()
Workaround for static typing.


getID

public String getID()
Forwarding methods


findItem

public ControlItem findItem(String id)
Returns the ControlItem within the sub-tree rooted at this ControlItem that has the sought ID, or null if none exists. This method is overridden in appropriate subclasses.


getServiceProxy

public ServiceProxy getServiceProxy()
Returns the closest surrounding ServiceProxy, or null if there is none. If this object is a ServiceProxy, this is returned. The method is overriden in ServiceProxy, to give the right behaviour.


findMatchingCommand

public Command findMatchingCommand(Command command)
Returns a matching command in the ControlItem sub-tree rooted at this ControlItem, or null if none exists. A Command is considered to match if it has the same Java type, the same ID, and if all params have the same ID and the same types (param type), and are in the same order. This method is overridden in appropriate sub-classes, to handle the actual matching.


getMessage

public Message getMessage()

setDataRefsAndAddDataToList

public abstract void setDataRefsAndAddDataToList(ArrayList dataList)

setDataAccordingToDataRefs

public abstract void setDataAccordingToDataRefs(byte[][] data)

getTagName

public String getTagName()

writeStartTagAndAttributes

protected void writeStartTagAndAttributes(KXmlSerializer serializer)
                                   throws IOException
Throws:
IOException

writeXMLElement

public void writeXMLElement(KXmlSerializer serializer)
                     throws IOException
Throws:
IOException

initializeFromElement

public void initializeFromElement(XmlPullParser parser)