Package org.geotools.filter

Examples of org.geotools.filter.AttributeExpressionImpl


            // </sourceExpression>
            // <isMultiple>true</isMultiple>
            // </AttributeMapping>
            // As there can be multiple nodes of mo:composition in this case, we need to retrieve
            // all of them
            AttributeExpressionImpl attribExpression = ((AttributeExpressionImpl) expression);
            String xpath = attribExpression.getPropertyName();
            ComplexAttribute sourceFeature = (ComplexAttribute) sourceFeatureInput;
            StepList xpathSteps = XPath.steps(sourceFeature.getDescriptor(), xpath, namespaces);
            return getProperties(sourceFeature, xpathSteps);
        }
        return expression.evaluate(sourceFeatureInput);
View Full Code Here


            // SortBy2 sortBy = new SortByImpl(new
            // AttributeExpressionImpl("CAT_ID"),SortOrder.ASCENDING);
            SortBy sortBy = new SortBy() {
                public PropertyName getPropertyName() {
                    return new AttributeExpressionImpl("CAT_ID");
                }
                public SortOrder getSortOrder() {
                    return SortOrder.ASCENDING;
                }
            };
View Full Code Here

            return null;
        }
    }

    public void setPropertyName(String propertyName) {
        setExpression1(new AttributeExpressionImpl(propertyName));
    }
View Full Code Here

        if (!(filter instanceof IsEqualsToImpl)){
            throw new IllegalArgumentException("The provided filter should be an \"equals to\" filter: \"" + PATH_KEY + "=value\"");
        }
       
        IsEqualsToImpl pathEqualTo = (IsEqualsToImpl) filter;
        AttributeExpressionImpl pathKey = (AttributeExpressionImpl) pathEqualTo.getExpression1();
        String pathK = (String) pathKey.getPropertyName();
        if (!pathK.equalsIgnoreCase(PATH_KEY)){
            throw new IllegalArgumentException("Invalid filter specified. It should be like this: \"" + PATH_KEY + "=value\" whilst the first expression is " + pathK);
        }
       
        Literal pathValue = (Literal) pathEqualTo.getExpression2();
View Full Code Here

       
        public void addFeature(Feature f, Link l) {
            Property property = f.getProperty(new NameImpl(l.getKey()));
            if (property == null || property.getValue() == null)
                return;
            branches.add(FF.equals(new AttributeExpressionImpl(new NameImpl(l.getForeign())), FF.literal(property.getValue())));
        }
View Full Code Here

      return result;

    }
    if (expression.getClass().isAssignableFrom(
        AttributeExpressionImpl.class)) {
      AttributeExpressionImpl v = (AttributeExpressionImpl) expression;
      String property = v.getPropertyName();
      Object o = feature.getProperty(property).getValue();
      if (o != null) {
        return o.toString();
      }
    }
View Full Code Here

    return query;
  }

  private static Filter createGridFilter(SimpleFeatureType schema, FilterFactory filterFactory, GetTileRequest request)
      throws IllegalFilterException {
    PropertyName tilerow = new AttributeExpressionImpl("tilerow");
    Literal tilerow_value = filterFactory.literal(request.getTileRow());
    Filter tilerow_filter = filterFactory.equals(tilerow, tilerow_value);
    PropertyName tilecol = new AttributeExpressionImpl("tilecol");
    Literal tilecol_value = filterFactory.literal(request.getTileCol());
    Filter tilecol_filter = filterFactory.equals(tilecol, tilecol_value);
    PropertyName tilelevel = new AttributeExpressionImpl("tilelevel");
    Literal tilelevel_value = filterFactory.literal(request.getTileLevel());
    Filter tilelevel_filter = filterFactory.equals(tilelevel, tilelevel_value);
    Filter filter = filterFactory.and(tilerow_filter, tilecol_filter);
    return filterFactory.and(filter, tilelevel_filter);
  }
View Full Code Here

                .getBean("testResourceAccessManager");
        Catalog catalog = getCatalog();
        FeatureTypeInfo gu = catalog.getFeatureTypeByName("gsml:GeologicUnit");

        // limits for mr readfilter
        Filter f = ff.equal(new AttributeExpressionImpl("gsml:purpose", ns), ff.literal("instance"), false);
        tam.putLimits("cite_readfilter", gu, new VectorAccessLimits(CatalogMode.HIDE, null, f,
                null, null));

        List<PropertyName> readAtts = Arrays.asList(ff.property("gsml:composition"),
                ff.property("gsml:outcropCharacter"));
View Full Code Here

      }
      return result;

    }
    if (exp.getClass().isAssignableFrom(AttributeExpressionImpl.class)) {
      AttributeExpressionImpl v = (AttributeExpressionImpl) exp;
      String property = v.getPropertyName();
      Property p = feature.getProperty(property);
      if (p == null) {
        return "";
      }
      Object o = p.getValue();
View Full Code Here

TOP

Related Classes of org.geotools.filter.AttributeExpressionImpl

Copyright © 2018 www.massapicom. 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.