protected InsertElementType createInsert(WfsFactory factory, Insert elem) throws Exception { InsertElementType insert = factory.createInsertElementType(); String srsName = getFeatureTypeInfo(elem.getTypeName()).getDefaultSRS(); insert.setSrsName(new URI(srsName)); List<SimpleFeature> features = elem.getFeatures(); insert.getFeature().addAll(features); return insert; }
insertElement.setSrsName((URI) node.getAttributeValue("srsName"));
protected InsertElementType createInsert(WfsFactory factory, Insert elem) throws Exception { InsertElementType insert = factory.createInsertElementType(); String srsName = getFeatureTypeInfo(elem.getTypeName()).getDefaultSRS(); insert.setSrsName(new URI(srsName)); List<SimpleFeature> features = elem.getFeatures(); insert.getFeature().addAll(features); return insert; }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { InsertElementType insertElement = wfsfactory.createInsertElementType(); // features insertElement.getFeature().addAll(node.getChildValues(SimpleFeature.class)); // handle if (node.hasAttribute("handle")) { insertElement.setHandle((String) node.getAttributeValue("handle")); } // NOTE: officially this is not supported for wfs 1.0, but we support it // here as an extension to wfs 1.0, also since its not actualy in the // schema it comes to us as a string, not a uri // <xsd:attribute name="srsName" type="xsd:anyURI" use="optional"> if (node.hasAttribute("srsName")) { String srsName = (String) node.getAttributeValue("srsName"); insertElement.setSrsName(new URI(srsName)); } return insertElement; }
insertElement.setSrsName((URI) node.getAttributeValue("srsName"));