Richard,

I've been testing the setter and have run into a problem. Here's the problem:

When I select 6 months, the submission fails. The date that it tries to set is 
earlier than the date of submission. For example, if I make the submission 
today (2010-05-06), it tries to set an embargo date of 2010-04-17.

When I select a date of 1 year, the submission succeeds, but the date is wrong. 
For example, if I make the submission today (2010-05-06), it tries to set an 
embargo date of 2010-05-23.

When I select 2 years, the submission fails. The date that it tries to set is 
earlier than the date of submission. For example, if I make the submission 
today (2010-05-06), it tries to set an embargo date of 2010-04-20.

Here is what I've done.

First, I added the DayTableEmbargoSetter.java to 
[DSOURCE]/dspace-api/target/classses/org/dspace/embargo

Next, I added to dspace.cfg the following line
embargo.terms.days = 6 months:180,1 year:365,2 years:730

and I changed the embargo setter line to say
plugin.single.org.dspace.embargo.EmbargoSetter = 
org.dspace.embargo.DayTableEmbargoSetter

Then, I added to input-forms.xml
<field>
         <dc-schema>dc</dc-schema>
           <dc-element>embargo</dc-element>
           <dc-qualifier>terms</dc-qualifier>
           <repeatable>false</repeatable>
           <label>Date of embargo duration</label>
           <input-type value-pairs-name="embargo_lengths">dropdown</input-type>
           <hint>Date when the embargo can be lifted.</hint>
           <required></required>
       </field>

and under form-value-pairs
    <value-pairs value-pairs-name="embargo_lengths" dc-term="type">
    <pair>
      <displayed-value>6 Months</displayed-value>
      <stored-value>6 months</stored-value>
    </pair>
    <pair>
        <displayed-value>1 Year</displayed-value>
        <stored-value>1 year</stored-value>
    </pair>
    <pair>
        <displayed-value>2 Years</displayed-value>
        <stored-value>2 years</stored-value>
    </pair>
   </value-pairs>

I've done all of the mvn and ant stuff correctly. Everything is in the place it 
should be. My system date is correct, and all of the other dates that get 
stored are correct.

Thanks for your help. The code looks to be very, very close. Not sure what is 
causing the inconsistency in setting dates. It could very well be something 
I've configured incorrectly. 


Jason Fowler, CA, MSLS
Archives and Special Collections Librarian
The Southern Baptist Theological Seminary
Vice President, ALABI
[email protected]
________________________________________
From: Richard Rodgers [[email protected]]
Sent: Tuesday, May 04, 2010 2:02 PM
To: Jason Fowler
Cc: [email protected]
Subject: Re: [Dspace-tech] Embargo setter plugin question

Hi Jason:

Bit of an email glitch in my last reply: looks like the text became an 
attachment. But the gist is:

I sent you a setter class (source and .class file) that I haven't tested, but 
might do what you are looking for.
Let me know if you have any problems, or if the set-up description is not clear.

It's fairly general, so if it works for you, we can include it in the next 
distribution.

Thanks,

Richard R


On May 3, 2010, at 11:27 AM, Jason Fowler wrote:

> Has anyone yet developed a custom Embargo setter for 1.6 that will mimic 
> UMI's embargo terms (6 months, 1 year, 2 years). If so, would you be willing 
> to share the code?
>
> Thanks,
> Jason Fowler, CA, MSLS
> Archives and Special Collections Librarian
> The Southern Baptist Theological Seminary
> Vice President, ALABI
> [email protected]
> ------------------------------------------------------------------------------
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech


------------------------------------------------------------------------------
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to