com.mizar.metadata.utils
Class GeorasterJPAUtils

java.lang.Object
  extended by com.mizar.metadata.utils.GeorasterJPAUtils

public class GeorasterJPAUtils
extends java.lang.Object


Field Summary
static int ORAERROR_GEORASTER_OBJECT_NULL
           
static int ORAERROR_GEORASTER_PERMISSION
           
static int ORAERROR_GEOTIFF_LIB_NOT_FOUND
           
static int ORAERROR_MOSAIC_FAILURE
           
static int ORAERROR_TABLE_ALREADY_EXISTS
           
static int ORAERROR_TABLE_NOT_FOUND
           
 
Constructor Summary
protected GeorasterJPAUtils()
           
 
Method Summary
static boolean copyTransportableTablespace(java.lang.String factoryTtsUri, java.lang.String warehouseTtsUri, java.lang.String tablespaceName)
          The method copies all files with names starting with tablespaceName from factoryTtsUri to warehoueTtsUri.
static boolean createDirectoryObject(JPAFacade facade, java.lang.String directoryObjectName, java.lang.String directory)
           
static boolean createGrantReadPermissions(JPAFacade facade, java.lang.String targetUser)
           
static boolean createIndex(JPAFacade facade, java.lang.String layername, java.lang.String tablespaceName, java.lang.String workTablespace)
           
static boolean createLayerTables(JPAFacade facade, java.lang.String layerName, java.lang.String tablespace, int srid, boolean secureFiles, boolean dropExisting)
           
static boolean createOrReplaceUserSdoMaps(JPAFacade facade, java.util.List<java.lang.String> themes, java.lang.String name)
           
static boolean createTablespace(JPAFacade facade, java.lang.String tablespaceName, java.lang.String location)
           
static boolean deletePermission(JPAFacade facade, java.lang.String user, java.lang.String path, java.lang.String action)
           
static boolean deleteReadPermissions(JPAFacade facade, java.lang.String user)
           
static boolean deleteWritePermissions(JPAFacade facade, java.lang.String user)
           
static boolean dropIndex(JPAFacade facade, java.lang.String layername)
           
static boolean dropLayer(JPAFacade facade, java.lang.String layerName)
           
static boolean dropLayer(JPAFacade facade, java.lang.String layerName, boolean extraordinary)
          Normally the user should call @{link GeorasterJPAUtils#dropLayer(JPAFacade,String) GeorasterJPAUtils.dropLayer(JPAFacade,String)}
static boolean dropTablespace(JPAFacade facade, java.lang.String tablespaceName)
           
static boolean dropTablespace(JPAFacade facade, java.lang.String tablespaceName, boolean includingContents, boolean includingDatafiles, boolean cascadeConstraints)
           
static boolean existsSdoCachedMap(JPAFacade facade, java.lang.String cachedMapName)
           
static boolean existsSdoMap(JPAFacade facade, java.lang.String layerName)
           
static boolean exportTransportableTablespace(JPAFacade facade, java.lang.String tablespaceName, java.lang.String directoryObjectName)
           
static java.util.List<java.lang.String> findFiles(java.lang.String folder, java.lang.String localRoot, java.lang.String targetRoot, java.lang.String ext, java.util.List<java.lang.String> loadedFiles)
          The method finds files of type ext on the machine running the application and returns them in a List excluding those files with names matching those in loadedFiles.
static java.lang.Long getGeorasterLayerSize(JPAFacade facade, java.lang.String rdtTableName)
           
static java.sql.SQLException getLastException()
           
static java.lang.String getLastExceptionMessage()
           
static java.util.List<java.lang.String> getLoadedFiles(JPAFacade facade, java.lang.String layer)
           
static int getPermissionPause()
           
static java.util.List<java.lang.Long> getPermissionSeq(JPAFacade facade, java.lang.String user, java.lang.String path, java.lang.String action)
           
static java.lang.Long getRasterId(JPAFacade facade, java.lang.String layerName)
           
static boolean grantReadPermissions(JPAFacade facade, java.lang.String user, java.lang.String absolutePath)
           
static boolean grantReadPermissions(JPAFacade facade, java.lang.String user, java.lang.String path, java.lang.String localRoot, java.lang.String targetRoot)
           
static boolean grantReadPermissionsExtant(JPAFacade facade)
           
static boolean grantReadWritePermissions(JPAFacade facade, java.lang.String user, java.lang.String absolutePath)
           
static boolean grantReadWritePermissions(JPAFacade facade, java.lang.String user, java.lang.String path, java.lang.String localRoot, java.lang.String targetRoot)
           
static boolean importTransportableTablespace(JPAFacade facade, java.lang.String tablespaceName, java.lang.String destinationDir)
           
static boolean insertSdoCachedMap(JPAFacade facade, java.lang.String mapName, java.lang.String templateName, double[] mbr, int srid, boolean deleteExisting)
           
static boolean insertSdoGeomMetadata(JPAFacade facade, java.lang.String tableName, java.lang.String columnName, java.util.List<SdoDimElement> dimInfo, int srid)
           
static boolean insertSdoGeomMetadataGeographic(JPAFacade facade, java.lang.String tableName, int srid)
           
static boolean insertSdoGeomMetadataGeographic(JPAFacade facade, java.lang.String tableName, java.lang.String columnName)
           
static boolean insertSdoGeomMetadataUTM(JPAFacade facade, java.lang.String tableName, int srid)
           
static boolean insertSdoMap(JPAFacade facade, java.lang.String layerName)
           
static boolean insertSdoTheme(JPAFacade facade, java.lang.String layerName, java.lang.Long rasterId)
           
static boolean insertSimpleSdoMap(JPAFacade facade, java.lang.String layerName, java.util.List<java.lang.String> themeNames, boolean deleteExisting)
          Creates a simple USER_SDO_MAP with multiple themes
static boolean insertSimpleSdoMap(JPAFacade facade, java.lang.String layerName, java.lang.String themeName, boolean deleteExisting)
          Creates a simple USER_SDO_MAP with just one theme
static boolean isGeorasterLayer(JPAFacade facade, java.lang.String tableName)
           
static boolean isTablespaceTransportable(JPAFacade facade, java.lang.String tablespaceName)
           
static boolean isTablespaceTransportableX(JPAFacade facade, java.lang.String tablespaceName)
           
static boolean loadGeoTiffFile(JPAFacade facade, java.lang.String fullFilePathName, java.lang.String rasterTable)
           
static boolean loadGeoTiffFile(JPAFacade facade, java.lang.String fullFilePathName, java.lang.String rasterTable, java.lang.String rdtTable, java.lang.String rasterName, java.lang.String storageParameters, java.lang.String sequenceName)
           
static boolean loadGeoTiffFileGdal(java.lang.String username, java.lang.String password, java.lang.String fullFilePathName, java.lang.String rasterTable, java.lang.String rdtTable, java.lang.String rasterName, java.lang.Integer blockSize, java.lang.Long rasterId)
           
static void main(java.lang.String[] args)
           
static boolean mosaicLayer(JPAFacade facade, java.lang.String rawTableName, java.lang.String layerName, java.lang.String mosaicTableName, java.lang.String sdoNumArray)
           
static boolean mosaicLayer(JPAFacade facade, java.lang.String rawTableName, java.lang.String layerName, java.lang.String mosaicTableName, java.lang.String rdtTableName, java.lang.String parameters, java.lang.String sdoNumArray)
           
static java.lang.String patchSdoCachedMapsDefinition(java.lang.String definition, double[] mbr, int srid)
           
static boolean pyramidLayer(JPAFacade facade, java.lang.String mosaicTableName, java.lang.String parameters, java.lang.Long[] bgValues)
           
static boolean registerGeorasterObjects(JPAFacade facade)
          calls SDO_GEOR_ADMIN.registerGeoRasterObjects registering any unregistered Georaster Layers in the schema associated with the facade's persistence unit.
static java.util.List<java.lang.String> reloadGeoTiffLibraries(java.lang.String libdir, java.lang.String syspwd)
           
static boolean replaceIndex(JPAFacade facade, java.lang.String layername, java.lang.String tablespaceName, java.lang.String workTablespace)
           
static boolean revokeReadPermissions(JPAFacade facade, java.lang.String user, java.lang.String path)
           
static boolean revokeReadWritePermissions(JPAFacade facade, java.lang.String user, java.lang.String path)
           
static void setPermissionPause(int milliseconds)
           
static boolean setSrid(JPAFacade facade, java.lang.Integer srid, java.lang.String layername)
           
static boolean setSrid(JPAFacade facade, java.lang.Integer srid, java.lang.String layername, java.lang.String rdtTableName)
           
static boolean setTablespaceReadOnly(JPAFacade facade, java.lang.String tablespaceName)
           
static boolean setTablespaceReadWrite(JPAFacade facade, java.lang.String tablespaceName)
           
static boolean tableExists(JPAFacade facade, java.lang.String tableName)
           
static boolean tablespaceExists(JPAFacade facade, BasemapSetBean basemapSetBean)
           
static boolean tablespaceExists(JPAFacade facade, java.lang.String tablespaceName)
           
static boolean unregisterTablespaceLayers(JPAFacade facade, java.lang.String tablespaceName)
           find all the tables in the tablespace
static int updateRdtSrid(JPAFacade facade, java.lang.String rdtTableName)
           
static boolean validateGeorasterLayer(JPAFacade facade, java.lang.String layerName)
           
static boolean validateRasterSequence(JPAFacade facade)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORAERROR_TABLE_NOT_FOUND

public static final int ORAERROR_TABLE_NOT_FOUND
See Also:
Constant Field Values

ORAERROR_TABLE_ALREADY_EXISTS

public static final int ORAERROR_TABLE_ALREADY_EXISTS
See Also:
Constant Field Values

ORAERROR_GEOTIFF_LIB_NOT_FOUND

public static final int ORAERROR_GEOTIFF_LIB_NOT_FOUND
See Also:
Constant Field Values

ORAERROR_GEORASTER_OBJECT_NULL

public static final int ORAERROR_GEORASTER_OBJECT_NULL
See Also:
Constant Field Values

ORAERROR_GEORASTER_PERMISSION

public static final int ORAERROR_GEORASTER_PERMISSION
See Also:
Constant Field Values

ORAERROR_MOSAIC_FAILURE

public static final int ORAERROR_MOSAIC_FAILURE
See Also:
Constant Field Values
Constructor Detail

GeorasterJPAUtils

protected GeorasterJPAUtils()
Method Detail

createOrReplaceUserSdoMaps

public static boolean createOrReplaceUserSdoMaps(JPAFacade facade,
                                                 java.util.List<java.lang.String> themes,
                                                 java.lang.String name)

createGrantReadPermissions

public static boolean createGrantReadPermissions(JPAFacade facade,
                                                 java.lang.String targetUser)
Parameters:
facade - -- just be connected to SYSTEM
targetUser -
Returns:

grantReadPermissionsExtant

public static boolean grantReadPermissionsExtant(JPAFacade facade)
Parameters:
facade -
Returns:

grantReadPermissions

public static boolean grantReadPermissions(JPAFacade facade,
                                           java.lang.String user,
                                           java.lang.String path,
                                           java.lang.String localRoot,
                                           java.lang.String targetRoot)
Parameters:
facade -
user -
path -
localRoot -
targetRoot -
Returns:
See Also:
permissions.pls

grantReadPermissions

public static boolean grantReadPermissions(JPAFacade facade,
                                           java.lang.String user,
                                           java.lang.String absolutePath)
Parameters:
facade -
user -
absolutePath -
Returns:
See Also:
permissions.pls

revokeReadPermissions

public static boolean revokeReadPermissions(JPAFacade facade,
                                            java.lang.String user,
                                            java.lang.String path)
Parameters:
facade -
user -
path -
Returns:
See Also:
permissions.pls

deleteReadPermissions

public static boolean deleteReadPermissions(JPAFacade facade,
                                            java.lang.String user)
Parameters:
facade -
user -
Returns:
See Also:
permissions.pls

grantReadWritePermissions

public static boolean grantReadWritePermissions(JPAFacade facade,
                                                java.lang.String user,
                                                java.lang.String path,
                                                java.lang.String localRoot,
                                                java.lang.String targetRoot)
Parameters:
facade -
user -
path -
localRoot -
targetRoot -
Returns:

grantReadWritePermissions

public static boolean grantReadWritePermissions(JPAFacade facade,
                                                java.lang.String user,
                                                java.lang.String absolutePath)
Parameters:
facade -
user -
absolutePath -
Returns:
See Also:
permissions.pls

revokeReadWritePermissions

public static boolean revokeReadWritePermissions(JPAFacade facade,
                                                 java.lang.String user,
                                                 java.lang.String path)
Parameters:
facade -
user -
path -
Returns:
See Also:
permissions.pls

deleteWritePermissions

public static boolean deleteWritePermissions(JPAFacade facade,
                                             java.lang.String user)

getPermissionSeq

public static java.util.List<java.lang.Long> getPermissionSeq(JPAFacade facade,
                                                              java.lang.String user,
                                                              java.lang.String path,
                                                              java.lang.String action)
Parameters:
facade -
user -
path - absolute path of permitted file. If a folder then all permissionList
action - must be one of "read", "write", or "readwrite"
Returns:

deletePermission

public static boolean deletePermission(JPAFacade facade,
                                       java.lang.String user,
                                       java.lang.String path,
                                       java.lang.String action)
Parameters:
facade -
user -
path -
action -
Returns:
See Also:
permissions.pls

dropLayer

public static boolean dropLayer(JPAFacade facade,
                                java.lang.String layerName)
Parameters:
facade -
layerName -
Returns:
See Also:
permissions.pls, dropLayer(JPAFacade, String, boolean)

dropLayer

public static boolean dropLayer(JPAFacade facade,
                                java.lang.String layerName,
                                boolean extraordinary)
Normally the user should call @{link GeorasterJPAUtils#dropLayer(JPAFacade,String) GeorasterJPAUtils.dropLayer(JPAFacade,String)}

Parameters:
facade -
layerName -
extraordinary - if true the method will first delete the contents of layerName and rdt_layerName and if the drop layer still fails it will delete the
Returns:
See Also:
permissions.pls, dropLayer(JPAFacade,String)

validateRasterSequence

public static boolean validateRasterSequence(JPAFacade facade)
Parameters:
facade -
Returns:
See Also:
permissions.pls

loadGeoTiffFile

public static boolean loadGeoTiffFile(JPAFacade facade,
                                      java.lang.String fullFilePathName,
                                      java.lang.String rasterTable)
Parameters:
facade -
fullFilePathName - the full path name of the file to load
rasterTable - the name of the raster layer table
Returns:
See Also:
loadGeoTiffFile(JPAFacade facade, String fullFilePathName, String rasterTable, String rdtTable, String rasterName, String storageParameters, String sequenceName), permissions.pls

loadGeoTiffFile

public static boolean loadGeoTiffFile(JPAFacade facade,
                                      java.lang.String fullFilePathName,
                                      java.lang.String rasterTable,
                                      java.lang.String rdtTable,
                                      java.lang.String rasterName,
                                      java.lang.String storageParameters,
                                      java.lang.String sequenceName)
Parameters:
facade - a JPA facade
fullFilePathName - the full path name of the file to load
rasterTable - the name of the raster layer table
rdtTable - if null defaults to RDT_rasterTable
rasterName - if null defaults to just the filename and extention parts of fullFilePathName
storageParameters - if null defaults to blocksize=(512,512,3)
sequenceName - if null defaults to RASTER_SEQUENCE
Returns:
See Also:
permissions.pls

loadGeoTiffFileGdal

public static boolean loadGeoTiffFileGdal(java.lang.String username,
                                          java.lang.String password,
                                          java.lang.String fullFilePathName,
                                          java.lang.String rasterTable,
                                          java.lang.String rdtTable,
                                          java.lang.String rasterName,
                                          java.lang.Integer blockSize,
                                          java.lang.Long rasterId)
Parameters:
username -
password -
fullFilePathName -
rasterTable -
rdtTable -
rasterName -
blockSize -
rasterId -
Returns:
See Also:
permissions.pls

mosaicLayer

public static boolean mosaicLayer(JPAFacade facade,
                                  java.lang.String rawTableName,
                                  java.lang.String layerName,
                                  java.lang.String mosaicTableName,
                                  java.lang.String sdoNumArray)
Parameters:
facade -
rawTableName -
layerName -
mosaicTableName -
Returns:
See Also:
permissions.pls

mosaicLayer

public static boolean mosaicLayer(JPAFacade facade,
                                  java.lang.String rawTableName,
                                  java.lang.String layerName,
                                  java.lang.String mosaicTableName,
                                  java.lang.String rdtTableName,
                                  java.lang.String parameters,
                                  java.lang.String sdoNumArray)
Parameters:
facade -
rawTableName -
layerName -
mosaicTableName -
rdtTableName -
parameters -
Returns:
See Also:
permissions.pls

pyramidLayer

public static boolean pyramidLayer(JPAFacade facade,
                                   java.lang.String mosaicTableName,
                                   java.lang.String parameters,
                                   java.lang.Long[] bgValues)
Parameters:
facade -
mosaicTableName -
parameters -
bgValues -
Returns:
See Also:
permissions.pls

createLayerTables

public static boolean createLayerTables(JPAFacade facade,
                                        java.lang.String layerName,
                                        java.lang.String tablespace,
                                        int srid,
                                        boolean secureFiles,
                                        boolean dropExisting)
Parameters:
facade -
layerName -
tablespace -
secureFiles -
dropExisting -
Returns:
See Also:
permissions.pls

getLoadedFiles

public static java.util.List<java.lang.String> getLoadedFiles(JPAFacade facade,
                                                              java.lang.String layer)
Parameters:
facade -
layer -
Returns:

findFiles

public static java.util.List<java.lang.String> findFiles(java.lang.String folder,
                                                         java.lang.String localRoot,
                                                         java.lang.String targetRoot,
                                                         java.lang.String ext,
                                                         java.util.List<java.lang.String> loadedFiles)
                                                  throws java.io.IOException
The method finds files of type ext on the machine running the application and returns them in a List excluding those files with names matching those in loadedFiles. If the application is running on a different than the database being loaded the beginning of the folder path may be different. The optional parameters localRoot and targetRoot can be used to convert the absolute file path name to match that on the database machine.

Parameters:
folder - the folder to search for files. This folder will be local to the machine running the application.
localRoot - the part of the local file absolute path that is different from the target (database) absolute path. E.g. "Y:"
targetRoot - the part of the target (database) path that is different from the local absolute path. E.g. "/rasterFiles". If the first character of targetRoot is a forward slash, "/", then all backward slashes in the absolute path will be converted to forward slashes.
ext - the file type, typically "tif". This test is case insensitive and may or may not include a leading period "."
loadedFiles - the file names, including name and extension but not any folder path, of files already loaded
Returns:
Throws:
java.io.IOException

insertSdoGeomMetadataUTM

public static boolean insertSdoGeomMetadataUTM(JPAFacade facade,
                                               java.lang.String tableName,
                                               int srid)
Parameters:
facade -
tableName -
srid -
Returns:

insertSdoGeomMetadataGeographic

public static boolean insertSdoGeomMetadataGeographic(JPAFacade facade,
                                                      java.lang.String tableName,
                                                      int srid)
Parameters:
facade -
tableName -
srid -
Returns:

insertSdoGeomMetadataGeographic

public static boolean insertSdoGeomMetadataGeographic(JPAFacade facade,
                                                      java.lang.String tableName,
                                                      java.lang.String columnName)
Parameters:
facade -
tableName -
columnName -
Returns:

insertSdoGeomMetadata

public static boolean insertSdoGeomMetadata(JPAFacade facade,
                                            java.lang.String tableName,
                                            java.lang.String columnName,
                                            java.util.List<SdoDimElement> dimInfo,
                                            int srid)
Parameters:
facade -
tableName -
columnName -
dimInfo -
srid -
Returns:

insertSdoTheme

public static boolean insertSdoTheme(JPAFacade facade,
                                     java.lang.String layerName,
                                     java.lang.Long rasterId)

existsSdoMap

public static boolean existsSdoMap(JPAFacade facade,
                                   java.lang.String layerName)
Parameters:
facade -
layerName -
Returns:
true if a USER_SDO_MAPS row with name like layerName exists in the facade schema

existsSdoCachedMap

public static boolean existsSdoCachedMap(JPAFacade facade,
                                         java.lang.String cachedMapName)
Parameters:
facade -
cachedMapName -
Returns:
true if a USER_SDO_CACHED_MAPS row with name like cachedMapName exists in the facade schema

insertSdoMap

public static boolean insertSdoMap(JPAFacade facade,
                                   java.lang.String layerName)
Parameters:
facade -
layerName -
Returns:

insertSimpleSdoMap

public static boolean insertSimpleSdoMap(JPAFacade facade,
                                         java.lang.String layerName,
                                         java.lang.String themeName,
                                         boolean deleteExisting)
Creates a simple USER_SDO_MAP with just one theme

Parameters:
facade -
layerName -
themeName -
Returns:

insertSimpleSdoMap

public static boolean insertSimpleSdoMap(JPAFacade facade,
                                         java.lang.String layerName,
                                         java.util.List<java.lang.String> themeNames,
                                         boolean deleteExisting)
Creates a simple USER_SDO_MAP with multiple themes

Parameters:
facade -
layerName -
themeNames -
deleteExisting -
Returns:

insertSdoCachedMap

public static boolean insertSdoCachedMap(JPAFacade facade,
                                         java.lang.String mapName,
                                         java.lang.String templateName,
                                         double[] mbr,
                                         int srid,
                                         boolean deleteExisting)

patchSdoCachedMapsDefinition

public static java.lang.String patchSdoCachedMapsDefinition(java.lang.String definition,
                                                            double[] mbr,
                                                            int srid)

main

public static void main(java.lang.String[] args)

createIndex

public static boolean createIndex(JPAFacade facade,
                                  java.lang.String layername,
                                  java.lang.String tablespaceName,
                                  java.lang.String workTablespace)

dropIndex

public static boolean dropIndex(JPAFacade facade,
                                java.lang.String layername)

replaceIndex

public static boolean replaceIndex(JPAFacade facade,
                                   java.lang.String layername,
                                   java.lang.String tablespaceName,
                                   java.lang.String workTablespace)

setSrid

public static boolean setSrid(JPAFacade facade,
                              java.lang.Integer srid,
                              java.lang.String layername)

setSrid

public static boolean setSrid(JPAFacade facade,
                              java.lang.Integer srid,
                              java.lang.String layername,
                              java.lang.String rdtTableName)

tablespaceExists

public static boolean tablespaceExists(JPAFacade facade,
                                       BasemapSetBean basemapSetBean)
Parameters:
facade -
basemapSetBean -
Returns:

tablespaceExists

public static boolean tablespaceExists(JPAFacade facade,
                                       java.lang.String tablespaceName)
Parameters:
facade -
tablespaceName -
Returns:

tableExists

public static boolean tableExists(JPAFacade facade,
                                  java.lang.String tableName)
Parameters:
facade -
tableName -
Returns:

createTablespace

public static boolean createTablespace(JPAFacade facade,
                                       java.lang.String tablespaceName,
                                       java.lang.String location)
Parameters:
facade -
tablespaceName -
location -
Returns:

unregisterTablespaceLayers

public static boolean unregisterTablespaceLayers(JPAFacade facade,
                                                 java.lang.String tablespaceName)
  1. find all the tables in the tablespace

Parameters:
facade -
tablespaceName -
Returns:

isGeorasterLayer

public static boolean isGeorasterLayer(JPAFacade facade,
                                       java.lang.String tableName)

dropTablespace

public static boolean dropTablespace(JPAFacade facade,
                                     java.lang.String tablespaceName)
Parameters:
facade -
tablespaceName -
Returns:

dropTablespace

public static boolean dropTablespace(JPAFacade facade,
                                     java.lang.String tablespaceName,
                                     boolean includingContents,
                                     boolean includingDatafiles,
                                     boolean cascadeConstraints)
Parameters:
facade -
tablespaceName -
includingContents -
Returns:

createDirectoryObject

public static boolean createDirectoryObject(JPAFacade facade,
                                            java.lang.String directoryObjectName,
                                            java.lang.String directory)
Parameters:
facade -
directoryObjectName -
directory -
Returns:

isTablespaceTransportableX

public static boolean isTablespaceTransportableX(JPAFacade facade,
                                                 java.lang.String tablespaceName)
Parameters:
facade -
tablespaceName -
Returns:

isTablespaceTransportable

public static boolean isTablespaceTransportable(JPAFacade facade,
                                                java.lang.String tablespaceName)
Parameters:
facade -
tablespaceName -
Returns:

setTablespaceReadOnly

public static boolean setTablespaceReadOnly(JPAFacade facade,
                                            java.lang.String tablespaceName)

setTablespaceReadWrite

public static boolean setTablespaceReadWrite(JPAFacade facade,
                                             java.lang.String tablespaceName)

exportTransportableTablespace

public static boolean exportTransportableTablespace(JPAFacade facade,
                                                    java.lang.String tablespaceName,
                                                    java.lang.String directoryObjectName)
Parameters:
facade -
tablespaceName -
directoryObjectName -
Returns:

copyTransportableTablespace

public static boolean copyTransportableTablespace(java.lang.String factoryTtsUri,
                                                  java.lang.String warehouseTtsUri,
                                                  java.lang.String tablespaceName)
                                           throws java.io.IOException
The method copies all files with names starting with tablespaceName from factoryTtsUri to warehoueTtsUri. It validates that all files were copied and that the file fontPointSize on the warehouse matches the file fontPointSize on the factory. The method also checks that none of the files exist in warehouseTtsUri before starting the copy. If any of the files exist, then none of the files are copied.

Parameters:
factoryTtsUri -
warehouseTtsUri -
tablespaceName -
Returns:
true if the copy was successful
Throws:
java.io.IOException

importTransportableTablespace

public static boolean importTransportableTablespace(JPAFacade facade,
                                                    java.lang.String tablespaceName,
                                                    java.lang.String destinationDir)
Parameters:
facade -
tablespaceName -
destinationDir -
Returns:

registerGeorasterObjects

public static boolean registerGeorasterObjects(JPAFacade facade)
calls SDO_GEOR_ADMIN.registerGeoRasterObjects registering any unregistered Georaster Layers in the schema associated with the facade's persistence unit.

Parameters:
facade -
Returns:

updateRdtSrid

public static int updateRdtSrid(JPAFacade facade,
                                java.lang.String rdtTableName)

getGeorasterLayerSize

public static java.lang.Long getGeorasterLayerSize(JPAFacade facade,
                                                   java.lang.String rdtTableName)
Parameters:
facade -
rdtTableName -
Returns:
the sum(length(rasterblock)) for rdtTableName

validateGeorasterLayer

public static boolean validateGeorasterLayer(JPAFacade facade,
                                             java.lang.String layerName)

getRasterId

public static java.lang.Long getRasterId(JPAFacade facade,
                                         java.lang.String layerName)

reloadGeoTiffLibraries

public static java.util.List<java.lang.String> reloadGeoTiffLibraries(java.lang.String libdir,
                                                                      java.lang.String syspwd)
                                                               throws java.io.IOException
Throws:
java.io.IOException

getLastException

public static java.sql.SQLException getLastException()
Returns:

getLastExceptionMessage

public static java.lang.String getLastExceptionMessage()
Returns:

setPermissionPause

public static void setPermissionPause(int milliseconds)
Parameters:
milliseconds -

getPermissionPause

public static int getPermissionPause()