public abstract class RAPPEnumeration extends Object
Constructor and Description |
---|
RAPPEnumeration()
Creates a new instance of the class with an empty
list of items.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addElement(RAPPEnumerationItem item)
Appends an element.
|
protected abstract RAPPEnumerationItem |
createItem()
Creates an instance of the EnumerationItem class.
|
int |
getCount()
Gets the count of elements in the vector.
|
protected RAPPEnumerationItem |
getElementAt(int index)
Gets the element at a position.
|
void |
serializeFromDocument(RAPPElement element,
String enumName,
String itemName)
Initializes the enumeration and its items class instances
from a reply Element.
|
void |
serializeToDocument(RAPPElement element,
String enumName,
String itemName)
Creates all Elements for the enumeration items.
|
String |
toString()
Converts this class into a string for testing purposes.
|
public RAPPEnumeration()
public int getCount()
protected void addElement(RAPPEnumerationItem item)
protected RAPPEnumerationItem getElementAt(int index)
protected abstract RAPPEnumerationItem createItem()
public void serializeToDocument(RAPPElement element, String enumName, String itemName)
This method creates the child node "enumName" and
for all items in the enumeration a child node
"itemName". The item is then called using the method
serializeToDocument(RAPPElement element,int index)
.
The XML for the node looks like (replace parenthesis with less-more-than signs):
(enumName) (itemName attr="123"/) (itemName attr="456"/) ... etc ... (itemName attr="abc"/) (/enumName)
RAPPEnumerationItem
public void serializeFromDocument(RAPPElement element, String enumName, String itemName) throws SAXException
This method creates an item for each "itemName" tag
and calls the item class with the method
serializeFromDocument(RAPPElement element,int index)
.
SAXException
- for errors in the document.RAPPEnumerationItem
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.