Package org.opengis.filter.identity

Examples of org.opengis.filter.identity.FeatureId


        int versionSeparatorIdx = rid.indexOf(FeatureId.VERSION_SEPARATOR);
        if (-1 != versionSeparatorIdx) {
            fid = rid.substring(0, versionSeparatorIdx);
            featureVersion = rid.substring(versionSeparatorIdx + 1);
        }
        FeatureId featureId = ff.featureId(fid, featureVersion);
        return featureId;
    }
View Full Code Here


                return Filter.EXCLUDE;
            }
            String fid = feature.getID();
            if( fid != null ){
                FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
                FeatureId identifier = ff.featureId( fid );
                HashSet<FeatureId> fids = new HashSet<FeatureId>();
                fids.add( identifier );               
                Filter filter = ff.id( fids );
        
                return filter;
View Full Code Here

SimpleFeatureCollection grabSelectedIds(Set<String> selection) throws IOException {
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
   
    Set<FeatureId> fids = new HashSet<FeatureId>();
    for (String id : selection) {
        FeatureId fid = ff.featureId(id);
        fids.add(fid);
    }
    Filter filter = ff.id(fids);
    return featureSource.getFeatures(filter);
}
View Full Code Here

        assertEquals(6, features.size());

        FilterFactory ff = dataStore.getFilterFactory();

        for (Iterator f = fids.iterator(); f.hasNext();) {
            FeatureId identifier = (FeatureId) f.next();
            String fid = identifier.getID();
            Id filter = ff.id(Collections.singleton(identifier));

            features = featureStore.getFeatures(filter);
            assertEquals(1, features.size());
View Full Code Here

        assertEquals(6, features.size());

        FilterFactory ff = dataStore.getFilterFactory();

        for (Iterator f = fids.iterator(); f.hasNext();) {
            FeatureId identifier = (FeatureId) f.next();
            String fid = identifier.getID();
            Id filter = ff.id(Collections.singleton(identifier));

            features = featureStore.getFeatures(filter);
            assertEquals(1, features.size());
        }
View Full Code Here

     */
    public FeatureId buildFeatureID(IToken token) {

        String strId = removeQuotes(token.toString());

        FeatureId id = getFilterFactory().featureId(strId);

        return id;
    }
View Full Code Here

            int node = result.getNodeType();
            if (node != nodeFeatureId) {
                break;
            }
            FeatureId id = (FeatureId) result.getBuilt();
            idList.add(id);
            getResultStack().popResult();
        }
        assert idList.size() >= 1 : "must have one or more FeatureIds";
View Full Code Here

        SimpleFeatureCollection addCollection = DataUtilities.collection(chrisFeature);
        List<FeatureId> fids = roadAuto.addFeatures(addCollection);
       
        // checke the id was preserved
        assertEquals(1, fids.size());
        FeatureId fid = SimpleFeatureBuilder.createDefaultFeatureIdentifier("fid5");
        assertTrue(fids.contains(fid));
       
        // manually check the feature with the proper id is actually there
        SimpleFeatureIterator it = roadAuto.getFeatures(ff.id(Collections.singleton(fid))).features();
        assertTrue(it.hasNext());
View Full Code Here

    public Element AbstractFeatureTypeEncode(Object object, Document document, Element value,
            XSDIdRegistry idSet) {
        Feature feature = (Feature) object;
        String id = null;
        FeatureId identifier = feature.getIdentifier();
        if (identifier != null) {
            id = identifier.getRid();
        }
       
        Name typeName;
        if (feature.getDescriptor() == null) {
            // no descriptor, assume WFS feature type name is the same as the name of the content
View Full Code Here

     *
     * @throws Exception
     */
    public void testMultiLine() throws Exception {
        SimpleFeatureSource road = storeMultiline.getFeatureSource( "multiline" );
        FeatureId fid1 = ff.featureId("fid1");
        Filter select = ff.id( Collections.singleton(fid1));
        SimpleFeatureCollection featureCollection = road.getFeatures( select );
        featureCollection.accepts(new FeatureVisitor() {
            public void visit(Feature f) {
                SimpleFeature feature = (SimpleFeature) f;
View Full Code Here

TOP

Related Classes of org.opengis.filter.identity.FeatureId

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.