|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ucsb.nceas.morpho.datastore.DataStore
creates an abstract class for getting files from any dataStore using the same methods.
Field Summary | |
protected java.lang.String |
cachedir
|
protected java.lang.String |
datadir
|
protected java.lang.String |
separator
|
protected java.lang.String |
tempdir
|
Constructor Summary | |
DataStore(Morpho morpho)
create a new FileSystemDataStore for a Morpho |
Method Summary | |
void |
debug(int code,
java.lang.String message)
|
abstract boolean |
deleteFile(java.lang.String name)
Deletes the file with an id of name. |
protected java.lang.String |
insertIdInFile(java.io.File file,
java.lang.String id)
inserts a documents id into a specified path in the document. |
abstract java.io.File |
newFile(java.lang.String name,
java.io.Reader file)
create a new file with an id of name in the datastore and return a File object that represents it. |
abstract java.io.File |
openFile(java.lang.String name)
open a file from a datastore with the id of name and return a File object that represents it. |
protected java.lang.String |
parseId(java.lang.String id)
Parses a dotted notation id into a file path. |
protected java.lang.String |
parseIdFromMessage(java.lang.String message)
parses the id of a file from the message that metacat returns |
abstract java.io.File |
saveFile(java.lang.String name,
java.io.Reader file)
save a file to the datastore with the id of name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String datadir
protected java.lang.String separator
protected java.lang.String cachedir
protected java.lang.String tempdir
Constructor Detail |
public DataStore(Morpho morpho)
Method Detail |
public void debug(int code, java.lang.String message)
protected java.lang.String parseId(java.lang.String id)
protected java.lang.String parseIdFromMessage(java.lang.String message)
protected java.lang.String insertIdInFile(java.io.File file, java.lang.String id)
file
- the file to insert the id intoid
- the id to insert into the file.public abstract java.io.File openFile(java.lang.String name) throws java.io.FileNotFoundException, CacheAccessException
DataStoreInterface
openFile
in interface DataStoreInterface
java.io.FileNotFoundException
CacheAccessException
public abstract java.io.File saveFile(java.lang.String name, java.io.Reader file) throws java.lang.Exception
DataStoreInterface
saveFile
in interface DataStoreInterface
java.lang.Exception
public abstract java.io.File newFile(java.lang.String name, java.io.Reader file) throws java.lang.Exception
DataStoreInterface
newFile
in interface DataStoreInterface
java.lang.Exception
public abstract boolean deleteFile(java.lang.String name) throws java.lang.Exception
DataStoreInterface
deleteFile
in interface DataStoreInterface
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |