| java.lang.Object edu.isi.pegasus.planner.ranking.GetDAX
GetDAX | public class GetDAX (Code) | | This class is responsible for the fetching the DAX'es on the basis of the
request ID's from the Windward Provenance Tracking Catalog. If there are
more than one way's to get the DAX's then it should be an interface.
author: Karan Vahi version: $Revision: 341 $ |
Field Summary | |
final public static String | DB_PREFIX The DB Driver properties prefix. | final public static String | c_prefix Prefix for the property subset to use with this catalog. |
Constructor Summary | |
public | GetDAX() The default constructor. |
Method Summary | |
public void | close() Explicitely free resources before the garbage collection hits. | public boolean | connect(PegasusProperties properties) A convenience method to connect on the basis of PegasusProperties. | public boolean | connect(Properties props) Establishes a connection to the database from the properties. | public Collection<String> | get(String id, String dir) Given a request ID it fetches the DAX's from the DB and writes out to
the directory passed.
Parameters: id - the request id. Parameters: dir - the directory where the DAX'es need to be placed. | protected String | getJDBCURL(String driver, Properties properties) Constructs the jdbc url on the basis fo the driver and db properties. | protected PreparedStatement | getStatement(int i) Singleton manager for prepared statements. | public boolean | isClosed() Predicate to check, if the connection with the catalog's
implementation is still active. | public static void | main(String[] args) For Testing purposes only. | protected static void | sanityCheck(File dir) Checks the destination location for existence, if it can
be created, if it is writable etc. |
DB_PREFIX | final public static String DB_PREFIX(Code) | | The DB Driver properties prefix.
|
c_prefix | final public static String c_prefix(Code) | | Prefix for the property subset to use with this catalog.
|
GetDAX | public GetDAX()(Code) | | The default constructor.
|
close | public void close()(Code) | | Explicitely free resources before the garbage collection hits.
|
connect | public boolean connect(PegasusProperties properties)(Code) | | A convenience method to connect on the basis of PegasusProperties.
Eventually this logic should go in the invoking code or factory.
Parameters: properties - PegasusProperties boolean |
connect | public boolean connect(Properties props)(Code) | | Establishes a connection to the database from the properties. You
can specify a driver property to contain the class name of
the JDBC driver for your database. This property will be removed
before attempting to connect. You must speficy a url
property to describe the connection. It will be removed before
attempting to connect.
Parameters: props - is the property table with sufficient settings toestablish a link with the database. The minimum key required key is"url", and possibly "driver". Any other keys depend on the databasedriver. true if connected, false if failed to connect. See Also: java.sql.DriverManager.getConnection(StringProperties) throws: Error - subclasses for runtime errors in the class loader. |
get | public Collection<String> get(String id, String dir)(Code) | | Given a request ID it fetches the DAX's from the DB and writes out to
the directory passed.
Parameters: id - the request id. Parameters: dir - the directory where the DAX'es need to be placed. a Collection of basenames fo the DAX'es placed in the directory. |
getJDBCURL | protected String getJDBCURL(String driver, Properties properties)(Code) | | Constructs the jdbc url on the basis fo the driver and db properties.
Parameters: driver - the driver being used. Parameters: properties - the db properites the jdbc url, else null if unable to construct |
getStatement | protected PreparedStatement getStatement(int i) throws SQLException(Code) | | Singleton manager for prepared statements. This instruction
checks that a prepared statement is ready to use, and will
create an instance of the prepared statement, if it was unused
previously.
Parameters: i - is the index which prepared statement to check. a handle to the prepared statement. throws: SQLException - in case of unable to delete entry. |
isClosed | public boolean isClosed()(Code) | | Predicate to check, if the connection with the catalog's
implementation is still active. This helps determining, if it makes
sense to call close() .
true, if the implementation is disassociated, false otherwise. See Also: GetDAX.close() |
main | public static void main(String[] args)(Code) | | For Testing purposes only.
Parameters: args - the arguments passed. |
sanityCheck | protected static void sanityCheck(File dir) throws IOException(Code) | | Checks the destination location for existence, if it can
be created, if it is writable etc.
Parameters: dir - is the new base directory to optionally create. throws: IOException - in case of error while writing out files. |
|
|