Package org.geotools.filter

Examples of org.geotools.filter.FilterFactoryImplNamespaceAware


            namespaces.declarePrefix("gml", GMLNS);
            namespaces.declarePrefix("sa", SANS);
            namespaces.declarePrefix("cv", CVNS);
            // TODO: use commonfactoryfinder or the mechanism choosed
            // to pass namespace context to filter factory
            ffac = new FilterFactoryImplNamespaceAware(namespaces);
        }

        final String phenomNamePath = "aw:relatedObservation/aw:PhenomenonTimeSeries/om:observedProperty/swe:Phenomenon/gml:name";
        FeatureIterator it = features.features();
        for (; it.hasNext();) {
View Full Code Here


    public FeatureChainingTest() {
        namespaces.declarePrefix("gml", GMLNS);
        namespaces.declarePrefix("gsml", GSMLNS);
        namespaces.declarePrefix("xlink", XLINKNS);
        ff = new FilterFactoryImplNamespaceAware(namespaces);
    }
View Full Code Here

    private NamespaceSupport namespaces = new NamespaceSupport();

    public PolymorphicChainingTest() {
        namespaces.declarePrefix("ex", EX_NS);
        ff = new FilterFactoryImplNamespaceAware(namespaces);
    }
View Full Code Here

    private void setFilterFactory() {
        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("gsml", FeatureChainingTest.GSMLNS);
        namespaces.declarePrefix("gml", FeatureChainingTest.GMLNS);
        ff = new FilterFactoryImplNamespaceAware(namespaces);
    }
View Full Code Here

         * Set up filter factory
         */
        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("gsml", GSMLNS);
        namespaces.declarePrefix("gml", GMLNS);
        ff = new FilterFactoryImplNamespaceAware(namespaces);
       
        /**
         * Load mapped feature data access
         */       
        Map<String, Serializable> dsParams = new HashMap<String, Serializable>();
View Full Code Here

     */
    private void setFilterFactory() {
        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("gsml", FeatureChainingTest.GSMLNS);
        namespaces.declarePrefix("gml", FeatureChainingTest.GMLNS);
        ff = new FilterFactoryImplNamespaceAware(namespaces);
    }
View Full Code Here

        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("gml", GML.NAMESPACE);
        namespaces.declarePrefix("xmml", XMMLNS);
        namespaces.declarePrefix("xlink", XLINK.NAMESPACE);

        FilterFactory2 ff = new FilterFactoryImplNamespaceAware(namespaces);
        String xpathExpression = "sa:shape/geo:LineByVector/geo:origin/@xlink:href";
        PropertyName propNameExpression = ff.property(xpathExpression);

        visitor = new UnmappingFilterVisitor(mapping);

        List /* <Expression> */unrolled = (List) propNameExpression.accept(visitor, null);
        assertNotNull(unrolled);
View Full Code Here

        namespaces.declarePrefix("gml", GML.NAMESPACE);
        namespaces.declarePrefix("xmml", XMMLNS);
        namespaces.declarePrefix("xlink", XLINK.NAMESPACE);

        visitor = new UnmappingFilterVisitor(mapping);
        FilterFactory2 ff = new FilterFactoryImplNamespaceAware(namespaces);

        String xpathExpression = "@gml:id";
        PropertyName propNameExpression = ff.property(xpathExpression);

        List /* <Expression> */unrolled = (List) propNameExpression.accept(visitor, null);
        assertNotNull(unrolled);
        assertEquals(1, unrolled.size());
        assertTrue(unrolled.get(0) instanceof Expression);
        assertEquals(((Expression) unrolled.get(0)).toString(), "strConcat([bh.], [BGS_ID])");

        xpathExpression = "/@gml:id";
        propNameExpression = ff.property(xpathExpression);

        unrolled = (List) propNameExpression.accept(visitor, null);
        assertNotNull(unrolled);
        assertEquals(1, unrolled.size());
        assertTrue(unrolled.get(0) instanceof Expression);
        assertEquals(((Expression) unrolled.get(0)).toString(), "strConcat([bh.], [BGS_ID])");

        xpathExpression = "xmml:Borehole/@gml:id";
        propNameExpression = ff.property(xpathExpression);

        unrolled = (List) propNameExpression.accept(visitor, null);
        assertNotNull(unrolled);
        assertEquals(1, unrolled.size());
        assertTrue(unrolled.get(0) instanceof Expression);
View Full Code Here

        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("gml", GML.NAMESPACE);
        namespaces.declarePrefix("xmml", XMMLNS);

        FilterFactory2 ff = new FilterFactoryImplNamespaceAware(namespaces);
        PropertyIsEqualTo complexFilter = ff.equals(ff.property("gml:name"), ff
                .literal("SWADLINCOTE"));

        visitor = new UnmappingFilterVisitor(mapping);

        Filter unrolled = (Filter) complexFilter.accept(visitor, null);
View Full Code Here

        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("sa", SANS);
        namespaces.declarePrefix("geo", GEONS);
        namespaces.declarePrefix("xlink", XLINK.NAMESPACE);

        final FilterFactory2 ff = new FilterFactoryImplNamespaceAware(namespaces);
        final PropertyName propertyName = ff.property(queryProperty);
        final Literal literal = ff.literal(queryLiteral);

        final Filter filter = ff.equals(propertyName, literal);

        FeatureCollection<FeatureType, Feature> features = (FeatureCollection<FeatureType, Feature>) fSource
                .getFeatures(filter);

        // did the query work?
View Full Code Here

TOP

Related Classes of org.geotools.filter.FilterFactoryImplNamespaceAware

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.