/** * WFS LockFeatureType operation. * * @param request The lock feature request. * * @return A lock feture response type. * * @throws WFSException An service exceptions. */ public LockFeatureResponseType lockFeature(LockFeatureType request) throws WFSException { LockFeature lockFeature = new LockFeature(wfs, catalog); lockFeature.setFilterFactory(filterFactory); return lockFeature.lockFeature(request); }
/** * WFS LockFeatureType operation. * * @param request The lock feature request. * @return A lock feature response type. * @throws WFSException An service exceptions. */ public LockFeatureResponseType lockFeature(LockFeatureType request) throws WFSException { LockFeature lockFeature = new LockFeature(getServiceInfo(), catalog); lockFeature.setFilterFactory(filterFactory); return (LockFeatureResponseType) lockFeature.lockFeature(new LockFeatureRequest.WFS11(request)).getAdaptee(); }
lockFeature.setFilterFactory(filterFactory); LockFeatureResponse response = lockFeature.lockFeature(lockRequest); lockId = response.getLockId();
public LockFeatureResponseType lockFeature(LockFeatureType request) throws WFSException { LockFeature lockFeature = new LockFeature(getServiceInfo(), getCatalog(), filterFactory); LockFeatureRequest.WFS20 requestWrapper = new LockFeatureRequest.WFS20(request); if (request.getLockId() != null) { lockFeature.refresh(request.getLockId(), true); LockFeatureResponse response = requestWrapper.createResponse(); response.setLockId(request.getLockId()); return (LockFeatureResponseType) response.getAdaptee(); } else { // Need to perform some of the same Stored Query handling as GetFeature // ... expand eventual stored queries boolean getFeatureById = GetFeature.expandStoredQueries( requestWrapper, request.getAbstractQueryExpression(), getStoredQueryProvider()); // ... expand the typenames from feature id filters (the wrappers will modify the // underlying object List<Query> queries = GetFeatureRequest.WFS20.getQueries(request.getAbstractQueryExpression()); GetFeature.expandTypeNames(requestWrapper, queries, getFeatureById, getCatalog()); // ... lock cannot handle queries with multiple target typenames, need to expand them // into separate queries fixQueriesForLock(request.getAbstractQueryExpression()); // run the lock return (LockFeatureResponseType) lockFeature.lockFeature(requestWrapper).getAdaptee(); } }