Examples of AttributeExpression


Examples of org.codehaus.groovy.ast.expr.AttributeExpression

            classNode.addField(fieldNode);
           
            String setterName = "set" + MetaClassHelper.capitalize(apiProperty);
            Parameter setterParameter = new Parameter(implementationNode, apiProperty);
            BlockStatement setterBody = new BlockStatement();
            setterBody.addStatement(new ExpressionStatement(new BinaryExpression(new AttributeExpression(
                    new ClassExpression(classNode), new ConstantExpression(apiProperty)), Token.newSymbol(Types.EQUAL, 0, 0),
                    new VariableExpression(setterParameter))));

            GrailsASTUtils.addCompileStaticAnnotation(classNode.addMethod(setterName, Modifier.PUBLIC | Modifier.STATIC, ClassHelper.VOID_TYPE, new Parameter[]{setterParameter}, null, setterBody));
        }
View Full Code Here

Examples of org.codehaus.groovy.ast.expr.AttributeExpression

    public static Expression assignX(Expression target, Expression value) {
        return new BinaryExpression(target, ASSIGN, value);
    }

    public static Expression attrX(Expression oe, Expression prop) {
        return new AttributeExpression(oe, prop);
    }
View Full Code Here

Examples of org.geotools.filter.AttributeExpression

                    query.setPropertyNames(properties);
                }
               
                // Add range to filter
                AttributeExpression geomAttb = filterFactory.createAttributeExpression(meta.getFeatureType(), meta.getFeatureType().getDefaultGeometry().getName());
                LiteralExpression pointExpr = filterFactory.createLiteralExpression(request.getPoint());
                DWithin dWithin = filterFactory.dwithin(geomAttb, pointExpr, request.getMaxRange(), request.getUnits());
                if (query.getFilter() == null) {
                    query.addFilter((Filter)dWithin);
                   
View Full Code Here

Examples of org.geotools.filter.AttributeExpression

        baseRequest.setLockAll(true);

        // make base comparison objects
        GeometryFilter filter = factory.createGeometryFilter(AbstractFilter.GEOMETRY_WITHIN);
        //DJB changed this so it conforms to new FeatureType method
        AttributeExpression leftExpression = factory.createAttributeExpression((FeatureType)null,"location");
        //leftExpression.setAttributePath("location");

        // Creates coordinates for the linear ring
        Coordinate[] coords = new Coordinate[5];
        coords[0] = new Coordinate(10, 10);
View Full Code Here

Examples of org.geotools.filter.AttributeExpression

        UpdateRequest update2 = new UpdateRequest();
        update2.setTypeName("BUILTUPA_1M");

        CompareFilter compFilter = factory.createCompareFilter(AbstractFilter.COMPARE_GREATER_THAN);
        AttributeExpression tempLeftExp = factory.createAttributeExpression((AttributeType)null);
        tempLeftExp.setAttributePath("TILE_ID");

        LiteralExpression tempRightExp = factory.createLiteralExpression(1000);
        compFilter.addLeftValue(tempLeftExp);
        compFilter.addRightValue(tempRightExp);
        update2.setFilter(compFilter);
View Full Code Here

Examples of org.geotools.filter.AttributeExpression

        internalRequest1.setTypeName("rail");

        //baseRequest.setReleaseAction(true);
        // make base comparison objects
        GeometryFilter filter = factory.createGeometryFilter(AbstractFilter.GEOMETRY_WITHIN);
        AttributeExpression leftExpression = factory.createAttributeExpression((AttributeType)null);
        leftExpression.setAttributePath("location");

        // Creates coordinates for the linear ring
        Coordinate[] coords = new Coordinate[5];
        coords[0] = new Coordinate(10, 10);
        coords[1] = new Coordinate(10, 20);
View Full Code Here

Examples of org.geotools.filter.AttributeExpression

        LinearRing outerRing = new LinearRing(coord, new PrecisionModel(), 0);
        LinearRing[] innerRing = new LinearRing[0];
        Polygon tempPoly = new Polygon(outerRing, innerRing,
                new PrecisionModel(), 0);
        //djb -- trying to get this to work with new FeatureType
        AttributeExpression tempLeftExp = factory.createAttributeExpression((FeatureType)null,"location");
        //tempLeftExp.setAttributePath("location");

        LiteralExpression tempRightExp = factory.createLiteralExpression(DefaultExpression.LITERAL_GEOMETRY);
        tempRightExp.setLiteral(tempPoly);
View Full Code Here

Examples of org.geotools.filter.AttributeExpression

        LinearRing outerRing = new LinearRing(coord, new PrecisionModel(), 0);
        LinearRing[] innerRing = new LinearRing[0];
        Polygon tempPoly = new Polygon(outerRing, innerRing,
                new PrecisionModel(), 0);
        AttributeExpression tempLeftExp = factory.createAttributeExpression((FeatureType)null,"location");
        //tempLeftExp.setAttributePath("location");

        LiteralExpression tempRightExp = factory.createLiteralExpression(DefaultExpression.LITERAL_GEOMETRY);
        tempRightExp.setLiteral(tempPoly);
View Full Code Here

Examples of org.geotools.filter.AttributeExpression

        LinearRing outerRing = new LinearRing(coord, new PrecisionModel(), 0);
        LinearRing[] innerRing = new LinearRing[0];
        Polygon tempPoly = new Polygon(outerRing, innerRing,
                new PrecisionModel(), 0);
        AttributeExpression tempLeftExp = factory.createAttributeExpression((FeatureType)null,"location");
       // tempLeftExp.setAttributePath("location");

        LiteralExpression tempRightExp = factory.createLiteralExpression(DefaultExpression.LITERAL_GEOMETRY);
        tempRightExp.setLiteral(tempPoly);
View Full Code Here

Examples of org.geotools.filter.AttributeExpression

    public void test8() throws Exception {
        // make base comparison objects              
        LiteralExpression tempExp1 = factory.createLiteralExpression(DefaultExpression.LITERAL_STRING);
        tempExp1.setLiteral("Main St.");

        AttributeExpression tempExp2 = factory.createAttributeExpression((FeatureType)null,"Person/Address/StreetName");
        //tempExp2.setAttributePath("Person/Address/StreetName");

        CompareFilter tempFilter = factory.createCompareFilter(AbstractFilter.COMPARE_EQUALS);
        tempFilter.addRightValue(tempExp1);
        tempFilter.addLeftValue(tempExp2);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.