* @generated modifiable
*/
@SuppressWarnings("unchecked")
public Object parse(ElementInstance instance, Node node, Object value)
throws Exception {
InsertElementType insertElement = wfsfactory.createInsertElementType();
//<xsd:choice>
// <xsd:element ref="gml:_FeatureCollection"/>
// <xsd:sequence>
// <xsd:element maxOccurs="unbounded" ref="gml:_Feature"/>
// </xsd:sequence>
//</xsd:choice>
if (node.hasChild(FeatureCollection.class)) {
SimpleFeatureCollection fc = (SimpleFeatureCollection) node.getChildValue(FeatureCollection.class);
insertElement.getFeature().addAll(DataUtilities.list(fc));
} else if (node.hasChild(SimpleFeature.class)) {
insertElement.getFeature().addAll(node.getChildValues(SimpleFeature.class));
}
//<xsd:attribute default="GenerateNew" name="idgen"
// type="wfs:IdentifierGenerationOptionType" use="optional">
if (node.hasAttribute("idgen")) {
insertElement.setIdgen((IdentifierGenerationOptionType) node.getAttributeValue("idgen"));
}
//<xsd:attribute name="handle" type="xsd:string" use="optional">
if (node.hasAttribute("handle")) {
insertElement.setHandle((String) node.getAttributeValue("handle"));
}
//<xsd:attribute default="text/xml; subtype=gml/3.1.1"
// name="inputFormat" type="xsd:string" use="optional">
if (node.hasAttribute("inputFormat")) {
insertElement.setInputFormat((String) node.getAttributeValue("inputFormat"));
}
//<xsd:attribute name="srsName" type="xsd:anyURI" use="optional">
if (node.hasAttribute("srsName")) {
insertElement.setSrsName((URI) node.getAttributeValue("srsName"));
}
return insertElement;
}