本文整理汇总了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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}