backend.domainObjects
Class APGroup

java.lang.Object
  extended by backend.domainObjects.APGroup

public class APGroup
extends java.lang.Object

Author:
ptm2 This assumes that there is one and only one <accesspoints> thingy for every <group> thingy. I use the word "thingy" because I'm not familiar with the XML terminology. "Section" might be the word I'm looking for. This class parses XML and corresponds to the <group> tag in XML code. It contains a few fields besides child-objects in this huge has-a tree... There are two child classes that are contained in the APGroup class: the list of access points, and the list of messages. Besides these, an APGroup has a name, a parent, and an ID, all of which are stored as strings.

Constructor Summary
APGroup()
           
 
Method Summary
 void fromXML(org.kxml2.io.KXmlParser theParser)
          Like other parsing methods, this one assumes that a <groups> tag has already been found by the KXmlParser you pass to it.
 AccessPointList getAPList()
           
 java.lang.String getID()
           
 MessageList getMessageList()
           
 java.lang.String getName()
           
 java.lang.String getParent()
           
 void throwParseError()
          This method simply throws an XmlPullParserException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

APGroup

public APGroup()
Method Detail

fromXML

public void fromXML(org.kxml2.io.KXmlParser theParser)
Like other parsing methods, this one assumes that a <groups> tag has already been found by the KXmlParser you pass to it. It looks for <name>, <accesspoints>, <parent>, <id>, and <messages> tags, and fills in its fields with what it finds for those tags. For <id>, <name>, and <parent>, it just fills in what it gets from the parser directly to its string fields using getText(). For <messages> and <accesspoints>, it fills in its MessageList and AccessPointList-type fields respectively, passing them the parser as well. It will continue to ask the parser for more information until it either runs into the end of the document or finds a </group> tag.


throwParseError

public void throwParseError()
                     throws org.xmlpull.v1.XmlPullParserException
This method simply throws an XmlPullParserException. You can tell from the string in the constructor of the exception that it was meant for times when text was expected from the parser but not found.

Throws:
org.xmlpull.v1.XmlPullParserException

getAPList

public AccessPointList getAPList()
Returns:
This method returns the list of access points.

getMessageList

public MessageList getMessageList()
Returns:
This method returns the list of messages

getName

public java.lang.String getName()
Returns:
This method returns the name of the group

getParent

public java.lang.String getParent()
Returns:
This method returns the ID of the parent of the group

getID

public java.lang.String getID()
Returns:
This method returns the ID of the group