FeatureSource fs = ds.getFeatureSource(featureTypeNames[i]);
FeatureTypeInfo ftinfo = null;
if ( add ) {
//auto configure the feature type as well
ftinfo = builder.buildFeatureType(fs);
builder.lookupSRS(ftinfo, true);
builder.setupBounds(ftinfo);
}
else {
ftinfo = catalog.getFeatureTypeByName( namespace.getPrefix(), featureTypeNames[i] );
}