DataAccess da = null;
try {
NamespaceInfo namespace = catalog.getNamespaceByPrefix(storeInfo.getWorkspace().getName());
// prepare
CatalogBuilder builder = new CatalogBuilder(catalog);
da = storeInfo.getDataStore(null);
StyleGenerator styles = new StyleGenerator(catalog);
// cast necessary due to some classpath oddity/geoapi issue, the compiler
// complained about getNames() returning a List<Object>...
List<Name> names = da.getNames();
summary.setTotalLayers(names.size());
for (Name name : names) {
// start information
String layerName = name.getLocalPart();
summary.newLayer(layerName);
LayerInfo layer = null;
try {
builder.setStore(storeInfo);
FeatureTypeInfo featureType = builder.buildFeatureType(name);
builder.lookupSRS(featureType, true);
builder.setupBounds(featureType);
layer = builder.buildLayer(featureType);
layer.setDefaultStyle(styles.getStyle(featureType));
ImportStatus status = SUCCESS;
if(cancelled)
return;