private boolean workspaceValid(String workspaceName){
  if (isDefaultWorkspace(workspaceName)) {
    return true;
  }
  return Pattern.matches("\\w+",workspaceName);
}

private boolean workspaceValid ( String workspaceName ) { if ( isDefaultWorkspace ( workspaceName ) ) { return true ; } return Pattern . matches ( "\\w+" , workspaceName ) ; }
check if workspace name is valid , e . g can ' t contain spaces .
