Package org.opengis.filter

Examples of org.opengis.filter.Id


        JeevesJCS jcs = getJCSCache();
        processCachedFeatures(jcs, matches, docIndexLookup, bits);

        while (!matches.isEmpty()) {
          Id fidFilter;
          if(matches.size() > MAX_FIDS_PER_QUERY) {
            FeatureId[] subset = new FeatureId[MAX_FIDS_PER_QUERY];
            int i = 0;
            Iterator<FeatureId> iter = matches.iterator();
            while(iter.hasNext() && i < MAX_FIDS_PER_QUERY) {
View Full Code Here


        // add features circumventing FeatureStore.addFeatures to keep the test
        // independent of the addFeatures functionality
        insertAndAdd(lines1, lines2, lines3, points1, points2, points3);
        geogig.command(CommitOp.class).call();

        Id filter = ff.id(Collections.singleton(ff.featureId(idP1)));
        Transaction tx = new DefaultTransaction();
        points.setTransaction(tx);
        try {
            // initial value
            SimpleFeature initial = points.getFeatures(filter).features().next();
View Full Code Here

        // addFeatures functionality
        insertAndAdd(lines1, lines2, lines3);
        insertAndAdd(points1, points2, points3);
        geogig.command(CommitOp.class).call();

        Id filter = ff.id(Collections.singleton(ff.featureId(idP1)));
        Transaction tx = new DefaultTransaction();
        points.setTransaction(tx);
        try {
            // initial # of features
            assertEquals(3, points.getFeatures().size());
View Full Code Here

                    boolean isOnlyFids = true;
                    for (int i = 0; i < value.length; i++) {
                        org.opengis.filter.Filter value2 = (org.opengis.filter.Filter) value[i].getValue();
                        if( value2 == Filter.EXCLUDE) continue;
                        if( value2 instanceof Id){
                            Id idFilter = (Id) value2;
                            ids.addAll( idFilter.getIdentifiers() );
                        }
                        else {
                            isOnlyFids = false;
                        }                       
                        filters.add( value2 );
View Full Code Here

            Map hints) throws IOException{
            if (!canEncode(element, value, hints)) {
                return;
            }

            Id ff = (Id) value;
            Set<String> fids = (Set) ff.getIDs();
           
            AttributesImpl att = new AttributesImpl();
            att.addAttribute(null, null, null, null, null);
           
            output.startElement(element.getNamespace(), "Filter", null);
View Full Code Here

            }
        }

        reader.close();

        Id filter = ff.id(new HashSet<FeatureId>(fids));

        SimpleFeatureSource source = ds.getFeatureSource(typeName);
        Query query = new Query(typeName, filter);
        SimpleFeatureCollection results = source.getFeatures(query);
View Full Code Here

        int x = 1000;
        while (fids.size() < numFids) {
            fids.add(ff.featureId(idTemplate + x++));
        }

        Id filter = ff.id(fids);

        SimpleFeatureSource source = ds.getFeatureSource(typeName);
        Query query = new Query(typeName, filter);
        SimpleFeatureCollection results = source.getFeatures(query);
View Full Code Here

        assertEquals("single event on transaction2", 1, listener1.list.size());
        assertEquals("no events on AUTO_COMMIT", 0, listener2.list.size());

        FeatureEvent e = listener1.list.get(0);
        assertEquals(featureStore1, e.getFeatureSource());
        Id id = (Id) e.getFilter();
        assertNotNull(id);
        assertNotNull(id.getIDs());
        assertTrue(id.getIDs().contains(featureId));
        ReferencedEnvelope bounds = e.getBounds();
        assertFalse(bounds.isEmpty());
        assertFalse(bounds.isNull());

        t1.commit();
View Full Code Here

        List<FeatureId> newFids = featureStore1.addFeatures(newFeatures);
        assertEquals(0, listener.list.size());
        assertEquals(1, listener1.list.size());

        FeatureEvent e = listener1.list.get(0);
        Id id = (Id) e.getFilter();
        assertTrue(id.getIdentifiers().containsAll(newFids));
        // remember the FeatureId with a strong reference
        FeatureId tempFeatureId = (FeatureId) id.getIdentifiers().iterator().next();
        assertTrue(newFids.contains(tempFeatureId));

        t1.commit();
        assertEquals(1, listener.list.size());
        assertEquals(2, listener1.list.size());

        BatchFeatureEvent batch = (BatchFeatureEvent) listener1.list.get(2);
        assertFalse("confirm tempFid is not in the commit",
                id.getIdentifiers().contains(tempFeatureId));
        assertNotNull(batch.getFilter());

        FeatureId featureId = (FeatureId) batch.getCreatedFeatureIds().iterator().next();
        assertSame("confirm temp feature Id was updated", tempFeatureId, featureId);
    }
View Full Code Here

            final Set<FeatureId> fids = new HashSet<FeatureId>();
            for (FeatureId fid : addedFids) {
                fids.add(fid);
            }
            final Id newFidsFilter = ff.id(fids);

            SimpleFeatureCollection features;
            features = fStore.getFeatures(newFidsFilter);
            assertEquals(2, features.size());
            transaction.commit();
View Full Code Here

TOP

Related Classes of org.opengis.filter.Id

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.