Class WFSCountDefaultUtil
java.lang.Object
org.tailormap.api.geotools.wfs.WFSCountDefaultUtil
Reads the maximum number of features a WFS 2.0.0 server returns for a GetFeature request, advertised in the
capabilities as the
CountDefault constraint (for example the GeoServer maxFeatures or MapServer
wfs_maxfeatures setting). A server returns at most this number of features, even if a higher count is requested. WFS
1.x servers don't advertise their limit.-
Method Summary
Modifier and TypeMethodDescriptionstatic IntegergetCountDefault(org.geotools.api.data.DataAccess<?, ?> dataStore) Get theCountDefaultof a WFS from the capabilities GeoTools already retrieved when opening the data store, so no extra request is made.static IntegergetCountDefault(Document capabilities) Get theCountDefaultfrom a WFS capabilities document.
-
Method Details
-
getCountDefault
Get theCountDefaultof a WFS from the capabilities GeoTools already retrieved when opening the data store, so no extra request is made.- Parameters:
dataStore- the data store, may be of any type- Returns:
- the CountDefault, or
nullif the data store is not a WFS or the WFS has no (valid) CountDefault
-
getCountDefault
Get theCountDefaultfrom a WFS capabilities document. A constraint on the GetFeature operation takes precedence over one for all operations.- Parameters:
capabilities- the capabilities document- Returns:
- the CountDefault, or
nullif absent or not a positive integer
-