Re: [Dspace-tech] Embargo setter plugin question
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-schemadc/dc-schema dc-elementembargo/dc-element dc-qualifierterms/dc-qualifier repeatablefalse/repeatable labelDate of embargo duration/label input-type value-pairs-name=embargo_lengthsdropdown/input-type hintDate 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-value6 Months/displayed-value stored-value6 months/stored-value /pair pair displayed-value1 Year/displayed-value stored-value1 year/stored-value /pair pair displayed-value2 Years/displayed-value stored-value2 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 jfow...@sbts.edu From: Richard Rodgers [rrodg...@mit.edu] Sent: Tuesday, May 04, 2010 2:02 PM To: Jason Fowler Cc: DSpace-tech@lists.sourceforge.net 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 jfow...@sbts.edu -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] Embargo setter plugin question
DayTableEmbargoSetter.class Description: DayTableEmbargoSetter.class DayTableEmbargoSetter.java Description: DayTableEmbargoSetter.java Hi Jason: I haven't tested it, but here's a setter that might do what you want. I include both the source and class files (just put the latter in your classpath to try it out). To set it up do the following: (1) add a property in dspace.cfg embargo.terms.days = 6 months:182,1 year:365, 2 years:730 (you can use any language you want on the left-hand side: '6 months' can be 'ProQuest min' or whatever, it is the number of days after the ':' that matters) (2) In input_forms.xml, add a new 'value-pairs' element like: value-pairs value-pairs-name=UMI_embargo dc-term=embargo pair displayed-value6 months/displayed-value stored-value6 months/stored-value /pair pair displayed-value1 year/displayed-value stored-value1 year/stored-value /pair . Now, for whatever field you configured as embargo.field.terms, change it to use a 'dropdown' to that value-pair defined above. Let me know if this works for you, and if so, we can include it in the next release, as an option for all. 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 jfow...@sbts.edu -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
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 jfow...@sbts.edu -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] Embargo setter plugin question
Thanks, Richard! That looks great. I will give it a thorough testing and let you know what I find. Jason Fowler, CA, MSLS Archives and Special Collections Librarian The Southern Baptist Theological Seminary Vice President, ALABI jfow...@sbts.edu From: Richard Rodgers [rrodg...@mit.edu] Sent: Tuesday, May 04, 2010 2:02 PM To: Jason Fowler Cc: DSpace-tech@lists.sourceforge.net 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 jfow...@sbts.edu -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
[Dspace-tech] Embargo setter plugin question
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 jfow...@sbts.edu -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech