Contribute to the DSpace Development Fund

The newly established DSpace Development Fund supports the development of new features prioritized by DSpace Governance. For a list of planned features see the fund wiki page.

As of DSpace 3.0 this code is obsolete

DSpace 3.0 includes its own version of Document Type Based Submission (see Submission User Interface docs).  The older addon code documented below is now obsolete and will not work in DSpace 3 or above.

Outline

In DSpace, you are able to use input-forms.xml to setup different metadata field set for different collections in the submission process. However, the customization in collection-level is sometimes not sufficient. If your DSpace repository has a collection with multiple document-types and each document type with different metadata field set, you will have to mix up all the fields together in the submission process. Not only is it not a friendly setup, it may also confuse your end user. This page will provide you a solution which allow you to customize the input forms based on document types.

Configuration Files

In input-forms.xml, you can configure multiple describe pages for the submission process. To setup a document-type based submission, you need at least two pages. The first page will only contains the fields commonly used in the collection, including the type field (corresponding to dc.type.) And in the second page, you can describe different fields based on document types. That means you need configure multiple second pages and give them a type-name which matches the name in your dc.type field. For example, if you have "Conference Paper", "Journal Article" and "Thesis and Disertation" in dc.type, you can setup your pages as below:

  <page n="2" type-name="">
         It becomes a default page for all document types if there is no type-name specified or type-name is empty
         put your fields here
  </page>
  <page n="2" type-name="Conference Paper">
         put your Conference Paper fields here
  </page> 
  <page n="2" type-name="Journal Article">
         put your Journal Article fields here
  </page> 

For any item without a specific page setup, it will use the default one. So make sure you always have a default page setup.

Here are the updated Missing File: Input-forms.dtd and Input-forms.xml which shows you some examples.

Please note that the 'hint' in this input-forms.xml is using i18n message instead of the help texts come with DSpace package. If you have multiple collections and would like to italicize the text or put a link in the hint, you will find this is very helpful. You don't have to maintain the same 'hint' for the fields in different places. Also it is possible to put the html tags around the text to format the hints.

DSpace API

Then we need to do a bit of surgary to DSpace API. Following is the list of the files have been modified or added. The modification are based on DSpace 1.5.0 on Manakin UI. Please download DocumentTypeBasedSubmission.zip and place them in the appropriate directories as indicated below.

1. dspace-api/src/main/java/org/dspace/app/util/DCInputSet.java

2. dspace-api/src/main/java/org/dspace/app/util/DCInputsReader.java

3. dspace-api/src/main/java/org/dspace/submit/step/DescribeStep.java

4. dspace-xmlui-api/src/main/java/org/dspace/aspect/submission/submit/DescribeStep.java

5. dspace-api/src/main/java/org/dspace/app/util/PageInfo.java (new)

  • No labels