Differences between revisions 1 and 2
Revision 1 as of 2008-06-26 12:26:05
Size: 1866
Editor: kfc
Comment: Created by the PackagePages action.
Revision 2 as of 2008-09-12 12:11:42
Size: 1423
Editor: kfc
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
 * The file must be uploaded to bitstorage  * The file must be uploaded to bitstorage, and characterised
Line 7: Line 7:
 * The file must be characterised (see the API for this), and the result added to a Technical Metadata-stream in the object (the file and the characterisation result must match, see the data model documentation)  * The characterisation output must be added to a Technical Metadata-stream in the object (the file and the characterisation result must match, see the data model documentation)
Line 9: Line 9:
Uploading the file to bitstorage must be done with the following API: Uploading the file to bit storage must be done with the following API:
Line 11: Line 11:
(WORK IN PROGRESS! WE NEED TO WRAP THIS IN A WEBSERVICE!) TODO: Need updated WSDL
Line 13: Line 13:
The interface is command line based, and the client must have ssh access to halley.statsbiblioteket.dk. 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.
Line 15: Line 15:
The interface is as follows
{{{$ ssh doms@halley <<command>> <<filename>>}}}
Those characteristica MUST be added in the proper places of the accompanying Fedora object.
Line 18: Line 17:
Commands are one of
{{{
 save-md5) : save a file and get md5sum back
 get-md5) : get md5sum of a file
 approve) : approve a file
 delete) : delete a file not appoved
 get) : get a file
 getmd5s) : report md5 sums of stored files
 space-left) : report space left
}}}
Approve is used when the accompanying Fedora object is first sets published.
Line 29: Line 19:
Files are exchanged using {{{stdin}}} and {{{stdout}}}. Errors are reported to {{{stderr}}}.

To upload a file, use {{{save-md5}}}, and check that the checksum is as expected. Otherwise {{{delete}}} and retry.

Once all Fedora objects referring to the file are validated, use {{{approve}}} to publish the file.

Preferrably, use {{{space-left}}} first as sanity check.


Disapprove is used if the accompanying Fedora object is marked deleted before publishing.
Line 42: Line 23:
Adding a file to a fedora metadata object: Adding a file and an accompanying fedora metadata object:
Line 44: Line 25:
 * Make a new XML object of type File
 * Call characterisation service on file, add metadata to the object, add file type id to the technical metadata
 * Call {{{save-md5}}} on bitfinder API, check checksum
 * Set fedora metadata objects to state "intermediate"
 * Ingest the fedora file object
 * Make a new fedora object of type File in draft mode
 * Call upload on the bitstorage API
 * Add pronomid and characterisation to the appropriate datastreams
 * Set URL and MD5 on the CONTENT datastream

Publishing a file fedora object
Line 50: Line 33:
 * Call {{{approve}}} from the bitfinder API  * Call {{{approve}}} from the bitstorage API

Bitstorage API

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

  • The file must be uploaded to bitstorage, and characterised
  • The file must be connected to a Fedora object datastream of type TypeFile

  • The characterisation output must be added to a Technical Metadata-stream in the object (the file and the characterisation result must match, see the data model documentation)

Uploading the file to bit storage must be done with the following API:

TODO: Need updated WSDL

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:

  • Make a new fedora object of type File in draft mode
  • Call upload on the bitstorage API
  • Add pronomid and characterisation to the appropriate datastreams
  • Set URL and MD5 on the CONTENT datastream

Publishing a file fedora object

  • Set fedora metadata objects to state "published"
  • Call approve from the bitstorage API

Bitstorage API (last edited 2010-03-17 13:09:38 by localhost)