@Override public String getTraverseXlinkDepth() { Object obj = eGet(adaptee, "resolveDepth", Object.class); return obj != null ? obj.toString() : null; }
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(); } }
@Override public FeatureCollectionResponse getFeature(org.geoserver.wfs3.GetFeatureType request) { // If the server has any more results available than it returns (the number it returns is // less than or equal to the requested/default/maximum limit) then the server will include a // link to the next set of results. // This will make paging in WFS3 slower, as it always introduces sorting if (request.getStartIndex() == null && request.getCount() != null) { request.setStartIndex(BigInteger.ZERO); } WFS3GetFeature gf = new WFS3GetFeature(getServiceInfo(), getCatalog()); gf.setFilterFactory(filterFactory); gf.setStoredQueryProvider(getStoredQueryProvider()); FeatureCollectionResponse response = gf.run(new GetFeatureRequest.WFS20(request)); return response; }
@Override public Query createQuery() { return new Query.WFS20(((Wfs20Factory) getFactory()).createQueryType()); }
@Override public BigInteger getMaxFeatures() { return eGet(adaptee, "count", BigInteger.class); }
@Override public List<Object> getAdaptedQueries() { return eGet(adaptee, "abstractQueryExpression", List.class); }
@Override public ResolveValueType getResolve() { return eGet(adaptee, "resolve", ResolveValueType.class); }
@Override public void setMaxFeatures(BigInteger maxFeatures) { eSet(adaptee, "count", maxFeatures); }
@Override public FeatureCollectionResponse createResponse() { return new FeatureCollectionResponse.WFS20( ((Wfs20Factory) getFactory()).createFeatureCollectionType()); }
public static GetFeatureRequest adapt(Object request) { if (request instanceof GetFeatureType) { return new WFS11((EObject) request); } else if (request instanceof net.opengis.wfs20.GetFeatureType) { return new WFS20((EObject) request); } return null; }
public FeatureCollectionResponse getFeature(GetFeatureType request) throws WFSException { GetFeature gf = new GetFeature(getServiceInfo(), getCatalog()); gf.setFilterFactory(filterFactory); gf.setStoredQueryProvider(getStoredQueryProvider()); return gf.run(new GetFeatureRequest.WFS20(request)); }
/** * Test {@link WFSException#init(Object)} for Exception with a WFS20 {@link * GetFeatureRequest}-Action. * * @see "https://osgeo-org.atlassian.net/browse/GEOS-5857" */ @Test public void testWFS20GetFeatureType() { WFSException tmpEx = new WFSException(new GetFeatureRequest.WFS20(getFeatureType2), "test"); Assert.assertEquals("GetFeature", tmpEx.getLocator()); } }
@Override public List<Query> getQueries() { List<Object> adaptedQueries = getAdaptedQueries(); return GetFeatureRequest.WFS20.getQueries(adaptedQueries); } }
@Override public boolean isQueryTypeNamesUnset() { return EMFUtils.isUnset( eGet(adaptee, "abstractQueryExpression", List.class), "typeNames"); }
@Override public List<Query> getQueries() { List<Object> adaptedQueries = getAdaptedQueries(); return getQueries(adaptedQueries); }
@Override public BigInteger getResolveTimeOut() { return eGet(adaptee, "resolveTimeOut", BigInteger.class); } }
@Override public LockFeatureRequest createLockRequest() { return new LockFeatureRequest.WFS20( ((Wfs20Factory) getFactory()).createLockFeatureType()); }