public Object parse(ElementInstance instance, Node node, Object value) throws Exception { InsertResultsType resultType = (InsertResultsType) super.parse(instance, node, value); // remove 'none' Iterator it = resultType.getFeature().iterator(); while (it.hasNext()) { EList fids = ((InsertedFeatureType) it.next()).getFeatureId(); if (fids.size() == 1 && "none".equals(fids.get(0).toString())) { it.remove(); } } return resultType; } }
/** * Sets the "InsertResults" element */ public void setInsertResults(net.opengis.wfs.InsertResultsType insertResults) { synchronized (monitor()) { check_orphaned(); net.opengis.wfs.InsertResultsType target = null; target = (net.opengis.wfs.InsertResultsType)get_store().find_element_user(INSERTRESULTS$4, 0); if (target == null) { target = (net.opengis.wfs.InsertResultsType)get_store().add_element_user(INSERTRESULTS$4); } target.set(insertResults); } }
@Override public Element encode(Object object, Document document, Element value) throws Exception { Element e = super.encode(object, document, value); InsertResultsType resultType = (InsertResultsType) object; Iterator it = resultType.getFeature().iterator(); while (it.hasNext()) { Iterator fidit = ((InsertedFeatureType) it.next()).getFeatureId().iterator(); while (fidit.hasNext()) { Element node = document.createElementNS(OGC.NAMESPACE, "FeatureId"); node.setAttribute("fid", fidit.next().toString()); e.appendChild(node); } } return e; } }
public Object parse(ElementInstance instance, Node node, Object value) { InsertResultsType resultType = wfsfactory.createInsertResultsType(); for (Object featureid : node.getChildValues("FeatureId")) { if (!"none".equals(featureid.toString())) { InsertedFeatureType feature = wfsfactory.createInsertedFeatureType(); feature.getFeatureId().add(featureid); resultType.getFeature().add(feature); } } return resultType; }
if (insertResults != null) { @SuppressWarnings("unchecked") List<InsertedFeatureType> inserted = insertResults.getFeature(); for (InsertedFeatureType i : inserted) { @SuppressWarnings("unchecked")
public void addInsertedFeature(String handle, FeatureId featureId) { InsertedFeatureType insertedFeature = ((WfsFactory) getFactory()).createInsertedFeatureType(); insertedFeature.setHandle(handle); insertedFeature.getFeatureId().add(featureId); ((TransactionResponseType) adaptee) .getInsertResults() .getFeature() .add(insertedFeature); }
for (Iterator i = insertResults.getFeature().iterator(); i.hasNext(); ) { InsertedFeatureType insertedFeature = (InsertedFeatureType) i.next(); String handle = insertedFeature.getHandle();
if (insertResults != null) { @SuppressWarnings("unchecked") List<InsertedFeatureType> inserted = insertResults.getFeature(); for (InsertedFeatureType i : inserted) { @SuppressWarnings("unchecked")
insertedFeature.setHandle(rollback.getHandle()); insertedFeature.getFeatureId().add(filterFactory.featureId(fd.getID())); response.getInsertResults().getFeature().add(insertedFeature);