|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CogStore
A place to store your Cogs. More precisely, a hierarchical storage database for Cog objects. This is an abstract interface that may map to a file-based, sql-based, or some other implementation. A CogStore may be read-only or editable. It supports basic loading and saving and simple queries similar to a directory listing or "find" function. In general, though, it is expected that you will be loading and saving to a known path.
For our own amusement, we have labeled the directory-like object a "bin" (like a bucket for parts).
| Field Summary | |
|---|---|
static int |
BIN
|
static int |
COG
|
static int |
NOT_FOUND
|
| Method Summary | |
|---|---|
int |
examine(java.lang.String path)
Returns type of node for path - either NOT_FOUND, COG, or BIN. |
boolean |
isWritable()
Returns true if you can write to this store. |
java.lang.String[] |
listContents(java.lang.String binPath)
Lists the contents for the given bin node. |
Cog |
retrieveCog(java.lang.String path)
Retreives a cog from storage. |
Cog |
retrieveCogOrNull(java.lang.String path)
Retreives a cog from storage. |
void |
storeCog(java.lang.String path,
Cog cog)
Stores a cog, replacing the current one at that location and creating any missing bins needed. |
| Field Detail |
|---|
static final int NOT_FOUND
static final int COG
static final int BIN
| Method Detail |
|---|
boolean isWritable()
Cog retrieveCog(java.lang.String path)
throws java.io.IOException
java.io.IOException
Cog retrieveCogOrNull(java.lang.String path)
throws java.io.IOException
java.io.IOException
void storeCog(java.lang.String path,
Cog cog)
throws java.io.IOException
java.io.IOException
int examine(java.lang.String path)
throws java.io.IOException
java.io.IOException
java.lang.String[] listContents(java.lang.String binPath)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||