本文整理汇总了Java中org.opengis.filter.PropertyIsBetween.getLowerBoundary方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyIsBetween.getLowerBoundary方法的具体用法?Java PropertyIsBetween.getLowerBoundary怎么用?Java PropertyIsBetween.getLowerBoundary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opengis.filter.PropertyIsBetween
的用法示例。
在下文中一共展示了PropertyIsBetween.getLowerBoundary方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import org.opengis.filter.PropertyIsBetween; //导入方法依赖的package包/类
/**
* Writes the FilterBuilder for the PropertyIsBetween Filter.
*
* @param filter the Filter to be visited.
*
*/
public Object visit(PropertyIsBetween filter, Object extraData) {
LOGGER.finest("exporting PropertyIsBetween");
Expression expr = (Expression) filter.getExpression();
Expression lowerbounds = (Expression) filter.getLowerBoundary();
Expression upperbounds = (Expression) filter.getUpperBoundary();
Class context;
nested = false;
AttributeDescriptor attType = (AttributeDescriptor)expr.evaluate(featureType);
if (attType != null) {
context = attType.getType().getBinding();
if (attType.getUserData().containsKey(NESTED)) {
nested = (Boolean) attType.getUserData().get(NESTED);
}
if (Date.class.isAssignableFrom(context)) {
updateDateFormatter(attType);
}
} else {
//assume it's a string?
context = String.class;
}
expr.accept(this, extraData);
key = (String) field;
lowerbounds.accept(this, context);
lower = field;
upperbounds.accept(this, context);
upper = field;
if(nested) {
path = extractNestedPath(key);
}
queryBuilder = ImmutableMap.of("range", ImmutableMap.of(key, ImmutableMap.of("gte", lower, "lte", upper)));
if(nested) {
queryBuilder = ImmutableMap.of("nested", ImmutableMap.of("path", path, "query", queryBuilder));
}
return extraData;
}