/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { LockType lock = wfsfactory.createLockType(); // <xsd:element maxOccurs="1" minOccurs="0" ref="ogc:Filter"/> if (node.hasChild(Filter.class)) { lock.setFilter((Filter) node.getChildValue(Filter.class)); } // <xsd:attribute name="handle" type="xsd:string" use="optional"> if (node.hasAttribute("handle")) { lock.setHandle((String) node.getAttributeValue("handle")); } // <xsd:attribute name="typeName" type="xsd:QName" use="required"> lock.setTypeName((QName) node.getAttributeValue("typeName")); return lock; } }
@Test public void testWFSLockFeature() throws Exception { LockFeatureType lf = WfsFactory.eINSTANCE.createLockFeatureType(); LockType l = WfsFactory.eINSTANCE.createLockType(); l.setTypeName(new QName("http://acme.org", "foo", "acme")); lf.getLock().add(l); Operation op = op("LockFeature", "WFS", "1.0.0", lf); callback.operationDispatched(new Request(), op); assertEquals("acme:foo", data.getResources().get(0)); }
protected void handleBBOX(Map kvp, EObject eObject) throws Exception { // set filter from bbox Envelope bbox = (Envelope) kvp.get("bbox"); List<LockType> queries = ((LockFeatureType) eObject).getLock(); for (Iterator it = queries.iterator(); it.hasNext(); ) { LockType lock = (LockType) it.next(); Filter filter = bboxFilter(bbox); lock.setFilter(filter); } } }
/** * Sets ith "Lock" element */ public void setLockArray(int i, net.opengis.wfs.LockType lock) { synchronized (monitor()) { check_orphaned(); net.opengis.wfs.LockType target = null; target = (net.opengis.wfs.LockType)get_store().find_element_user(LOCK$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } target.set(lock); } }
@Test public void testWFSLockFeature() throws Exception { LockFeatureType lf = WfsFactory.eINSTANCE.createLockFeatureType(); LockType l = WfsFactory.eINSTANCE.createLockType(); l.setTypeName(new QName("http://acme.org", "foo", "acme")); lf.getLock().add(l); Operation op = op("LockFeature", "WFS", "1.0.0", lf); callback.operationDispatched(new Request(), op); assertEquals("acme:foo", data.getResources().get(0)); }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { LockType lock = wfsfactory.createLockType(); // <xsd:element maxOccurs="1" minOccurs="0" ref="ogc:Filter"/> if (node.hasChild(Filter.class)) { lock.setFilter((Filter) node.getChildValue(Filter.class)); } // <xsd:attribute name="handle" type="xsd:string" use="optional"/> if (node.hasAttribute("handle")) { lock.setHandle((String) node.getAttributeValue("handle")); } // <xsd:attribute name="typeName" type="xsd:QName" use="required"/> lock.setTypeName((QName) node.getAttributeValue("typeName")); return lock; } }