Package org.geotools.data.wfs.internal.TransactionRequest

Examples of org.geotools.data.wfs.internal.TransactionRequest.Insert


        final SimpleFeatureType remoteType = dataStore.getRemoteSimpleFeatureType(remoteTypeName);

        // Create a single insert element with all the inserts for this type
        final Map<String, SimpleFeature> added = diff.getAdded();
        if (added.size() > 0) {
            Insert insert = transactionRequest.createInsert(remoteTypeName);

            SimpleFeatureBuilder builder = new SimpleFeatureBuilder(remoteType);
            for (String fid : diff.getAddedOrder()) {
                if (ignored.contains(fid)) {
                    continue;
                }
                SimpleFeature localFeature = added.get(fid);
                MutableFeatureId addedFid = (MutableFeatureId) localFeature.getIdentifier();
                addedFeatureIds.add(addedFid);

                SimpleFeature remoteFeature = SimpleFeatureBuilder.retype(localFeature, builder);

                insert.add(remoteFeature);
            }
            transactionRequest.add(insert);
        }

        final Map<String, SimpleFeature> modified = diff.getModified();
View Full Code Here

TOP

Related Classes of org.geotools.data.wfs.internal.TransactionRequest.Insert

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.