The depositor is a web interface for adding new documents, along with metadata, to existing collections. It is specifically aimed to mimic the structured submission workflow of a institutional repository. The Depositor for Greenstone3 is still in development.
The depositor is a web interface for adding new documents, along with metadata, to existing collections. Derived from the Collector, it is specifically aimed to mimic the structured submission workflow of a institutional repository. As such there are several requirements for using the Depositor in your collection:
local library
on Windows is not supported)===== Enable the Depositor =====
To enable the Depositor tool modify main.cfg
(in the GSDLHOME/etc
directory): change
depositor disabled
to
depositor enabled
Note:
GSDLHOME/tmp
, GSDLHOME/collect
, and GSDLHOME/collect/your_accessable_collection
directories so as to allow the web-server to write to them'all-collections-editor
' user group (or 'colbuilder
' for Greenstone version 2.80 and earlier) has permission to modify all collections. The 'xxx-collection-editor
' has permission to modify the xxx collection. Note that the admin
user, created when installing Greenstone, is in the 'all-collections-editor
' group by default.===== Use the Depositor =====
Notes:
config.cfg
===== Configure the Depositor =====
The default set up for the depositor is as described above. The user selects a collection, signs in, adds metadata (Dublin Core Title, Creator, Description), selects a file, confirms selection, deposits the item and the collection is rebuilt. This workflow can be changed to suit each collection.
The depositor workflow is defined in the deposit.dm macro file in the main greenstone macros folder. Editing this file will change the workflow for all collections. To change it for just one collection, copy deposit.dm into the collection's macros folder (greenstone2/collect/collname/macros), and edit it there. Alternatively, you can add the redefined macros into the collection's extra.dm file. This can be done in GLI by adding macros into the Format→Collection Specific Macros pane. You'll need to start by adding the line
package depositor
Put any redefined macros after that.
==== Deposit only ====
In some cases, you may want users to be able to deposit items but not trigger a collection rebuild. Perhaps the items and metadata need monitoring or checking by the librarian before being added to the collection.
To make the depositor deposit the item in the collection but not import/build it, edit deposit.dm
and change
_laststep_ {bild}
to
_laststep_ {depositonly}
Note, to do this for a single collection, you can add
package depositor _laststep_ {depositonly}
to the Collection Specific Macros pane in the collection in GLI. ==== Configure the Metadata Fields ====
By default, the Depositor uses three fields (Title, Creator and Description) from the Dublin Core metadata set, but you can easily customize this in the GLI Format panel (from Greenstone version 2.81)
GLI writes out a macro into the collect.cfg file which lists all the metadata fields that should be used. The default list is:
collectionmeta depositormetadata [l=en] "{\"name\":\"dc.Title\",\"label\":\"Title\",\"tooltip\":\"dc.Title: A name given to the resource.\",\"type\":\"text\"}, {\"name\":\"dc.Creator\",\"label\":\"Creator\",\"tooltip\":\"dc.Creator: An entity primarily responsible for making the content of the resource.\",\"type\":\"text\"}, {\"name\":\"dc.Description\",\"label\":\"Description\",\"tooltip\":\"dc.Description: An account of the content of the resource.\",\"type\":\"text\"}"
You can edit this by hand if you like, but its probably easier to let GLI do it for you. For each item, the 'name' is the metadata name, and 'label' is what gets displayed to the user on the metadata page.
=== Multiple metadata values or change the order ===
If you want to have the user add more than one value for a metadata element, for example, multiple Subjects, or if you want to change the order of the fields, you'll have to edit the depositormetadata list by hand. You can add multiple entries for any of the metadata fields and change the order to suit the collection.
Because GLI does not offer this functionality, if you edit the collect.cfg and then reopen in GLI, your changes will be deleted. If you are not using GLI, then feel free to edit the depositormetadata list.
If you do want to open the collection in GLI, then you will need to define the custommetadataconf macro instead of depositormetadata. (Note, this available from 2.87 or nightly releases after 23 October 2014)
You can do this in two ways: as a collectionmacro in collect.cfg, or in the Collection Specific Macros area in GLI (in extra.dm).
collectionmacro depositor:custommetadataconf "var DepositorMDFields = new Array({\"name\":\"dc.Title\",\"label\":\"Title\",\"tooltip\":\"dc.Title: A name given to the resource.\",\"type\":\"text\"});"
_custommetadataconf_ {var DepositorMDFields = new Array(\{\"name\":\"dc.Title\",\"label\":\"Title\",\"tooltip\":\"dc.Title: A name given to the resource.\",\"type\":\"text\"\});}
The content is basically the same for the two cases. Note, in the second case, internal '{' and '}' are escaped: \{, \}.
The collectionmacro in collect.cfg has priority over the macro in extra.dm, if they were both defined.
==== Add a deposit link to a collection ==== (Note this is only available for 2.87 or nightly releases after 20 October 2014.)
By default, the depositor link is available from the home page, and the user needs to select a collection and log in. They can access the depositor page again from within the depositor by clicking the The depositor
link at the top right of the page. However, they'll need to select a collection again, and log in again.
To add a link in a collection for depositing an item, that bypasses the collection selection page, do the following.
In the Collection Specific Macros pane in GLI, add:
package Global _optdepositlink_ {_depositlink_}
This will add a DEPOSIT button in the row of HOME, HELP, PREFERENCES button. It will be available for every page in the collection.
To add a link just on one page, add some text and link to __httppagedepositorcurrentcollection_ You'll need to add this into the _content_ macro of the relevant page.
For example, to add a link on the about page, you might add the following to the Collection Specific Macros:
package about _content_ { _optnavigationbar_ <div class="document"> _If_("_cgiargqt_" ne "1", _If_("_cgiargu_" ne "1",_aboutqueryform_) ) <div style="text-align: right;"><a href="_httppagedepositorcurrentcollection_">Deposit an item into the collection</a> </div> _If_(_Global:collectionextra_,<p>_textabout_) _textsubcollections_ <div class="section"> <h3>_help:textsimplehelpheading_</h3> _help:simplehelp_ </div> </div> }
This will add a link Deposit an item into the collection at the right of the page underneath the quick search form. Note that this is the default _content_ macro from the about page, copied into the collection, with one <div> added containing the link.
=== Metadata Field Caching ===
When you are using the Despositor in a local collection manner, you will remain logged in between deposits, and the system will cache the metadata values. This means that next time you return to the "Specify Metadata" page, the previously entered values will be filled in. This may be useful if you are entering a lot of related documents that share metadata. If it is not useful for your situation you can turn off this behaviour by adding the following to the collection specific macros:
package depositor _cacheoption_{0}
Note that the package depositor
line is not needed if it is already present due to other modifications. Just make sure that all the depositor statements are together without other package declarations in between them.
=== Removing the depositor link on the home page ===
If you have a deposit button in a collection, then you may want to remove the main depositor link from the home page. To do this, edit greenstone2/macros/home.dm, look for the _content_ macrco, and remove the line _textgodepositor_.
==== Single page Submission ====
You can combine the metadata field entry and file selection into a single page if you like.
In the Collection Specific Macros section in GLI (or in the collection's extra.dm), to the package depositor section, add macros like the following:
_numsteps_ {1}
This will make it only have one page of data entry. After this page, it will go to deposit item or deposit and build, depending on the other settings.
_textstep1_ {Specify File and Metadata} _textstep1description_ {Please enter the metadata values, select a file, then click _textbild_ }
These define the heading and description at the top of the page, as the default ones don't fit this scenario so well.
_step1content_ { <form name="depositorform" method=post action="_gwcgi_" enctype="multipart/form-data"> <input type=hidden name="e" value="_decodedcompressedoptionsAttrsafe_"> <input type=hidden name="p" value="_cgiargpAttrsafe_"> <center> <table width=_pagewidth_> <tr><td> <div class="divbar"> </div> <center> <h2>_textstep1_</h2> <p>_textstep1description_</p> </center> <div class="divbar"> </div> <!--input goes here--> <!--dynamic load the metadata elements as configured in the collection's collect.cfg--> <p><table><tbody id="formcontainer"></tbody></table> <div class="divbar"> </div> <p>_textfilename_: <input type=file name=di1userfileinfo value="_userfile_"/></p> <div class="divbar"> </div> </td></tr> <tr><td>_depositorbar_</td></tr> </table></center> </form> }
This is the _step1content_ macro copied from greenstone2/macros/deposit.dm, with a few changes. It is printing out _textstep1description_ instead of _textdepositorblurb_ underneath the heading - we have defined the former above.
And then we have added the file input element so that the user can select the file on this page.
In a Deposit-Only situation, the user gets a Confirmation page, listing the file name and file size. You can change this by redefining the _depositonlycontent_ macro. For example:
_depositonlycontent_ { <center> <em>Thanks for your submission. A librarian will process it in due course.</em> <table width=_pagewidth_> <tr><td> <div class="divbar"> </div> <center><h2>Submitted:</h2></center> <div class="divbar"> </div> <p>_textfilename_: _di1userfile_ </p> <p>_textfilesize_: _di1userfilesize_ </p> <div class="divbar"> </div> </td></tr> <tr><td></td></tr> </table> </center> }
==== DSpace-inspired Depositor ====
Greenstone comes with a version of the depositor that behaves like the DSpace repository. It provides a multi-page submission process.
===== Additional Resources =====