public class DefaultDatabaseWorkspaceManager extends AbstractSymbolTable implements DatabaseWorkspaceManager
DatabaseWorkspaceManager.DatabaseWorkspaceListenerfunctionAlias, functions, symbolTables, varsCONFIG_CAN_ANONYMOUS_USER_WRITE_IN_THE_TABLES, CONFIG_NAME_STORESREPOSITORYID, CONFIG_NAME_STORESREPOSITORYLABEL, FIELD_CONFIGURATION_NAME, FIELD_CONFIGURATION_VALUE, FIELD_REPOSITORY_EXTRA, FIELD_REPOSITORY_FLAGS, FIELD_REPOSITORY_NAME, FIELD_REPOSITORY_PARAMETERS, FIELD_RESOURCES_NAME, FIELD_RESOURCES_RESOURCE, TABLE_CONFIGURATION, TABLE_CONFIGURATION_NAME, TABLE_REPOSITORY, TABLE_REPOSITORY_NAME, TABLE_RESOURCES, TABLE_RESOURCES_NAME| Constructor and Description |
|---|
DefaultDatabaseWorkspaceManager(DataServerExplorerParameters serverParameters) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAnonymousUserWriteInTheTables() |
void |
connect() |
boolean |
contains(DataStoreParameters parameters) |
void |
create(java.lang.String id,
java.lang.String description)
Create and initialize the tables associated with a gvSIG workspace.
|
void |
createTable(int tableid)
Create the configuration table indicated in the workspace.
|
void |
createTableRepository(java.lang.String tableName) |
void |
createTableResources(java.lang.String tableName) |
void |
disconnect() |
void |
drop() |
void |
dropTable(int tableid)
Remove the indicated configuration table from the workspace.
|
boolean |
exists(java.lang.String name) |
boolean |
existsTable(int tableid)
Check if the indicated configuration table exists in the workspace.
|
void |
fix() |
java.lang.String |
get(java.lang.String name)
Gets the value of a configuration variable associated with
this work space.
|
ResourcesStorage |
getAlternativeResourcesStorage(java.lang.String tableName)
If the workspace has an alternate resource storage defined, return it.
|
java.io.File |
getBaseFolder() |
java.lang.String |
getId()
Returns the identifier of this workspace.
|
java.lang.String |
getLabel()
Returns the label of this workspace.
|
java.lang.String |
getLabelOrId() |
ResourcesStorage |
getResourcesStorage() |
DataServerExplorer |
getServerExplorer() |
DataServerExplorerParameters |
getServerExplorerParameters() |
StoresRepository |
getStoresRepository()
Gets the repository of data stores associated with this workspace.
|
FeatureStore |
getTable(int tableid)
Gets the data store associated with the indicated configuration table.
|
DataTransaction |
getTransaction() |
DatabaseWorkspaceManager |
getValue() |
java.io.File |
getWorkspaceFile() |
boolean |
hasAlternativeResourcesStorage() |
boolean |
isConnected() |
boolean |
isValid()
Returns true if the connection associated with this object refers
to a valid workspace.
|
boolean |
isValidStoresRepository()
Returns true if the connection associated with this object refers
to a valid workspace with a stores-repository.
|
java.util.Collection<java.lang.String> |
localvariables() |
boolean |
set(java.lang.String name,
java.lang.String value)
Assigns the indicated value to the configuration variable.
|
void |
setAlternativeResourcesStorage(java.lang.String resourcesPath) |
void |
setBaseFolder(java.io.File baseFolder) |
void |
setTransaction(DataTransaction transaction) |
java.lang.String |
toString() |
java.lang.Object |
value(java.lang.String name) |
boolean |
writeStoresRepositoryEntry(java.lang.String name,
DataStoreParameters parameters)
Add a new data store to the workspace.
|
boolean |
writeStoresRepositoryEntry(java.lang.String name,
DataStoreParameters parameters,
Bitmask flags) |
addFunction, addFunctions, addSymbolTable, clone, containsSymbolTable, fixSymbolTables, fixSymbolTables, function, functions, getFunctionAlias, getFunctions, getName, getSymbolTables, getVars, isSQLCompatible, iterator, localfunctions, removeFunction, removeSymbolTable, removeVar, setVar, variablesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisInternalTablelabeladdSymbolTable, clone, containsSymbolTable, function, functions, getName, isSQLCompatible, localfunctions, removeSymbolTable, variablescloneQuietly, cloneQuietlypublic DefaultDatabaseWorkspaceManager(DataServerExplorerParameters serverParameters)
public java.lang.String toString()
toString in interface LabeledValue<DatabaseWorkspaceManager>toString in class AbstractSymbolTablepublic java.lang.String getId()
DatabaseWorkspaceManagergetId in interface DatabaseWorkspaceManagerpublic java.lang.String getLabel()
DatabaseWorkspaceManagergetLabel in interface DatabaseWorkspaceManagergetLabel in interface LabeledValue<DatabaseWorkspaceManager>public DatabaseWorkspaceManager getValue()
getValue in interface LabeledValue<DatabaseWorkspaceManager>public boolean existsTable(int tableid)
DatabaseWorkspaceManagerexistsTable in interface DatabaseWorkspaceManagerpublic void createTable(int tableid)
DatabaseWorkspaceManagercreateTable in interface DatabaseWorkspaceManagertableid - identifier of the configuration table to create.public void dropTable(int tableid)
DatabaseWorkspaceManagerdropTable in interface DatabaseWorkspaceManagertableid - identifier of the configuration table to remove.public FeatureStore getTable(int tableid)
DatabaseWorkspaceManagergetTable in interface DatabaseWorkspaceManagertableid - identifier of the configuration table to get.public DataServerExplorer getServerExplorer()
getServerExplorer in interface DatabaseWorkspaceManagerpublic DataServerExplorerParameters getServerExplorerParameters()
getServerExplorerParameters in interface DatabaseWorkspaceManagerpublic void createTableResources(java.lang.String tableName)
throws java.lang.RuntimeException
createTableResources in interface DatabaseWorkspaceManagerjava.lang.RuntimeExceptionpublic void createTableRepository(java.lang.String tableName)
throws java.lang.RuntimeException
createTableRepository in interface DatabaseWorkspaceManagerjava.lang.RuntimeExceptionpublic java.lang.String get(java.lang.String name)
DatabaseWorkspaceManagerget in interface DatabaseWorkspaceManagerget in interface GetItemByKey<java.lang.String,java.lang.Object>get in class AbstractSymbolTablename - of the variable to consultpublic boolean set(java.lang.String name,
java.lang.String value)
DatabaseWorkspaceManagerset in interface DatabaseWorkspaceManagername - of the variable.value - value to set.public StoresRepository getStoresRepository()
DatabaseWorkspaceManagergetStoresRepository in interface DatabaseWorkspaceManagerpublic boolean contains(DataStoreParameters parameters)
public boolean canAnonymousUserWriteInTheTables()
canAnonymousUserWriteInTheTables in interface DatabaseWorkspaceManagerpublic java.io.File getBaseFolder()
getBaseFolder in interface DatabaseWorkspaceManagerpublic void setBaseFolder(java.io.File baseFolder)
setBaseFolder in interface DatabaseWorkspaceManagerpublic java.io.File getWorkspaceFile()
public boolean writeStoresRepositoryEntry(java.lang.String name,
DataStoreParameters parameters)
DatabaseWorkspaceManagerwriteStoresRepositoryEntry in interface DatabaseWorkspaceManagername - of the data store.parameters - to open the data store.public boolean writeStoresRepositoryEntry(java.lang.String name,
DataStoreParameters parameters,
Bitmask flags)
writeStoresRepositoryEntry in interface DatabaseWorkspaceManagerpublic boolean isValid()
DatabaseWorkspaceManagerisValid in interface DatabaseWorkspaceManagerpublic boolean isValidStoresRepository()
DatabaseWorkspaceManagerisValidStoresRepository in interface DatabaseWorkspaceManagerpublic ResourcesStorage getAlternativeResourcesStorage(java.lang.String tableName)
DatabaseWorkspaceManagergetAlternativeResourcesStorage in interface DatabaseWorkspaceManagerpublic boolean hasAlternativeResourcesStorage()
hasAlternativeResourcesStorage in interface DatabaseWorkspaceManagerpublic void setAlternativeResourcesStorage(java.lang.String resourcesPath)
setAlternativeResourcesStorage in interface DatabaseWorkspaceManagerpublic void drop()
drop in interface DatabaseWorkspaceManagerpublic void create(java.lang.String id,
java.lang.String description)
DatabaseWorkspaceManagercreate in interface DatabaseWorkspaceManagerid - of the workspacedescription - of the workspacepublic boolean exists(java.lang.String name)
exists in interface SymbolTableexists in class AbstractSymbolTablepublic java.lang.Object value(java.lang.String name)
value in interface SymbolTablevalue in class AbstractSymbolTablepublic java.util.Collection<java.lang.String> localvariables()
localvariables in interface SymbolTablelocalvariables in class AbstractSymbolTablepublic ResourcesStorage getResourcesStorage()
getResourcesStorage in interface DatabaseWorkspaceManagerpublic void fix()
public void connect()
connect in interface DatabaseWorkspaceManagerpublic void disconnect()
disconnect in interface DatabaseWorkspaceManagerpublic boolean isConnected()
isConnected in interface DatabaseWorkspaceManagerpublic java.lang.String getLabelOrId()
getLabelOrId in interface DatabaseWorkspaceManagerpublic void setTransaction(DataTransaction transaction)
setTransaction in interface SupportTransactionspublic DataTransaction getTransaction()
getTransaction in interface SupportTransactions