ewe.database
Interface DatabaseMaker


public interface DatabaseMaker


Method Summary
 boolean canOpenForWriting(File name)
           
 boolean canOpenForWriting(String name)
           
 boolean databaseExists(File name)
           
 boolean databaseExists(String name)
           
 boolean databaseIsValid(File name)
           
 boolean databaseIsValid(String name)
           
 Database openDatabase(File name, String mode)
          This should open the specified database.
 Database openDatabase(File name, String mode, boolean ignoreInconsistentState)
          This should open the specified database.
 Database openDatabase(String name, String mode)
          This should open the specified database.
 Database openDatabase(String name, String mode, boolean ignoreInconsistentState)
          This should open the specified database.
 

Method Detail

openDatabase

public Database openDatabase(String name,
                             String mode)
                      throws IOException
This should open the specified database. If mode is "rw" and the Database does not exist, it should create it and initialize it as being empty.

Parameters:
name - The name for the database (either with our without a file extension).
mode - The mode for opening, either "r" or "rw" or "a".
Returns:
The open Database.
Throws:
IOException - if the database was not found or could not be opened or initialized.

openDatabase

public Database openDatabase(File name,
                             String mode)
                      throws IOException
This should open the specified database. If mode is "rw" and the Database does not exist, it should create it and initialize it as being empty.

Parameters:
name - A File object referring to the Database (either with our without a file extension).
mode - The mode for opening, either "r" or "rw".
Returns:
The open Database.
Throws:
IOException - if the database was not found or could not be opened or initialized.

openDatabase

public Database openDatabase(String name,
                             String mode,
                             boolean ignoreInconsistentState)
                      throws IOException
This should open the specified database. If mode is "rw" and the Database does not exist, it should create it and initialize it as being empty.

Parameters:
name - The name for the database (either with our without a file extension).
mode - The mode for opening, either "r" or "rw" or "a".
Returns:
The open Database.
Throws:
IOException - if the database was not found or could not be opened or initialized.

openDatabase

public Database openDatabase(File name,
                             String mode,
                             boolean ignoreInconsistentState)
                      throws IOException
This should open the specified database. If mode is "rw" and the Database does not exist, it should create it and initialize it as being empty.

Parameters:
name - A File object referring to the Database (either with our without a file extension).
mode - The mode for opening, either "r" or "rw".
Returns:
The open Database.
Throws:
IOException - if the database was not found or could not be opened or initialized.

databaseExists

public boolean databaseExists(String name)

databaseExists

public boolean databaseExists(File name)

databaseIsValid

public boolean databaseIsValid(String name)

databaseIsValid

public boolean databaseIsValid(File name)

canOpenForWriting

public boolean canOpenForWriting(String name)

canOpenForWriting

public boolean canOpenForWriting(File name)