Bitstorage API

To add files to DOMS, three things will need to happen:

Uploading the file to bit storage must be done with API calls for

  uploadFile  - in: filename,URLToFile,md5 out:characterizationOutput,fileName,fileUrl,md5,pronomId,validationStatus
  approveFile - in: fileUrl,md5
  disapproveFile - in: fileUrl,md5
  spaceLeft - out: bytes

Basically, you upload a file by presenting the bit storage resolvable URI, and the expected MD5 sum. The file will then be made available, and you will get a URI the file is stored on, and characteristica of the file back.

Those characteristica MUST be added in the proper places of the accompanying Fedora object.

Approve is used when the accompanying Fedora object is first sets published.

Disapprove is used if the accompanying Fedora object is marked deleted before publishing.

Examples

Adding a file and an accompanying fedora metadata object:

Publishing a file fedora object

Bitstorage API

WSDL: attachment:Bitstorage.xml

The following describes those methods of the Bitstorage API that may be called by the GUI.

uploadFile

Upload the provided file to the temporary area of bitstorage, giving it the provided file name. Return the MD5 checksum of the file. The file is only uploaded to a temporary approve-area of the bitstorage, and needs to be approved by calling approveFile before it is actually moved to the permanent bitstorage.

If you try to upload a file that is already there, it checks the provided md5 against the file of the file on the server. If they match, there is no upload, you just get the return about the file already there. If they do not match, an exception is thrown.

Input parameters:

Returns:

approveFile

Check the earlier uploaded file against the provided checksum, and if this succeeds, and possibly other criteria are met, move the file from the temporary area of bitstorage to the permanent bitstorage.

If you call this method on an already approved file, with the correct checksum, nothing happens. If the checksum is wrong, you get an exception.

Input parameters:

disapproveFile

Delete the named file from bitstorage. Only works for files that have not yet been approved.

If the file is not in temporary bitstorage nothing happens.

Input parameters:

spaceLeft

Return the number of bytes left in bitstorage.

Returns:

Data structures

BitstorageFile

Returned by uploadFile.

Contains the following public methods.