|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Interface for databases of chess Games.
| Field Summary | |
static java.lang.String |
__version
|
| Method Summary | |
void |
add(Game g)
Add a new Game to the database. |
void |
close()
Close a database. |
void |
create()
Create a new database. |
void |
delete(Game g)
Remove a Game from the database. |
Game |
get(int idx)
Retrieve a game based on its index in the database. |
java.util.Vector |
getGames()
Retrieve all Games present in the database. |
java.util.Vector |
getHeaders()
Retrieve the headers for all games present in the database. |
void |
open()
Open an existing database. |
void |
setName(java.lang.String nam)
Set name of Game collection. |
int |
size()
Returns the number of Games stored in the database. |
void |
update(Game g)
Update a Game in the database. |
| Field Detail |
public static final java.lang.String __version
| Method Detail |
public void setName(java.lang.String nam)
throws java.lang.Exception
The meaning of this name is implementation dependent, that is, it is up to the implementing classes to interprete this name.
For example, this may be the name of a PGN file or it may be the basename for an old-style Chessbase database (that will use files with this basename followed by the extensions ".CBI" and ".CBF")
nam - String specifying the name of the database.
public void create()
throws java.lang.Exception
public void open()
throws java.lang.Exception
public int size()
throws java.lang.Exception
int containing the number of Games.
public java.util.Vector getGames()
throws java.lang.Exception
Vector containing the Games present in the
database.
public java.util.Vector getHeaders()
throws java.lang.Exception
Vector containing the header strings for all
the games present in the database.
public Game get(int idx)
throws java.lang.Exception
idx - int zero-based index of the game to retrieveGame containing the specified game
public void add(Game g)
throws java.lang.Exception
This method is not required to verify insertion of duplicate Games.
g - Game to add to the database.
public void update(Game g)
throws java.lang.Exception
Note that this method is only required to work on Games that were previously read from the same database as the update is being done.
g - Game to update in the database.
public void delete(Game g)
throws java.lang.Exception
Note that this method is only required to work on Games that were previously read from the same database as the update is being done.
g - Game to remove from the database.
public void close()
throws java.lang.Exception
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||