public class FeatureToJson extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_FEATURES |
| Constructor and Description |
|---|
FeatureToJson(boolean arrays,
boolean edit) |
FeatureToJson(boolean arrays,
boolean edit,
boolean graph,
boolean aliases,
boolean returnNullval,
List<Long> attributesToInclude) |
FeatureToJson(boolean arrays,
boolean edit,
boolean graph,
boolean aliases,
boolean returnNullval,
List<Long> attributesToInclude,
boolean ordered) |
FeatureToJson(boolean arrays,
boolean edit,
boolean graph,
boolean aliases,
List<Long> attributesToInclude) |
FeatureToJson(boolean arrays,
boolean edit,
boolean graph,
List<Long> attributesToInclude) |
| Modifier and Type | Method and Description |
|---|---|
org.json.JSONArray |
getJSONFeatures(ApplicationLayer al,
SimpleFeatureType ft,
org.geotools.data.FeatureSource fs,
org.geotools.data.Query q,
javax.persistence.EntityManager em,
Application application,
javax.servlet.http.HttpServletRequest request)
Get the features, unsorted, as JSONArray with the given params.
|
org.json.JSONArray |
getJSONFeatures(ApplicationLayer al,
SimpleFeatureType ft,
org.geotools.data.FeatureSource fs,
org.geotools.data.Query q,
String sort,
String dir,
javax.persistence.EntityManager em,
Application application,
javax.servlet.http.HttpServletRequest request)
Get the features, optionally sorted, as JSONArray with the given params.
|
static org.opengis.filter.Filter |
reformatFilter(org.opengis.filter.Filter filter,
SimpleFeatureType ft)
Optimze and reformat filter.
|
static org.opengis.filter.Filter |
reformatFilter(org.opengis.filter.Filter filter,
SimpleFeatureType ft,
boolean includeRelations)
Optimze and reformat filter.
|
public static final int MAX_FEATURES
public FeatureToJson(boolean arrays,
boolean edit)
public FeatureToJson(boolean arrays,
boolean edit,
boolean graph,
List<Long> attributesToInclude)
public FeatureToJson(boolean arrays,
boolean edit,
boolean graph,
boolean aliases,
List<Long> attributesToInclude)
public FeatureToJson(boolean arrays,
boolean edit,
boolean graph,
boolean aliases,
boolean returnNullval,
List<Long> attributesToInclude)
public FeatureToJson(boolean arrays,
boolean edit,
boolean graph,
boolean aliases,
boolean returnNullval,
List<Long> attributesToInclude,
boolean ordered)
arrays - true when???edit - true to return editable datagraph - true when??aliases - true to return aliases in the responsereturnNullval - true to return empty string for null valueattributesToInclude - List of attributes to return in the responseordered - true to return an JSONArray with attributes per
feature instead of JSONObject to maintain order of attributespublic org.json.JSONArray getJSONFeatures(ApplicationLayer al, SimpleFeatureType ft, org.geotools.data.FeatureSource fs, org.geotools.data.Query q, javax.persistence.EntityManager em, Application application, javax.servlet.http.HttpServletRequest request) throws IOException, org.json.JSONException, Exception
al - The application layer(if there is a application layer)ft - The featuretype that must be used to get the featuresfs - The featureSourceq - The queryem - The entitymanager of the session, for retrieving uploadsapplication - The application from which this request originatesrequest - The current request to look if the user has rights to view the uploadsIOException - if anyorg.json.JSONException - if transforming to json failsException - if anygetJSONFeatures(nl.b3p.viewer.config.app.ApplicationLayer,
nl.b3p.viewer.config.services.SimpleFeatureType,
org.geotools.data.FeatureSource, org.geotools.data.Query,
java.lang.String, java.lang.String, javax.persistence.EntityManager, Application, HttpServletRequest)public org.json.JSONArray getJSONFeatures(ApplicationLayer al, SimpleFeatureType ft, org.geotools.data.FeatureSource fs, org.geotools.data.Query q, String sort, String dir, javax.persistence.EntityManager em, Application application, javax.servlet.http.HttpServletRequest request) throws IOException, org.json.JSONException, Exception
al - The application layer(if there is a application layer)ft - The featuretype that must be used to get the featuresfs - The featureSourceq - The querysort - The attribute name that is used to sortdir - Sort direction (DESC or ASC)IOException - if anyorg.json.JSONException - if transforming to json failsException - if anypublic static org.opengis.filter.Filter reformatFilter(org.opengis.filter.Filter filter,
SimpleFeatureType ft)
throws Exception
reformatFilter(org.opengis.filter.Filter, nl.b3p.viewer.config.services.SimpleFeatureType, boolean)
with the includeRelations set to true.filter - the filter to processft - featuretype to apply filterException - if anyreformatFilter(org.opengis.filter.Filter,
nl.b3p.viewer.config.services.SimpleFeatureType, boolean)public static org.opengis.filter.Filter reformatFilter(org.opengis.filter.Filter filter,
SimpleFeatureType ft,
boolean includeRelations)
throws Exception
filter - the filter to processft - featuretype to apply filterincludeRelations - whether to include related (joined) dataException - if anyCopyright © 2020. All rights reserved.