当前位置: 首页>>代码示例>>Java>>正文


Java FilterFactory2.greater方法代码示例

本文整理汇总了Java中org.opengis.filter.FilterFactory2.greater方法的典型用法代码示例。如果您正苦于以下问题:Java FilterFactory2.greater方法的具体用法?Java FilterFactory2.greater怎么用?Java FilterFactory2.greater使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opengis.filter.FilterFactory2的用法示例。


在下文中一共展示了FilterFactory2.greater方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: caseSensitive

import org.opengis.filter.FilterFactory2; //导入方法依赖的package包/类
void caseSensitive() throws Exception {
    // caseSensitive start
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();

    // default is matchCase = true
    Filter filter = ff.equal(ff.property("state"), ff.literal("queensland"));

    // You can override this default with matchCase = false
    filter = ff.equal(ff.property("state"), ff.literal("new south wales"),
            false);

    // All property comparisons allow you to control case sensitivity
    Filter welcome = ff.greater(ff.property("zone"), ff.literal("danger"),
            false);
    // caseSensitive end
}
 
开发者ID:ianturton,项目名称:geotools-cookbook,代码行数:17,代码来源:FilterExamples.java

示例2: ffExample

import org.opengis.filter.FilterFactory2; //导入方法依赖的package包/类
public void ffExample() {
    // start ff example
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;

    // the most common selection criteria is a simple equal test
    ff.equal(ff.property("land_use"), ff.literal("URBAN"));

    // You can also quickly test if a property has a value
    filter = ff.isNull(ff.property("approved"));

    // The usual array of property comparisons is supported
    // the comparison is based on the kind of data so both
    // numeric, date and string comparisons are supported.
    filter = ff.less(ff.property("depth"), ff.literal(300));
    filter = ff.lessOrEqual(ff.property("risk"), ff.literal(3.7));
    filter = ff.greater(ff.property("name"), ff.literal("Smith"));
    filter = ff.greaterOrEqual(ff.property("schedule"), ff.literal(new Date()));

    // PropertyIsBetween is a short inclusive test between two values
    filter = ff.between(ff.property("age"), ff.literal(20), ff.literal("29"));
    filter = ff.between(ff.property("group"), ff.literal("A"), ff.literal("D"));

    // In a similar fashion there is a short cut for notEqual
    filter = ff.notEqual(ff.property("type"), ff.literal("draft"));

    // pattern based "like" filter
    filter = ff.like(ff.property("code"), "2300%");
    // you can customise the wildcard characters used
    filter = ff.like(ff.property("code"), "2300?", "*", "?", "\\");
    // end ff example
}
 
开发者ID:ianturton,项目名称:geotools-cookbook,代码行数:33,代码来源:FilterExamples.java

示例3: matchAction

import org.opengis.filter.FilterFactory2; //导入方法依赖的package包/类
public void matchAction() {
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;
    // matchAction start
    filter = ff.greater(ff.property("child/age"), ff.literal(12), true,
            MatchAction.ALL);
    // matchAction end
}
 
开发者ID:ianturton,项目名称:geotools-cookbook,代码行数:9,代码来源:FilterExamples.java

示例4: matchActionAny

import org.opengis.filter.FilterFactory2; //导入方法依赖的package包/类
public void matchActionAny() {
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;
    // matchActionAny start
    List<Integer> ages = Arrays.asList(new Integer[] { 7, 8, 10, 15 });

    filter = ff.greater(ff.literal(ages), ff.literal(12), false,
            MatchAction.ANY);
    System.out.println("Any: " + filter.evaluate(null)); // prints Any: true
    // matchActionAny end
}
 
开发者ID:ianturton,项目名称:geotools-cookbook,代码行数:12,代码来源:FilterExamples.java

示例5: matchActionAll

import org.opengis.filter.FilterFactory2; //导入方法依赖的package包/类
public void matchActionAll() {
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;
    // matchActionAll start
    List<Integer> ages = Arrays.asList(new Integer[] { 7, 8, 10, 15 });

    filter = ff.greater(ff.literal(ages), ff.literal(12), false,
            MatchAction.ALL);
    System.out.println("All: " + filter.evaluate(null)); // prints All: false
    // matchActionAll end
}
 
开发者ID:ianturton,项目名称:geotools-cookbook,代码行数:12,代码来源:FilterExamples.java

示例6: matchActionOne

import org.opengis.filter.FilterFactory2; //导入方法依赖的package包/类
public void matchActionOne() {
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;
    // matchActionOne start
    List<Integer> ages = Arrays.asList(new Integer[] { 7, 8, 10, 15 });

    filter = ff.greater(ff.literal(ages), ff.literal(12), false,
            MatchAction.ONE);
    System.out.println("One: " + filter.evaluate(null)); // prints One: true
    // matchActionOne end
}
 
开发者ID:ianturton,项目名称:geotools-cookbook,代码行数:12,代码来源:FilterExamples.java


注:本文中的org.opengis.filter.FilterFactory2.greater方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。