Package org.geomajas.sld.filter

Examples of org.geomajas.sld.filter.FilterTypeInfo


    Assert.assertEquals(2, sldService.findAll().size());
  }

  @Test
  public void testValidate() throws SldException {
    FilterTypeInfo filter = new FilterTypeInfo();
    sldService.validate(filter);
  }
View Full Code Here


        for (org.geomajas.sld.NamedLayerInfo.ChoiceInfo choice2 : layer.getChoiceList()) {
          if (choice2.ifUserStyle()) {
            UserStyleInfo userStyle = choice2.getUserStyle();
            FeatureTypeStyleInfo style = userStyle.getFeatureTypeStyleList().get(0);
            RuleInfo rule = style.getRuleList().get(0);
            FilterTypeInfo filter = rule.getChoice().getFilter();
          }
        }
      }
    }
  }
View Full Code Here

  @Test
  public void testRead() throws JiBXException {
    IBindingFactory bfact = BindingDirectory.getFactory(StyledLayerDescriptorInfo.class);
    IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
    Object object = uctx.unmarshalDocument(getClass().getResourceAsStream("samples/filter/property_is_equal.xml"), null);
    FilterTypeInfo filter = (FilterTypeInfo) object;
    Assert.assertTrue(filter.ifComparisonOps());
    Assert.assertTrue(filter.getComparisonOps() instanceof PropertyIsEqualToInfo);
    PropertyIsEqualToInfo p = (PropertyIsEqualToInfo) filter.getComparisonOps();
    Assert.assertEquals(2, p.getExpressionList().size());
    ExpressionInfo left = p.getExpressionList().get(0);
    ExpressionInfo right = p.getExpressionList().get(1);
    Assert.assertTrue(left instanceof PropertyNameInfo);
    Assert.assertTrue(right instanceof LiteralTypeInfo);
View Full Code Here

TOP

Related Classes of org.geomajas.sld.filter.FilterTypeInfo

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.