@Override public boolean isLockActionAll() { return ((LockFeatureType) adaptee).getLockAction() == AllSomeType.ALL_LITERAL; }
@Override public void setLockActionSome() { ((LockFeatureType) adaptee).setLockAction(AllSomeType.SOME_LITERAL); }
lockFeature.getLock().addAll(node.getChildValues(LockType.class)); lockFeature.setExpiry((BigInteger) node.getAttributeValue("expiry")); } else { lockFeature.setExpiry(BigInteger.valueOf(5)); lockFeature.setLockAction((AllSomeType) node.getAttributeValue("lockAction")); } else { lockFeature.setLockAction(AllSomeType.ALL_LITERAL);
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); } } }
writer.write(buildSchemaURL(lft.getBaseUrl(), "wfs/1.0.0/WFS-transaction.xsd")); writer.write("\">" + "\n");
/** * Sets the "LockFeature" element */ public void setLockFeature(net.opengis.wfs.LockFeatureType lockFeature) { synchronized (monitor()) { check_orphaned(); net.opengis.wfs.LockFeatureType target = null; target = (net.opengis.wfs.LockFeatureType)get_store().find_element_user(LOCKFEATURE$0, 0); if (target == null) { target = (net.opengis.wfs.LockFeatureType)get_store().add_element_user(LOCKFEATURE$0); } target.set(lockFeature); } }
lockFeature.getLock().addAll(node.getChildValues(LockType.class)); lockFeature.setExpiry( BigInteger.valueOf(((Number) node.getAttributeValue("expiry")).longValue())); lockFeature.setLockAction((AllSomeType) node.getAttributeValue(AllSomeType.class));
EList lock = lockFeature.getLock();
void write1_1(LockFeatureResponseType lockResponse, OutputStream output, Operation operation) throws IOException { Encoder encoder = new Encoder(configuration, configuration.schema()); encoder.setEncoding(Charset.forName(getInfo().getGeoServer().getSettings().getCharset())); LockFeatureType req = (LockFeatureType) operation.getParameters()[0]; encoder.setSchemaLocation( org.geoserver.wfs.xml.v1_1_0.WFS.NAMESPACE, buildSchemaURL(req.getBaseUrl(), "schemas/wfs/1.1.0/wfs.xsd")); encoder.encode(lockResponse, org.geoserver.wfs.xml.v1_1_0.WFS.LOCKFEATURERESPONSE, output); output.flush(); } }
@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)); }
@Override public void setLockActionAll() { ((LockFeatureType) adaptee).setLockAction(AllSomeType.ALL_LITERAL); }
@Override public boolean isLockActionSome() { return ((LockFeatureType) adaptee).getLockAction() == AllSomeType.SOME_LITERAL; }
@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)); }