"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/plugin/mongodb/src/main/java/org/geotools/data/mongodb/FilterToMongo.java" between
geotools-24.0-project.zip and geotools-24.1-project.zip

About: GeoTools (The Open Source Java GIS Toolkit) is a Java code library which provides standards compliant methods for the manipulation of geospatial data.

FilterToMongo.java  (geotools-24.0-project):FilterToMongo.java  (geotools-24.1-project)
skipping to change at line 239 skipping to change at line 239
else return null; else return null;
} }
} }
PropertyNameFinder finder = new PropertyNameFinder(); PropertyNameFinder finder = new PropertyNameFinder();
filter.getFilter().accept(finder, null); filter.getFilter().accept(finder, null);
PropertyName pn = finder.getPropertyName(); PropertyName pn = finder.getPropertyName();
// gets child filter as it is // gets child filter as it is
BasicDBObject expr = (BasicDBObject) filter.getFilter().accept(this, nul l); BasicDBObject expr = (BasicDBObject) filter.getFilter().accept(this, nul l);
BasicDBObject dbObject; BasicDBObject dbObject;
if (pn != null) { if (pn != null) {
String strPn = pn.getPropertyName(); String strPn = mapper.getPropertyPath(pn.getPropertyName());
// get only the operator expression // get only the operator expression
Object exprValue = expr.get(strPn); Object exprValue = expr.get(strPn);
dbObject = new BasicDBObject("$not", exprValue); dbObject = new BasicDBObject("$not", exprValue);
// move up the PropertyName // move up the PropertyName
output.put(strPn, dbObject); output.put(strPn, dbObject);
} else { } else {
// no PropertyName found throwing exception // no PropertyName found throwing exception
throw new UnsupportedOperationException( throw new UnsupportedOperationException(
"No propertyName found, cannot use $not as top level operato r"); "No propertyName found, cannot use $not as top level operato r");
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)