|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ucsb.nceas.morpho.datastore.DataStore
edu.ucsb.nceas.morpho.datastore.MetacatDataStore
implements and the DataStoreInterface for accessing files on the Metacat
Field Summary |
Fields inherited from class edu.ucsb.nceas.morpho.datastore.DataStore |
cachedir, datadir, separator, tempdir |
Constructor Summary | |
MetacatDataStore(Morpho morpho)
Constructor to create this object in conjunction with a ceartain morpho. |
Method Summary | |
boolean |
deleteFile(java.lang.String name)
deletes a file from metacat. |
boolean |
exists(java.lang.String name)
Checks to see if a document with the id exists on Metacat |
static void |
main(java.lang.String[] args)
Test method |
void |
newDataFile(java.lang.String id,
java.io.File file)
method to create a new data file on metacat. |
java.io.File |
newFile(java.lang.String name,
java.io.Reader file)
Create and save a new file to metacat using the "insert" action. |
java.io.File |
newFile(java.lang.String name,
java.io.Reader file,
boolean checkforaccessfile)
|
java.io.File |
openDataFile(java.lang.String name)
Opens a file from Metacat and returns a File object that represents the metacat file. |
java.io.File |
openFile(java.lang.String name)
Opens a file from Metacat and returns a File object that represents the metacat file. |
java.io.File |
saveFile(java.lang.String name,
java.io.Reader file)
Save an xml metadata file (which already exists) to metacat using the "update" action. |
java.io.File |
saveFile(java.lang.String name,
java.io.Reader file,
boolean checkforaccessfile)
|
java.lang.String |
saveFilesTransaction(java.util.Vector namesVec,
java.util.Vector readersVec)
|
Methods inherited from class edu.ucsb.nceas.morpho.datastore.DataStore |
debug, insertIdInFile, parseId, parseIdFromMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MetacatDataStore(Morpho morpho)
Method Detail |
public java.io.File openFile(java.lang.String name) throws java.io.FileNotFoundException, CacheAccessException
openFile
in interface DataStoreInterface
openFile
in class DataStore
java.io.FileNotFoundException
CacheAccessException
public java.io.File openDataFile(java.lang.String name) throws java.io.FileNotFoundException, CacheAccessException
java.io.FileNotFoundException
CacheAccessException
public boolean exists(java.lang.String name)
public java.io.File saveFile(java.lang.String name, java.io.Reader file) throws MetacatUploadException
saveFile
in interface DataStoreInterface
saveFile
in class DataStore
MetacatUploadException
public java.io.File saveFile(java.lang.String name, java.io.Reader file, boolean checkforaccessfile) throws MetacatUploadException
MetacatUploadException
public java.io.File newFile(java.lang.String name, java.io.Reader file) throws MetacatUploadException
newFile
in interface DataStoreInterface
newFile
in class DataStore
MetacatUploadException
public java.io.File newFile(java.lang.String name, java.io.Reader file, boolean checkforaccessfile) throws MetacatUploadException
MetacatUploadException
public void newDataFile(java.lang.String id, java.io.File file) throws MetacatUploadException
id
- the identifier to use for this file (e.g., knb.1.1). It should be
revision '1' because data files cannot be updated on metacatfile
- the file to upload to metacat
MetacatUploadException
public boolean deleteFile(java.lang.String name)
deleteFile
in interface DataStoreInterface
deleteFile
in class DataStore
name
- the name of the file to deletepublic static void main(java.lang.String[] args)
public java.lang.String saveFilesTransaction(java.util.Vector namesVec, java.util.Vector readersVec)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |