ist.palcom.communication.ast
Class ServiceList

java.lang.Object
  extended by ist.palcom.communication.ast.ASTNode
      extended by ist.palcom.communication.ast.AbstractXMLRepresentable
          extended by ist.palcom.communication.ast.Info
              extended by ist.palcom.communication.ast.ServiceList
All Implemented Interfaces:
XMLRepresentable, Cloneable

public class ServiceList
extends Info
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
ServiceList()
           
ServiceList(URN parentURN)
           
ServiceList(URN p0, List p1)
           
 
Method Summary
 void addChildFromXMLElement(XMLRepresentable child)
          The implementation up here is empty.
 void addServiceInfo(ServiceInfo node)
           
 Object clone()
           
 ASTNode copy()
           
 boolean equals(Object o)
           
 void flushCache()
           
 ASTNode fullCopy()
           
 URN getDeviceURN()
           
 Info getInfoThatEquals(Info info)
           
 Info getInfoThatIsAboutTheSameEntityAs(Info info)
           
 int getNumServiceInfo()
           
 URN getParentURN()
           
 URN getParentURNNoTransform()
           
 ServiceInfo getServiceInfo(int i)
           
 ServiceInfo getServiceInfo(URN urn)
           
 List getServiceInfoList()
           
 List getServiceInfoListNoTransform()
           
 String getTagName()
           
 int hashCode()
           
 void initializeFromElement(XmlPullParser parser)
          Initialize the XMLRepresentable from the element where the parser is currently standing.
 boolean isAboutTheSameEntityAs(Info info)
           
protected  int numChildren()
           
 void setParentURN(URN node)
           
 void setServiceInfo(ServiceInfo node, int i)
           
 void setServiceInfoList(List list)
           
 void writeXMLElement(KXmlSerializer serializer)
           
 
Methods inherited from class ist.palcom.communication.ast.Info
getName, getURN, safeEqual
 
Methods inherited from class ist.palcom.communication.ast.AbstractXMLRepresentable
getXMLData, getXMLData, toString
 
Methods inherited from class ist.palcom.communication.ast.ASTNode
addChild, getChild, getChildNoTransform, getIndexOfChild, getNumChild, getParent, insertChild, remove, removeChild, setChild, setParent
 
Methods inherited from class java.lang.Object
getClass, println
 

Constructor Detail

ServiceList

public ServiceList()

ServiceList

public ServiceList(URN p0,
                   List p1)

ServiceList

public ServiceList(URN parentURN)
Method Detail

clone

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

copy

public ASTNode copy()
Overrides:
copy in class ASTNode

fullCopy

public ASTNode fullCopy()
Overrides:
fullCopy in class ASTNode

flushCache

public void flushCache()
Overrides:
flushCache in class Info

numChildren

protected int numChildren()
Overrides:
numChildren in class Info

setParentURN

public void setParentURN(URN node)

getParentURN

public URN getParentURN()

getParentURNNoTransform

public URN getParentURNNoTransform()

setServiceInfoList

public void setServiceInfoList(List list)

getNumServiceInfo

public int getNumServiceInfo()

getServiceInfo

public ServiceInfo getServiceInfo(int i)

addServiceInfo

public void addServiceInfo(ServiceInfo node)

setServiceInfo

public void setServiceInfo(ServiceInfo node,
                           int i)

getServiceInfoList

public List getServiceInfoList()

getServiceInfoListNoTransform

public List getServiceInfoListNoTransform()

isAboutTheSameEntityAs

public boolean isAboutTheSameEntityAs(Info info)
Specified by:
isAboutTheSameEntityAs in class 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)
Overrides:
getInfoThatEquals in class 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)
Overrides:
getInfoThatIsAboutTheSameEntityAs in class 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.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getDeviceURN

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

getServiceInfo

public ServiceInfo getServiceInfo(URN urn)

getTagName

public String getTagName()
Specified by:
getTagName in interface XMLRepresentable

writeXMLElement

public void writeXMLElement(KXmlSerializer serializer)
                     throws IOException
Specified by:
writeXMLElement in interface XMLRepresentable
Throws:
IOException

initializeFromElement

public void initializeFromElement(XmlPullParser parser)
Description copied from interface: XMLRepresentable
Initialize the XMLRepresentable from the element where the parser is currently standing. When calling this method, the parser must be on the start tag of the element. After returning from the method, the parser will be at the end tag of the element.

Specified by:
initializeFromElement in interface XMLRepresentable

addChildFromXMLElement

public void addChildFromXMLElement(XMLRepresentable child)
Description copied from class: AbstractXMLRepresentable
The implementation up here is empty.

Specified by:
addChildFromXMLElement in interface XMLRepresentable
Overrides:
addChildFromXMLElement in class AbstractXMLRepresentable