protected Configuration createConfiguration() { return new OGCConfiguration(); } }
/** Adds a dependency on {@link GMLConfiguration} */ public OGCConfiguration() { super(OGC.getInstance()); addDependency(new GMLConfiguration()); }
@Override protected void registerBindings(MutablePicoContainer container) { super.registerBindings(container); // override the binding for GML.BoxType to use the one producing an output Ionic // understands container.registerComponentImplementation( GML.BoxType, IonicGML2BoxTypeBinding.class); } };
+ "</Filter>"; OGCConfiguration configuration = new OGCConfiguration(); configuration.getProperties().add(Properties.IGNORE_SCHEMA_LOCATION);
/** * @return the filter.xsd file of the schema. */ public String getSchemaFileURL() { return getSchemaLocationResolver() .resolveSchemaLocation(null, getNamespaceURI(), "filter.xsd"); }
/** * Creates a new configuration. * * @generated */ public WFSConfiguration_1_0() { super(WFS.getInstance()); addDependency(new OGCConfiguration()); }
/** * Adds a dependency on {@link GMLConfiguration} */ public OGCConfiguration() { super(); addDependency(new GMLConfiguration()); }
@Override protected void registerBindings(MutablePicoContainer container) { super.registerBindings(container); // override the binding for GML.BoxType to use the one producing an output Ionic // understands container.registerComponentImplementation(GML.BoxType, IonicGML2BoxTypeBinding.class); } };
/** Adds a dependency on {@link OGCConfiguration} */ public SLDConfiguration() { super(SLD.getInstance()); addDependency(new OGCConfiguration()); }
/** * Adds a dependency on {@link GMLConfiguration} */ public OGCConfiguration() { super(OGC.getInstance()); addDependency(new GMLConfiguration()); }
@Override protected void registerBindings(MutablePicoContainer container) { super.registerBindings(container); // override the binding for GML.BoxType to use the one producing an output Ionic // understands container.registerComponentImplementation( GML.BoxType, IonicGML2BoxTypeBinding.class); } };
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()); }