org.keel.comm
Class ModelResponseDeserializer
java.lang.Object
org.keel.comm.ModelResponseDeserializer
- public class ModelResponseDeserializer
- extends java.lang.Object
- Author:
- Michael Nash Take a DOM Element representing a ModelResponse, serialized to XML, and return a ModelResponse.
| Method Summary |
static KeelResponse |
deserialize(org.w3c.dom.Element root)
|
private static java.lang.String |
getAttribute(org.w3c.dom.Node n, java.lang.String attribName)
Convenience method to fish through the attributes of a node for one with a particular name and return it's value. |
private static void |
handleAttributes(ResponseElement re, org.w3c.dom.Node oneChild)
Handle attributes of a ResponseElement |
private static ResponseElement |
handleChild(org.w3c.dom.Node oneChild)
|
private static void |
handleNested(ResponseElement re, org.w3c.dom.Node oneChild)
Go through the nested elements of a node looking for any others with an "element-type" attribute - add them as nested elements of the current element |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModelResponseDeserializer
private ModelResponseDeserializer()
deserialize
public static KeelResponse deserialize(org.w3c.dom.Element root)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
ModelException
-
- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
ModelException
handleChild
private static ResponseElement handleChild(org.w3c.dom.Node oneChild)
-
handleNested
private static void handleNested(ResponseElement re,
org.w3c.dom.Node oneChild)
-
Go through the nested elements of a node looking for any others with an "element-type" attribute - add them as nested elements of the current element
-
- Returns:
handleAttributes
private static void handleAttributes(ResponseElement re,
org.w3c.dom.Node oneChild)
-
Handle attributes of a ResponseElement
-
- Parameters:
re -
oneChild -
getAttribute
private static java.lang.String getAttribute(org.w3c.dom.Node n,
java.lang.String attribName)
-
Convenience method to fish through the attributes of a node for one with a particular name and return it's value.
-
- Parameters:
n -
attribName -
- Returns:
- String
Please see keelframework.org for information about new Keel releases.