org.opengis.filter.FilterFactory2.isNil()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.opengis.filter.FilterFactory2.isNil()方法的一些代码示例,展示了FilterFactory2.isNil()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FilterFactory2.isNil()方法的具体详情如下:
包路径:org.opengis.filter.FilterFactory2
类名称:FilterFactory2
方法名:isNil

FilterFactory2.isNil介绍

暂无

代码示例

代码示例来源:origin: geotools/geotools

public Object visit(PropertyIsNil filter, Object extraData) {
  Expression expr = visit(filter.getExpression(), extraData);
  return getFactory(extraData).isNil(expr, filter.getNilReason());
}

代码示例来源:origin: geotools/geotools

@Test
  public void testAndIsNil() throws Exception {
    final Filter f =
        ff.and(
            ff.bbox("geom", -10, -10, 10, 10, null),
            ff.isNil(ff.literal("someDate"), null));
    final Envelope env = (Envelope) f.accept(visitor, null);
    assertEquals(new Envelope(-10, 10, -10, 10), env);
  }
}

代码示例来源:origin: org.geotools/gt-main

public Object visit(PropertyIsNil filter, Object extraData) {
  Expression expr = visit(filter.getExpression(), extraData);
  return getFactory(extraData).isNil(expr, filter.getNilReason());
}

代码示例来源:origin: org.locationtech.geogig/geogig-datastore

@Test
public void propertyIsNilFilter() throws Exception {
  PropertyIsNil filter;
  filter = ff.isNil(ff.property("nullprop"), "notAvail");
  assertFullySupported(filter);
  filter = ff.isNil(ff.property("string"), "notAvail");
  assertFullySupported(filter);
  filter = ff.isNil(ff.property("nonMaterializedAttribute"), "notAvail");
  assertFullyUnsupported(filter);
}

代码示例来源:origin: locationtech/geogig

@Test
public void propertyIsNilFilter() throws Exception {
  PropertyIsNil filter;
  filter = ff.isNil(ff.property("nullprop"), "notAvail");
  assertFullySupported(filter);
  filter = ff.isNil(ff.property("string"), "notAvail");
  assertFullySupported(filter);
  filter = ff.isNil(ff.property("nonMaterializedAttribute"), "notAvail");
  assertFullyUnsupported(filter);
}

代码示例来源:origin: locationtech/geogig

@Test
public void nilFilter() throws Exception {
  PropertyIsNil filter;
  filter = ff.isNil(ff.property("string"), "not avail");
  assertFullySupported(filter);
  filter = ff.isNil(ff.property("nonmaterialized"), "not avail");
  assertFullyUnsupported(filter);
}

代码示例来源:origin: org.locationtech.geogig/geogig-datastore

@Test
public void nilFilter() throws Exception {
  PropertyIsNil filter;
  filter = ff.isNil(ff.property("string"), "not avail");
  assertFullySupported(filter);
  filter = ff.isNil(ff.property("nonmaterialized"), "not avail");
  assertFullyUnsupported(filter);
}

代码示例来源:origin: org.locationtech.geogig/geogig-datastore

@Test
public void propertyIsNilFilter() throws Exception {
  PropertyIsNil filter = ff.isNil(ff.property("nullprop"), "notAvail");
  Predicate<Bounded> predicate = preFilter(filter);
  assertFalse(isAcceptEverything(predicate)); // verify its not just passing everything
  assertTrue(predicate.apply(testNode));
  assertTrue(predicate.apply(testNodeRef));
  assertTrue(predicate.apply(testBucket));
  filter = ff.isNil(ff.property("string"), "notAvail");
  predicate = preFilter(filter);
  assertFalse(predicate.apply(testNode));
  assertFalse(predicate.apply(testNodeRef));
  assertTrue(predicate.apply(testBucket));
  // if the property being tested is not materialized, pre-filter evaluates to true, in order
  // for the post-filtering to proceed
  filter = ff.isNil(ff.property("nonMaterializedAttribute"), "notAvail");
  predicate = preFilter(filter);
  assertTrue(isAcceptEverything(predicate));
  assertTrue(predicate.apply(testNode));
  assertTrue(predicate.apply(testNodeRef));
}

代码示例来源:origin: locationtech/geogig

@Test
public void propertyIsNilFilter() throws Exception {
  PropertyIsNil filter = ff.isNil(ff.property("nullprop"), "notAvail");
  PreFilter predicate = preFilter(filter);
  assertFalse(isAcceptEverything(predicate)); // verify its not just passing everything
  assertTrue(predicate.apply(testNode));
  assertTrue(predicate.apply(testNodeRef));
  assertTrue(predicate.apply(testBucket));
  filter = ff.isNil(ff.property("string"), "notAvail");
  predicate = preFilter(filter);
  assertFalse(predicate.apply(testNode));
  assertFalse(predicate.apply(testNodeRef));
  assertTrue(predicate.apply(testBucket));
  // if the property being tested is not materialized, pre-filter evaluates to true, in order
  // for the post-filtering to proceed
  filter = ff.isNil(ff.property("nonMaterializedAttribute"), "notAvail");
  predicate = preFilter(filter);
  assertTrue(isAcceptEverything(predicate));
  assertTrue(predicate.apply(testNode));
  assertTrue(predicate.apply(testNodeRef));
}

相关文章