[Dspace-general] Displaying forms according to content type.

Graham Triggs graham at biomedcentral.com
Sat Feb 21 04:21:18 EST 2009


Actually, it isn't necessarily that hard (providing you are using 1.5+, 
to accomodate altering the order of submission steps, and don't mind the 
solution being a bit of a hack).

The DCInputsReader that drives the metadata forms already has a form 
selector based on the collection-handle.

In an ideal world, you may extend the DCInputsReader to provide other 
selection mechanisms - but you could just take the path of least 
resistance locally, and simply change the describe step to pass any 
arbitrary data that you want in place of the collection handle (for 
example the Mime type) when calling DCInputsReader.getInputs().

Then, in the input-forms.xml, you would have:

  <form-map>
    <name-map collection-handle="default" form-name="traditional" />
    <name-map collection-handle="audio/mpeg" form-name="mp3" />
  </form-map>

  <form-definitions>

    <form name="traditional">
      <page number="1">
        ...
      </page>
    </form>

    <form name="mp3">
      <page number="1">
        ...
      </page>
    </form>

G

On 13/02/2009 13:14, Yuri wrote:
> Robin, I think we should have asked before trying to find a way DSpace
> inside. =P
> Really thank you for your fast answer, Robin.
>
> Perhaps someone have tried a way of doing it. Anyone? (Even I ask, our
> conclusion is that developing this in DSpace is not that easy.)
>
> Yuri
>
> On Fri, Feb 13, 2009 at 10:43 AM, Robin Taylor <robin.taylor at ed.ac.uk
> <mailto:robin.taylor at ed.ac.uk>> wrote:
>
>     Hi Yuri,
>
>     Unfortunately Dspace doesn't have a type based submission. The best
>     you can do is what you described, have different collections for
>     different types. Sorry to not be of more help.
>
>     Robin.
>
>     Robin Taylor
>     Main Library
>     University of Edinburgh
>     Tel. 0131 6515208
>
>      > -----Original Message-----
>      > From: dspace-general-bounces at mit.edu
>     <mailto:dspace-general-bounces at mit.edu>
>      > [mailto:dspace-general-bounces at mit.edu
>     <mailto:dspace-general-bounces at mit.edu>] On Behalf Of Yuri
>      > Sent: 13 February 2009 12:20
>      > To: dspace-general at mit.edu <mailto:dspace-general at mit.edu>
>      > Subject: [Dspace-general] Displaying forms according to content type.
>      >
>      > Hi everyone.
>      >
>      > Let me introduce my self, once I'm new here and I don't know
>      > how much formal people are here. ;-)
>      >
>      > My name is Yuri Gomes Cardenas, I'm brazilian and study in a
>      > public university (<www.ufsc.br <http://www.ufsc.br>>) which is
>     located in the
>      > south, Florianópolis, Santa Catarina state. I work in a
>      > informatics laboratory (where we use, develop and promote
>      > free software) of the university and the project I'm engaged
>      > now has to do with a digital library with which we aim to
>      > give support to teachers of public high schools, of
>      > philosophy and sociology disciplines. After some search and
>      > attempts, we found DSpace and started learning how this
>      > software works.
>      >
>      > The question is:
>      >
>      > Does anyone know if DSpace has some native mechanism for
>      > displaying the submission forms according to the content
>      > type? That is, once I choose a "audio" content type, the next
>      > steps should display some set of field (obviously, related to
>      > this content type) and if I choose an "article", another set
>      > of fields (not necessarily completely different) are
>      > displayed. We already know that it's possible to change
>      > forms' fields according to Collections, but we do not think
>      > this would be the best way of doing that.
>      >
>      > And I hope my bad written english do not interfere my
>      > threads' understanding. =)
>      >
>      > Thanks in advance.
>      >
>      > Yuri Gomes Cardenas
>      >
>      >
>
>
>     --
>     The University of Edinburgh is a charitable body, registered in
>     Scotland, with registration number SC005336.
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Dspace-general mailing list
> Dspace-general at mit.edu
> http://mailman.mit.edu/mailman/listinfo/dspace-general




More information about the Dspace-general mailing list