*
* @generated modifiable
*/
public Object parse(ElementInstance instance, Node node, Object value)
throws Exception {
TransactionType transaction = wfsfactory.createTransactionType();
//<xsd:element minOccurs="0" ref="wfs:LockId">
if (node.hasChild("LockId")) {
transaction.setLockId((String) node.getChildValue("LockId"));
}
//<xsd:choice maxOccurs="unbounded" minOccurs="0">
// <xsd:element ref="wfs:Insert"/>
// <xsd:element ref="wfs:Update"/>
// <xsd:element ref="wfs:Delete"/>
// <xsd:element ref="wfs:Native"/>
//</xsd:choice>
for (Iterator itr = node.getChildren().iterator(); itr.hasNext();) {
Node child = (Node) itr.next();
Object cv = child.getValue();
if (cv instanceof InsertElementType) {
transaction.getInsert().add(cv);
} else if (cv instanceof UpdateElementType) {
transaction.getUpdate().add(cv);
} else if (cv instanceof DeleteElementType) {
transaction.getDelete().add(cv);
} else if (cv instanceof NativeType) {
transaction.getNative().add(cv);
}
}
//<xsd:attribute name="releaseAction" type="wfs:AllSomeType" use="optional">
if (node.hasAttribute(AllSomeType.class)) {
transaction.setReleaseAction((AllSomeType) node.getAttributeValue(AllSomeType.class));
}
return transaction;
}