return getAttribute( "workspace") == null;
}
@Override
protected String handleObjectPost(Object object) throws Exception {
WorkspaceInfo workspace = (WorkspaceInfo) object;
catalog.add( workspace );
//create a namespace corresponding to the workspace if one does not
// already exist
NamespaceInfo namespace = catalog.getNamespaceByPrefix( workspace.getName() );
if ( namespace == null ) {
LOGGER.fine( "Automatically creating namespace for workspace " + workspace.getName() );
namespace = catalog.getFactory().createNamespace();
namespace.setPrefix( workspace.getName() );
namespace.setURI( "http://" + workspace.getName() );
catalog.add( namespace );
}
LOGGER.info( "POST workspace " + workspace.getName() );
return workspace.getName();
}