}
private static DefaultQuery createQuery( Filter filter, CoordinateReferenceSystem crs,
CoordinateReferenceSystem reproject, String handle, Integer maxFeature, URI namespace,
String[] propertyNames, String typeName ) {
DefaultQuery query = new DefaultQuery();
if (namespace != null) {
query = new DefaultQuery(typeName, namespace, filter, maxFeature, propertyNames, handle);
}
if (crs != null) {
query.setCoordinateSystem(crs);
}
if (reproject != null) {
query.setCoordinateSystemReproject(reproject);
}
if (filter != null) {
query.setFilter(filter);
}
if (handle != null) {
query.setHandle(handle);
}
if (maxFeature != null) {
query.setMaxFeatures(maxFeature);
}
if (propertyNames != null) {
query.setPropertyNames(propertyNames);
}
if (typeName != null) {
query.setTypeName(typeName);
}
return query;
}