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();