String wsName = (String) WORKSPACE.getModel(itemModel).getObject();
IModel storeNameModel = NAME.getModel(itemModel);
String storeName = (String) storeNameModel.getObject();
StoreInfo store = getCatalog().getStoreByName(wsName, storeName, StoreInfo.class);
if(store instanceof DataStoreInfo) {
return new SimpleBookmarkableLink(id, DataAccessEditPage.class, storeNameModel,
DataAccessEditPage.STORE_NAME, storeName,
DataAccessEditPage.WS_NAME, wsName);
} else if(store instanceof CoverageStoreInfo){
return new SimpleBookmarkableLink(id, CoverageStoreEditPage.class, storeNameModel,
DataAccessEditPage.STORE_NAME, storeName,
DataAccessEditPage.WS_NAME, wsName);
} else if(store instanceof WMSStoreInfo){
return new SimpleBookmarkableLink(id, WMSStoreEditPage.class, storeNameModel,
DataAccessEditPage.STORE_NAME, storeName,
DataAccessEditPage.WS_NAME, wsName);
} else {
throw new RuntimeException("Don't know what to do with this store " + store);
}