Package org.opengis.feature

Examples of org.opengis.feature.FeatureVisitor


        assertEquals(sorted, values);
    }

    private List<String> collectElement(FeatureCollection records, final String property) throws IOException {
        final List<String> values = new ArrayList<String>();
        records.accepts(new FeatureVisitor() {
           
            @Override
            public void visit(Feature feature) {
                ComplexAttribute ca = (ComplexAttribute) feature.getProperty(property);
                String value = (String) ca.getProperty("value").getValue();
View Full Code Here


        FeatureCollection records = store.getRecords(query, Transaction.AUTO_COMMIT);   
        assertEquals(3, records.size());
       
        // check the properties and collect their identifier
        final List<String> values = new ArrayList<String>();
        records.accepts(new FeatureVisitor() {
           
            @Override
            public void visit(Feature feature) {
                // has the id
                ComplexAttribute id = (ComplexAttribute) feature.getProperty("identifier");
View Full Code Here

        private void encodeRecords(final CSWRecordsResult response) {
            // encode the records
            if(response.getRecords() != null) {
                try {
                    response.getRecords().accepts(new FeatureVisitor() {
     
                        @Override
                        public void visit(Feature feature) {
                            encode(response, feature);
                        }
View Full Code Here

       
        q.setProperties(Arrays.asList(translateProperty(rd, attributeName)));
       
        // collect the values without duplicates
        final Set<String> values = new HashSet<String>();
        getRecords(q, Transaction.AUTO_COMMIT, rd.getOutputSchema()).accepts(new FeatureVisitor() {
           
            @Override
            public void visit(Feature feature) {
                Property prop = (Property) property.evaluate(feature);
                if (prop != null)
View Full Code Here

TOP

Related Classes of org.opengis.feature.FeatureVisitor

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.