ist.palcom.communication.ast
Class Info

java.lang.Object
  extended by ist.palcom.communication.ast.ASTNode
      extended by ist.palcom.communication.ast.AbstractXMLRepresentable
          extended by ist.palcom.communication.ast.Info
All Implemented Interfaces:
XMLRepresentable, Cloneable
Direct Known Subclasses:
ConnectionInfo, ControlInfo, DeviceInfo, ServiceInfo, ServiceList

public abstract class Info
extends AbstractXMLRepresentable
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
Info()
           
 
Method Summary
 Object clone()
           
 void flushCache()
           
 URN getDeviceURN()
           
 Info getInfoThatEquals(Info info)
           
 Info getInfoThatIsAboutTheSameEntityAs(Info info)
           
 String getName()
           
 URN getURN()
           
abstract  boolean isAboutTheSameEntityAs(Info info)
           
protected  int numChildren()
           
protected static boolean safeEqual(Object o1, Object o2)
           
 
Methods inherited from class ist.palcom.communication.ast.AbstractXMLRepresentable
addChildFromXMLElement, getXMLData, getXMLData, toString
 
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
 
Methods inherited from interface ist.palcom.xml.XMLRepresentable
getTagName, initializeFromElement, writeXMLElement
 

Constructor Detail

Info

public Info()
Method Detail

clone

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

flushCache

public void flushCache()
Overrides:
flushCache in class AbstractXMLRepresentable

numChildren

protected int numChildren()
Overrides:
numChildren in class AbstractXMLRepresentable

isAboutTheSameEntityAs

public abstract boolean isAboutTheSameEntityAs(Info info)
Returns:
True if info and this info are for the same entity. This can be true even if they are not completely identical, looking at their whole trees. The equals method for Infos, on the other hand, is implemented to check for that.

getInfoThatEquals

public Info getInfoThatEquals(Info info)
Returns:
This info, if it equals info, or a contained info that equals info (i.e. contained, not only referenced by URN), or null. The implementation here just checks equals, subclasses override where needed.

getInfoThatIsAboutTheSameEntityAs

public Info getInfoThatIsAboutTheSameEntityAs(Info info)
Returns:
This info, if it is about the same entity as info, or a contained info that is about the same entity as info (i.e. contained, not only referenced by URN), or null. The implementation here just checks isAboutTheSameEntityAs, subclasses override where needed.

safeEqual

protected static boolean safeEqual(Object o1,
                                   Object o2)

getURN

public URN getURN()
Returns:
The URN of the entity described, or null if not applicable.

getDeviceURN

public URN getDeviceURN()
Returns:
The URN of the device that the entity belongs to, or null.

getName

public String getName()