public void visit(org.opengis.feature.Feature feature) { Object value = expr.evaluate(feature); if (value != null) { if (strategy == null) { Class type = value.getClass(); strategy = createStrategy(type); } strategy.add(value); } }
public void setValue(Object newAverage) { reset(); Class type = newAverage.getClass(); strategy = createStrategy(type); strategy.add(newAverage); isOptimized = true; }
public void setValue(int newCount, Object newSum) { reset(); strategy = createStrategy(newSum.getClass()); strategy.set(newCount, newSum); isOptimized = false; // this is an optimization, but we have the same // information we would otherwise have if we had // in fact visited each feature }
/** * Constructor class for the AverageVisitor using AttributeDescriptor ID * * @param attributeTypeIndex integer representing the AttributeDescriptor * @param type FeatureType * @throws IllegalFilterException */ public AverageVisitor(int attributeTypeIndex, SimpleFeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); AttributeDescriptor attributeType = type.getDescriptor(attributeTypeIndex); expr = factory.property(attributeType.getLocalName()); createStrategy(attributeType.getType().getBinding()); }
/** * Constructor class for the AverageVisitor using AttributeDescriptor Name * * @param attrName string respresenting the AttributeDescriptor * @param type FeatureType * @throws IllegalFilterException */ public AverageVisitor(String attrName, SimpleFeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); AttributeDescriptor attributeType = type.getDescriptor(attrName); expr = factory.property(attributeType.getLocalName()); createStrategy(attributeType.getType().getBinding()); }
public void setValue(int newCount, Object newSum) { reset(); strategy = createStrategy(newSum.getClass()); strategy.set(newCount, newSum); isOptimized = false; // this is an optimization, but we have the same // information we would otherwise have if we had // in fact visited each feature }
public void visit(Feature feature) { Object value = expr.evaluate(feature); if (strategy == null) { Class type = value.getClass(); strategy = createStrategy(type); } strategy.add(value); }
public void setValue(int newCount, Object newSum) { reset(); strategy = createStrategy(newSum.getClass()); strategy.set(newCount, newSum); isOptimized = false; // this is an optimization, but we have the same // information we would otherwise have if we had // in fact visited each feature }
public void visit(org.opengis.feature.Feature feature) { Object value = expr.evaluate(feature); if (strategy == null) { Class type = value.getClass(); strategy = createStrategy(type); } strategy.add(value); }
public void setValue(Object newAverage) { reset(); Class type = newAverage.getClass(); strategy = createStrategy(type); strategy.add(newAverage); isOptimized = true; }
public void setValue(Object newAverage) { reset(); Class type = newAverage.getClass(); strategy = createStrategy(type); strategy.add(newAverage); isOptimized = true; }
/** * Constructor class for the AverageVisitor using AttributeType Name * * @param attrName string respresenting the AttributeType * @param type FeatureType * * @throws IllegalFilterException */ public AverageVisitor(String attrName, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); AttributeType attributeType = type.getAttributeType(attrName); expr = factory.property(attributeType.getName()); createStrategy(attributeType.getType()); }
/** * Constructor class for the AverageVisitor using AttributeType ID * * @param attributeTypeIndex integer representing the AttributeType * @param type FeatureType * * @throws IllegalFilterException */ public AverageVisitor(int attributeTypeIndex, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); AttributeType attributeType = type.getAttributeType(attributeTypeIndex); expr = factory.property(attributeType.getName()); createStrategy(attributeType.getType()); }
/** * Constructor class for the AverageVisitor using AttributeDescriptor ID * * @param attributeTypeIndex integer representing the AttributeDescriptor * @param type FeatureType * * @throws IllegalFilterException */ public AverageVisitor(int attributeTypeIndex, SimpleFeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); AttributeDescriptor attributeType = type.getDescriptor(attributeTypeIndex); expr = factory.property(attributeType.getLocalName()); createStrategy(attributeType.getType().getBinding()); }
/** * Constructor class for the AverageVisitor using AttributeDescriptor Name * * @param attrName string respresenting the AttributeDescriptor * @param type FeatureType * * @throws IllegalFilterException */ public AverageVisitor(String attrName, SimpleFeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); AttributeDescriptor attributeType = type.getDescriptor(attrName); expr = factory.property(attributeType.getLocalName()); createStrategy(attributeType.getType().getBinding()); }