@SuppressWarnings("unchecked") public Object evaluate(Object feature) { if (feature == null) { return Integer.valueOf(0); // no features were visited in the making of this answer } FeatureCollection<FeatureType, Feature> featureCollection = (FeatureCollection<FeatureType, Feature>) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; average = null; try { CalcResult result = calculateAverage(featureCollection, expr); if (result != null) { average = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return average; }
public Object evaluate(Object feature) { if (feature == null) { return Integer.valueOf(0); // no features were visited in the making of this answer } SimpleFeatureCollection featureCollection = (SimpleFeatureCollection) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; count = null; try { CalcResult result = calculateCount(featureCollection); if (result != null) { count = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return count; } }
@SuppressWarnings("unchecked") public Object evaluate(Object feature) { if (feature == null) { return Integer.valueOf(0); // no features were visited in the making of this answer } FeatureCollection<FeatureType, Feature> featureCollection = (FeatureCollection<FeatureType, Feature>) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; bounds = null; try { CalcResult result = calculateBounds(featureCollection); if (result != null) { bounds = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return bounds; } }
public Object evaluate(Object feature) { if (feature == null) { return Integer.valueOf(0); // no features were visited in the making of this answer } SimpleFeatureCollection featureCollection = (SimpleFeatureCollection) feature; Expression expr = (Expression) getExpression(0); synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; unique = null; try { CalcResult result = calculateUnique(featureCollection, expr); if (result != null) { unique = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return unique; }
public Object evaluate(Object feature) { if (feature == null) { return Integer.valueOf(0); // no features were visited in the making of this answer } Expression expr = (Expression) getExpression(0); SimpleFeatureCollection featureCollection = (SimpleFeatureCollection) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; max = null; try { CalcResult result = calculateMax(featureCollection, expr); if (result != null) { max = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return max; }
public Object evaluate(Object feature) { if (feature == null) { return Integer.valueOf(0); // no features were visited in the making of this answer } Expression expr = (Expression) getExpression(0); SimpleFeatureCollection featureCollection = (SimpleFeatureCollection) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; min = null; try { CalcResult result = calculateMin(featureCollection, expr); if (result != null) { min = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return min; }
public Object evaluate(Object feature) { if (feature == null) { return Integer.valueOf(0); // no features were visited in the making of this answer } SimpleFeatureCollection featureCollection = (SimpleFeatureCollection) feature; Expression expr = (Expression) getExpression(0); synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; sum = null; try { CalcResult result = calculateSum(featureCollection, expr); if (result != null) { sum = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return sum; }
public Object evaluate(Object feature) { if (feature == null) { return Integer.valueOf(0); // no features were visited in the making of this answer } Expression expr = (Expression) getExpression(0); FeatureCollection<? extends FeatureType, ? extends Feature> featureCollection = (SimpleFeatureCollection) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; median = null; try { CalcResult result = calculateMedian(featureCollection, expr); if (result != null) { median = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return median; }
public Object evaluate(Object collection) { if (collection == null) { Literal value = getFallbackValue(); return value == null ? null : value.getValue(); } Expression expr = getParameters().get(0); Literal value = (Literal) getParameters().get(1); SimpleFeatureCollection featureCollection = (SimpleFeatureCollection) collection; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; match = null; try { Object result = near(featureCollection, expr, value.getValue()); if (result != null) { match = result; } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return match; } }
public Object evaluate(Object feature) { if (feature == null) { return new Integer(0); // no features were visited in the making of this answer } FeatureCollection featureCollection = (FeatureCollection) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; bounds = null; try { CalcResult result = calculateBounds(featureCollection); if (result != null) { bounds = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return bounds; }
public Object evaluate(Object feature) { if (feature == null) { return new Integer(0); // no features were visited in the making of this answer } SimpleFeatureCollection featureCollection = (SimpleFeatureCollection) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; count = null; try { CalcResult result = calculateCount(featureCollection); if (result != null) { count = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return count; }
@SuppressWarnings("unchecked") public Object evaluate(Object feature) { if (feature == null) { return new Integer(0); // no features were visited in the making of this answer } FeatureCollection<FeatureType, Feature> featureCollection = (FeatureCollection<FeatureType, Feature>) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; bounds = null; try { CalcResult result = calculateBounds(featureCollection); if (result != null) { bounds = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return bounds; }
public Object evaluate(Object feature) { if (feature == null) { return new Integer(0); // no features were visited in the making of this answer } FeatureCollection featureCollection = (FeatureCollection) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; count = null; try { CalcResult result = calculateCount(featureCollection); if (result != null) { count = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return count; }
@SuppressWarnings("unchecked") public Object evaluate(Object feature) { if (feature == null) { return new Integer(0); // no features were visited in the making of this answer } FeatureCollection<FeatureType, Feature> featureCollection = (FeatureCollection<FeatureType, Feature>) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; average = null; try { CalcResult result = calculateAverage(featureCollection, expr); if (result != null) { average = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return average; }
public Object evaluate(Object feature) { if (feature == null) { return new Integer(0); // no features were visited in the making of this answer } Expression expr = (Expression) getExpression(0); FeatureCollection<? extends FeatureType, ? extends Feature> featureCollection = (SimpleFeatureCollection) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; median = null; try { CalcResult result = calculateMedian(featureCollection, expr); if (result != null) { median = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return median; }
public Object evaluate(Object feature) { if (feature == null) { return new Integer(0); // no features were visited in the making of this answer } Expression expr = (Expression) getExpression(0); SimpleFeatureCollection featureCollection = (SimpleFeatureCollection) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; max = null; try { CalcResult result = calculateMax(featureCollection, expr); if (result != null) { max = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return max; }
public Object evaluate(Object feature) { if (feature == null) { return new Integer(0); // no features were visited in the making of this answer } Expression expr = (Expression) getExpression(0); FeatureCollection featureCollection = (FeatureCollection) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; max = null; try { CalcResult result = calculateMax(featureCollection, expr); if (result != null) { max = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return max; }
public Object evaluate(Object feature) { if (feature == null) { return new Integer(0); // no features were visited in the making of this answer } FeatureCollection featureCollection = (FeatureCollection) feature; Expression expr = (Expression) getExpression(0); synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; unique = null; try { CalcResult result = calculateUnique(featureCollection, expr); if (result != null) { unique = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return unique; }
public Object evaluate(Object feature) { if (feature == null) { return new Integer(0); // no features were visited in the making of this answer } SimpleFeatureCollection featureCollection = (SimpleFeatureCollection) feature; Expression expr = (Expression) getExpression(0); synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; sum = null; try { CalcResult result = calculateSum(featureCollection, expr); if (result != null) { sum = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return sum; }
public Object evaluate(Object feature) { if (feature == null) { return new Integer(0); // no features were visited in the making of this answer } Expression expr = (Expression) getExpression(0); SimpleFeatureCollection featureCollection = (SimpleFeatureCollection) feature; synchronized (featureCollection) { if (featureCollection != previousFeatureCollection) { previousFeatureCollection = featureCollection; min = null; try { CalcResult result = calculateMin(featureCollection, expr); if (result != null) { min = result.getValue(); } } catch (IllegalFilterException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } catch (IOException e) { LOGGER.log(Level.FINER, e.getLocalizedMessage(), e); } } } return min; }