|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.rfid.premises.app.entities.AbstractXmlObject
public abstract class AbstractXmlObject
This basic abstract class for Xml Bean objects. This abstract class facilitates the converting of a bean class to an XML string (using toXmlString(boolean)) and back (using constructor AbstractXmlObject(String, String).
Field Summary | |
---|---|
protected AttributeTable |
attributes_
An AttributeTable |
protected java.lang.String |
EQ
'Equals' symbol |
protected java.lang.String |
GT
'Greater than' symbol |
protected java.lang.String |
LT
'Less than' symbol |
protected java.lang.String |
QUOTE
'Double quote' symbol |
protected java.lang.String |
SLASH
'Slash' symbol |
protected java.lang.String |
tagName_
tagName string |
static java.lang.String |
XML_START
XML file version and encoding header |
Constructor Summary | |
---|---|
AbstractXmlObject(java.lang.String tagName)
Basic Constructor - creates an empty AbstractXmlObject |
|
AbstractXmlObject(java.lang.String tagName,
java.lang.String xml)
Constructor - creats an AbstractXMLObject containing the XML representation of the object |
Method Summary | |
---|---|
java.lang.String |
getEndTag()
This returns a String representing the closing tag for an XML element. |
protected static org.w3c.dom.NodeList |
getNodeListFromString(java.lang.String xml,
java.lang.String elementName)
Gets a NodeList of the elements based on tag names |
java.lang.String |
getStartTag()
This returns a String representing the opening tag for an XML element. |
protected static java.lang.String |
getStringFromElement(org.w3c.dom.Element e)
Gets the transformed string from the specified element |
abstract java.lang.String |
toXmlString(boolean isTop)
Creates an XML string representation of this AbsstractXMLObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.lang.String LT
protected final java.lang.String SLASH
protected final java.lang.String GT
protected final java.lang.String EQ
protected final java.lang.String QUOTE
public static java.lang.String XML_START
protected java.lang.String tagName_
protected AttributeTable attributes_
Constructor Detail |
---|
public AbstractXmlObject(java.lang.String tagName)
tagName
- is the String used to identify this
AbstractXmlObject object.public AbstractXmlObject(java.lang.String tagName, java.lang.String xml)
tagName
- is the String used to identify this
AbstractXmlObject object.xml
- is the String that represents this object in XML
format.Method Detail |
---|
public java.lang.String getStartTag()
Example: <tagName>
public java.lang.String getEndTag()
Example: </tagName>
public abstract java.lang.String toXmlString(boolean isTop)
isTop
- decides whether or not the XML_START
field is appended to the output of this method. Should
be true if this AbstractXmlObject is the root element.
protected static org.w3c.dom.NodeList getNodeListFromString(java.lang.String xml, java.lang.String elementName) throws java.lang.Exception
xml
- xml string to parseelementName
- the particular element name
java.lang.Exception
protected static java.lang.String getStringFromElement(org.w3c.dom.Element e)
e
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |