protected Configuration createConfiguration() { return new OGCConfiguration(); } }
/** * Creates a new configuration. * * @generated */ public WFSConfiguration_1_0() { super(WFS.getInstance()); addDependency(new OGCConfiguration()); }
/** Adds a dependency on {@link OGCConfiguration} */ public SLDConfiguration() { super(SLD.getInstance()); addDependency(new OGCConfiguration()); }
Configuration config(SldTransformContext context) { if (context.version().equals(SldTransformContext.V_110)) { return new org.geotools.filter.v1_1.OGCConfiguration(); } else { return new org.geotools.filter.v1_0.OGCConfiguration(); } } }
protected void setUp() throws Exception { super.setUp(); Configuration configuration = new OGCConfiguration(); parser = new Parser(configuration); }
public void testLax() throws Exception { String xml = "<Filter>" + " <PropertyIsEqualTo>" + " <PropertyName>foo</PropertyName>" + " <Literal>bar</Literal>" + " </PropertyIsEqualTo>" + "</Filter>"; Parser parser = new Parser(new OGCConfiguration()); parser.setStrict(false); Filter filter = (Filter) parser.parse(new ByteArrayInputStream(xml.getBytes())); assertNotNull(filter); }
public void testBackwardLikeFilter() throws Exception { String f = "<ogc:Filter xmlns:ogc=\"http://www.opengis.net/ogc\"><ogc:PropertyIsLike wildCard=\"*\" singleChar=\"#\" escapeChar=\"!\">\n" + "<ogc:Literal>M*</ogc:Literal>\n" + "<ogc:PropertyName>gml:name</ogc:PropertyName>\n" + "</ogc:PropertyIsLike></ogc:Filter>"; Configuration configuration = new org.geotools.filter.v1_0.OGCConfiguration(); Parser parser = new Parser(configuration); Filter filter = (Filter) parser.parse(new ByteArrayInputStream(f.getBytes())); Document doc = encode(filter, OGC.Filter); // print(doc); assertEquals( 1, doc.getDocumentElement() .getElementsByTagNameNS(OGC.NAMESPACE, OGC.PropertyName.getLocalPart()) .getLength()); assertEquals( 1, doc.getDocumentElement() .getElementsByTagNameNS(OGC.NAMESPACE, OGC.Literal.getLocalPart()) .getLength()); Element e = getElementByQName(doc, OGC.PropertyIsLike); assertEquals("*", e.getAttribute("wildCard")); assertEquals("#", e.getAttribute("singleChar")); assertEquals("!", e.getAttribute("escape")); }
public void testBackwardLikeFilterWithFunction() throws Exception { String f = "<ogc:Filter xmlns:ogc=\"http://www.opengis.net/ogc\"><ogc:PropertyIsLike wildCard=\"*\" singleChar=\"#\" escapeChar=\"!\">\n" + "<ogc:Literal>M*</ogc:Literal>\n" + "<ogc:Function name=\"strToLowerCase\"><ogc:PropertyName>gml:name</ogc:PropertyName></ogc:Function>\n" + "</ogc:PropertyIsLike></ogc:Filter>"; Configuration configuration = new org.geotools.filter.v1_0.OGCConfiguration(); Parser parser = new Parser(configuration); Filter filter = (Filter) parser.parse(new ByteArrayInputStream(f.getBytes())); Document doc = encode(filter, OGC.Filter); // print(doc); assertEquals( 1, doc.getDocumentElement() .getElementsByTagNameNS(OGC.NAMESPACE, OGC.PropertyName.getLocalPart()) .getLength()); assertEquals( 1, doc.getDocumentElement() .getElementsByTagNameNS(OGC.NAMESPACE, OGC.Literal.getLocalPart()) .getLength()); Element e = getElementByQName(doc, OGC.PropertyIsLike); assertEquals("*", e.getAttribute("wildCard")); assertEquals("#", e.getAttribute("singleChar")); assertEquals("!", e.getAttribute("escape")); } }
public Filter10() { super(Filter.class, "text/xml; subtype=filter/1.0", OGC.Filter); xml = new OGCConfiguration(); } }
public Filter10() { super(Filter.class, "text/xml; subtype=filter/1.0", OGC.Filter); xml = new OGCConfiguration(); } }
/** * Provides the 1.0 filter configuration for the superclass to perform the parameter parsing. */ @Override protected Configuration getParserConfiguration() { return new org.geotools.filter.v1_0.OGCConfiguration(); } }
public void testLiteralWithEntity() throws Exception { String xml = "<Filter>" + " <PropertyIsEqualTo>" + " <PropertyName>foo</PropertyName>" + " <Literal>bar > 10 and < 20</Literal>" + " </PropertyIsEqualTo>" + "</Filter>"; Parser parser = new Parser(new OGCConfiguration()); parser.setStrict(false); Filter filter = (Filter) parser.parse(new ByteArrayInputStream(xml.getBytes())); assertNotNull(filter); PropertyIsEqualTo equal = (PropertyIsEqualTo) filter; PropertyName pn = (PropertyName) equal.getExpression1(); assertEquals("foo", pn.getPropertyName()); Literal literal = (Literal) equal.getExpression2(); assertEquals("bar > 10 and < 20", literal.getValue()); }
+ "</Filter>"; OGCConfiguration configuration = new OGCConfiguration(); configuration.getProperties().add(Properties.IGNORE_SCHEMA_LOCATION);
/** * Adds a dependency on {@link OGCConfiguration} */ public SLDConfiguration() { super(SLD.getInstance()); addDependency(new OGCConfiguration()); }
/** * Creates a new configuration. * * @generated */ public WFSConfiguration() { super(WFS.getInstance()); addDependency(new OGCConfiguration()); }
/** * Adds a dependency on {@link OGCConfiguration} */ public SLDConfiguration() { super(SLD.getInstance()); addDependency(new OGCConfiguration()); }
Configuration config(SldTransformContext context) { if (context.version().equals(SldTransformContext.V_110)) { return new org.geotools.filter.v1_1.OGCConfiguration(); } else { return new org.geotools.filter.v1_0.OGCConfiguration(); } } }
Configuration configuration = new OGCConfiguration(); Parser parser_1_0_0 = new Parser(configuration); parser_1_0_0.setEntityResolver(resolverProvider.getEntityResolver());
addDependency(new OGCConfiguration()); addDependency(new GMLConfiguration());