public class CRISM_Database_Loader extends Database_Loader
The CRISM database is stored in multiple index.tab files, instead of one single cumindex.tab file.
The information for the main operation of this class can be found
under the Load_Database()
and Load_Fields()
methods.
PIRL.Configuration
,
Loaded_Database
,
CRISM_Shapefile_Loader
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_DIRECTORY
The Default FTP directory if one is not otherwise specified
|
static long |
DEFAULT_ENTRY_BYTES
The default number of bytes in an entry
|
static java.lang.String |
DEFAULT_PASSWORD
The Default FTP Password if one is not otherwise specified
|
static java.lang.String |
DEFAULT_SERVER
The Default FTP Server if one is not otherwise specified
|
static java.lang.String |
DEFAULT_USERNAME
The Default FTP Username if one is not otherwise specified
|
static java.lang.String |
ID
The Class identification with revision number
|
Current_Entry, database, DEFAULT_CONFIG_FILENAME, DEFAULT_MAX_ENTRIES, ERROR, Error_Message, FINISHED, Max_Entries, OUT_OF_MEMORY, Status, UNFINISHED
Constructor and Description |
---|
CRISM_Database_Loader()
Creates the loader with default values.
|
CRISM_Database_Loader(java.lang.String server)
Creates the loader with default values and a specified server.
|
CRISM_Database_Loader(java.lang.String server,
java.lang.String directory)
Creates the loader with default values and a specified server and directory.
|
CRISM_Database_Loader(java.lang.String server,
java.lang.String directory,
java.lang.String username)
Creates the loader with default values and a specified server, directory, and username.
|
CRISM_Database_Loader(java.lang.String server,
java.lang.String directory,
java.lang.String username,
java.lang.String password)
Creates the loader with a specified server, directory, username, and password.
|
Modifier and Type | Method and Description |
---|---|
void |
Load_Database()
This method adds information to the database.
|
void |
Load_Fields()
This method adds fields to the database.
|
static java.lang.String |
PDS_To_MYSQL_Datetime(java.lang.String pds)
This method will convert a pds datetime to a mysql datetime
|
Clear_Data, Get_Current_Entry, Get_Data, Get_Error_Message, Get_Fields, Get_Max_Entries, Get_Status, Initialize, Initialize, Initialize, Initialize, Remove_Data, Set_Configuration, Set_Configuration, Set_Current_Entry, Set_Max_Entries, Validate
public static final java.lang.String ID
public static final java.lang.String DEFAULT_SERVER
public static final java.lang.String DEFAULT_DIRECTORY
public static final java.lang.String DEFAULT_USERNAME
public static final java.lang.String DEFAULT_PASSWORD
public static final long DEFAULT_ENTRY_BYTES
public CRISM_Database_Loader()
Default Values:
DEFAULT_SERVER
DEFAULT_DIRECTORY
DEFAULT_USERNAME
DEFAULT_PASSWORD
DEFAULT_ENTRY_BYTES
public CRISM_Database_Loader(java.lang.String server)
Default Values:
DEFAULT_DIRECTORY
DEFAULT_USERNAME
DEFAULT_PASSWORD
DEFAULT_ENTRY_BYTES
server
- The specified FTP server.
public CRISM_Database_Loader(java.lang.String server, java.lang.String directory)
Default Values:
DEFAULT_USERNAME
DEFAULT_PASSWORD
DEFAULT_ENTRY_BYTES
server
- The specified FTP server.directory
- The specified start directory on the FTP server.
public CRISM_Database_Loader(java.lang.String server, java.lang.String directory, java.lang.String username)
Default Values:
DEFAULT_PASSWORD
DEFAULT_ENTRY_BYTES
server
- The specified FTP server.directory
- The specified start directory on the FTP server.username
- The specified username to log in with.
public CRISM_Database_Loader(java.lang.String server, java.lang.String directory, java.lang.String username, java.lang.String password)
Default Value:
DEFAULT_ENTRY_BYTES
server
- The specified FTP server.directory
- The specified start directory on the FTP server.username
- The specified username to log in with.password
- The specified password to log in with.
public static java.lang.String PDS_To_MYSQL_Datetime(java.lang.String pds)
The format seen in the PDS imaging data volumes is "yyyy-mm-ddThh:mm:ss.sss" which this method converts to the format "yyyy-mm-dd hh:mm:ss"
pds
- The PDS datetime Stringpublic void Load_Database()
If a label file is not currently loaded this method will load a new one if one is available.
If no label file is available then the method will exit and set the status to FINISHED
.
This method adds entries line by line to the database
. The GIS information for the CENTER and FOOTPRINT fields are created
from the longitude/latitude data stored in the PDS data volume. The method
should only fail if an IOException is caught or if there are no fields at the
time it is run. Then it sets the loader's status to ERROR and puts the message
from the exception into the error message
.
Note: The field "LINES" from the PDS data volume has been changed to
"IMAGE_LINES" and many of the fields from the PDS data volume are not included in the local CRISM catalog.
These alterations should be stored in the configuration file that gets passed to
this class in its initialization. See the
abstract loader
class for more information.
Load_Database
in class Database_Loader
public void Load_Fields()
For this Class fields are loaded in the Load_Database()
method
since it must load multiple label and table files.
Load_Fields
in class Database_Loader
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona