Package org.geotools.filter

Examples of org.geotools.filter.IsEqualsToImpl


    } else if (filter instanceof LikeFilterImpl) {
      LikeFilterImpl impl = (LikeFilterImpl) filter;
      String encode = impl.getLiteral();
      impl.setLiteral(decodeString(encode));
    } else if (filter instanceof IsEqualsToImpl) {
      IsEqualsToImpl impl = (IsEqualsToImpl) filter;
      decodeExpression(impl.getExpression1());
      decodeExpression(impl.getExpression2());
    } else if (filter instanceof IsNotEqualToImpl) {
      IsNotEqualToImpl impl = (IsNotEqualToImpl) filter;
      decodeExpression(impl.getExpression1());
      decodeExpression(impl.getExpression2());
    }
  }
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();
        String pathV = (String) pathValue.getValue();

        return pathV;
    }
View Full Code Here

  public boolean match(Feature feature) {
    if (this.filter == null)
      return true;
    if (filter.getClass().isAssignableFrom(IsEqualsToImpl.class)) {
      IsEqualsToImpl equal = (IsEqualsToImpl) filter;
      String v1 = this
          .getExpressionValue(equal.getExpression1(), feature);
      v1 = v1.trim();
      String v2 = this
          .getExpressionValue(equal.getExpression2(), feature);
      return v1.equalsIgnoreCase(v2);
    }
    return false;
  }
View Full Code Here

  public boolean match(Feature feature) {
    if (this.filter == null)
      return true;
    if (this.filter.getClass().isAssignableFrom(IsEqualsToImpl.class)) {
      IsEqualsToImpl equal = (IsEqualsToImpl) filter;
      String v1 = this
          .getExpressionValue(equal.getExpression1(), feature);
      v1 = v1.trim();
      String v2 = this
          .getExpressionValue(equal.getExpression2(), feature);
      return v1.equalsIgnoreCase(v2);
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of org.geotools.filter.IsEqualsToImpl

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.