public void encode(Writer out, org.opengis.filter.expression.Expression expression) throws SQLEncoderException { this.out = out; ((DefaultExpression) expression).accept(this); }
LOGGER.finer("is fid (3): " + isFidFilter); } else if (DefaultExpression.isExpression(filterType)) {
/** * This method calls {@link #evaluate(Feature)}. * * @deprecated use {@link #evaluate(Feature)}. */ public final Object getValue(Feature feature) { return evaluate((Object)feature); }
/** * Checks to see if passed type is geometry. * * @param expressionType Type of expression for check. * @return Whether or not this is a geometry expression type. */ public static boolean isExpression(short expressionType) { return (isMathExpression(expressionType) || isAttributeExpression(expressionType) || isLiteralExpression(expressionType)) || isFunctionExpression(expressionType); }
public void setExpression1(org.opengis.filter.expression.Expression expression) { Expression leftGeometry = (Expression)expression; //Checks if this is geometry filter or not and handles appropriately if (DefaultExpression.isGeometryExpression(leftGeometry.getType()) || permissiveConstruction) { super.setExpression1(leftGeometry); } else { throw new IllegalFilterException("Attempted to add (left)" + " non-geometry expression" + " to geometry filter."); } }
if (DefaultExpression.isFunctionExpression(convertType)) { expFactory = new ExpressionSAXParser(schema); String name = getFunctionName(atts); if (DefaultExpression.isMathExpression(convertType)) { expFactory = new ExpressionSAXParser(schema); switch (convertType) { } else if (DefaultExpression.isLiteralExpression(convertType)) { curExprssn = new LiteralExpressionImpl(); readChars = true; LOGGER.finer("is literal expression"); } else if (DefaultExpression.isAttributeExpression(convertType)) { curExprssn = new AttributeExpressionImpl(schema); readChars = true;
left.accept(this); out.write(" isnull"); if ( left.getType() == Expression.LITERAL_STRING || right.getType() == Expression.LITERAL_STRING ) { out.write( "lower(" ); left.accept( this ); out.write( ")"); out.write( " " + type + " " ); out.write( "lower(" ); right.accept( this ); out.write( ")"); left.accept(this); out.write(" " + type + " "); right.accept(this);
public void setExpression2(org.opengis.filter.expression.Expression expression) { Expression rightGeometry = (Expression)expression; //Checks if this is math filter or not and handles appropriately if (DefaultExpression.isGeometryExpression(rightGeometry.getType()) || permissiveConstruction) { super.setExpression2(rightGeometry); } else { throw new IllegalFilterException("Attempted to add (right)" + " non-geometry" + "expression to geometry filter."); } } /**
private void encodeExpression(DefaultExpression expr) throws IOException { if (expr == null) { out.write("\"" + defaultGeom + "\""); } else { expr.accept(this); } }
/** * Checks to see if passed type is geometry. * * @param expressionType Type of expression for check. * * @return Whether or not this is a geometry expression type. */ protected static boolean isExpression(short expressionType) { return (isMathExpression(expressionType) || isAttributeExpression(expressionType) || isLiteralExpression(expressionType)) || isFunctionExpression(expressionType); }
else if (DefaultExpression.isExpression(filterType)) { LOGGER.finer("found an expression filter end"); expressionFactory.end(localName);
/** * This method calls {@link #evaluate(Feature)}. * * @deprecated use {@link #evaluate(Feature)}. */ public final Object getValue(SimpleFeature feature) { return evaluate((Object)feature); }
public void setExpression1(org.opengis.filter.expression.Expression expression) { if (expression instanceof Expression) { Expression leftGeometry = (Expression) expression; // Checks if this is geometry filter or not and handles appropriately if (DefaultExpression.isGeometryExpression(leftGeometry.getType()) || permissiveConstruction) { super.setExpression1(leftGeometry); } else { throw new IllegalFilterException("Attempted to add (left)" + " non-geometry expression" + " to geometry filter."); } } else { // I guess we assume it is a good expression... super.setExpression1(expression); } }
/** * * @deprecated use {@link org.opengis.filter.expression.Expression#accept(ExpressionVisitor, Object)} */ public final void accept(FilterVisitor visitor) { accept(new FilterVisitorExpressionWrapper(visitor),null); }
/** * Checks to see if passed type is geometry. * * @param expressionType Type of expression for check. * * @return Whether or not this is a geometry expression type. */ protected static boolean isExpression(short expressionType) { return (isMathExpression(expressionType) || isAttributeExpression(expressionType) || isLiteralExpression(expressionType)) || isFunctionExpression(expressionType); }
LOGGER.finer("is fid (3): " + isFidFilter); } else if (DefaultExpression.isExpression(filterType)) {
/** * Returns a value for this expression. If the expression is an attribute * expression then the attribute of the feature should be returned. If a * literal then the feature is ignored, the literal is returned as it has * no relation to the feature. * * @param feature Specified feature to use when returning value. * * @return The value of this expression based on the feature. * * @task REVISIT: make abstract? */ public Object evaluate(SimpleFeature feature) { return evaluate((Object)feature); }
public void setExpression2(org.opengis.filter.expression.Expression expression) { if (expression instanceof Expression) { Expression rightGeometry = (Expression) expression; // Checks if this is math filter or not and handles appropriately if (DefaultExpression.isGeometryExpression(rightGeometry.getType()) || permissiveConstruction) { super.setExpression2(rightGeometry); } else { throw new IllegalFilterException("Attempted to add (right)" + " non-geometry" + "expression to geometry filter."); } } else { // I guess we assume it is a good expression... super.setExpression2(expression); } }