« December 2007 | Main | February 2008 »

January 25, 2008

Hardwire jsp initial questions

The initial questions checkbox on submit workflow needed to be hardwired. So I made all the buttons hidden and used javascript to automatically submit the form. This is a quick and dirty way to hardwire the values in a jsp form.
Original initial-questions.jsp

Hardwired version

Plan to add email field to name type in dspace submit

Currently the name type that is used to generate forms in dspace has two text fields (first and last name). We need a third field for email and below are the steps that must be taken to create this field.


1) Copy edit-metadata.jsp to local -> confirm that new jsp is "live"

2) Confirm edu.umn.dspace.submit.step.DescribeStep is alive

3) Make "email_name" type from "name" type ... do not modify any code in "email_name" yet

4) Drop DCPersonName in "email_name" replace with string

5) Add three text fields to "email_name" in edit-metadata.jsp

6) Fix string in "email_name" code in edu.umn.dspace.submit.step.DescribeStep to handle 3rd field

January 11, 2008

Remove questions from the verify page

Louise Letnes and Julia Kelly wanted the the following questions removed from the verify page.

1) Is there more than one title?
2) Is there more than one file?
3) Was the item previously published?

Code in the file review-init.jsp had to be modified:
<!-- Louise Letnes and Julia Kelly did not want to have these initial questions asked at the top of the verify page. <table width="100%"> <tr> <td width="100%"> <table> <tr> <td class="metadataFieldLabel"><fmt:message key="jsp.submit.review.init-question1"/></td> <td class="metadataFieldValue"><%= (subInfo.getSubmissionItem().hasMultipleTitles() ? LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.review.state1") : LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.review.state2")) %></td> </tr> <tr> <td class="metadataFieldLabel"><fmt:message key="jsp.submit.review.init-question2"/></td> <td class="metadataFieldValue"><%= (subInfo.getSubmissionItem().isPublishedBefore() ? LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.review.state1") : LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.review.state2")) %></td> </tr> <tr> <td class="metadataFieldLabel"><fmt:message key="jsp.submit.review.init-question3"/></td> <td class="metadataFieldValue"><%= (subInfo.getSubmissionItem().hasMultipleFiles() ? LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.review.state1") : LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.review.state2")) %></td> </tr> </table> </td> <td valign="middle"> <input type="submit" name="submit_jump_<%= stepJump %>" value="<fmt:message key="jsp.submit.review.button.correct"/>" /> </td> </tr> </table>-->

Remove upload messages from AgEcon page

Remove upload messages from AgEcon page

The file choose-file.jsp had to be modified: <%-- <p class="submitFormHelp"><strong>Netscape users please note:</strong> By default, the window brought up by clicking "Browse..." will only display files of type HTML. If the file you are uploading isn't an HTML file, you will need to select the option to display files of other types. <object><dspace:popup page="/help/index.html#netscapeupload">Instructions for Netscape users</dspace:popup></object> are available.</p> --%> <%-- Louise Letnes and Julia Kelly wanted these messages deleted from the top of the upload page <div class="submitFormHelp"><fmt:message key="jsp.submit.choose-file.info3"/> <dspace:popup page="/help/index.html#netscapeupload"><fmt:message key="jsp.submit.choose-file.info4"/></dspace:popup></div> --%> <%-- FIXME: Collection-specific stuff should go here? --%> <%-- <p class="submitFormHelp">Please also note that the DSpace system is able to preserve the content of certain types of files better than other types. <object><dspace:popup page="/help/formats.jsp">Information about file types</dspace:popup></object> and levels of support for each are available.</p> --%> <%-- <div class="submitFormHelp"><fmt:message key="jsp.submit.choose-file.info6"/> <dspace:popup page="/help/formats.jsp"><fmt:message key="jsp.submit.choose-file.info7"/></dspace:popup> </div> --%>

January 10, 2008

More changes to Ag Econ Submit ... drop checksum, publisher and citation

Get rid of checksum in upload

I removed the checksum information from the upload page:

The following region has been commented out: <%-- The code below that produces output of checksum information has been comment out on the request of Louise Letnes and Julia Kelly. J Silvis <% if (!subInfo.isInWorkflow()) { %> <p class="uploadHelp"><fmt:message key="jsp.submit.upload-file-list.info3"/></p> <ul class="uploadHelp"> <li class="uploadHelp"><fmt:message key="jsp.submit.upload-file-list.info4"/></li> <% if (showChecksums) { %> <li class="uploadHelp"><fmt:message key="jsp.submit.upload-file-list.info5"/> <dspace:popup page="/help/index.html#checksum"><fmt:message key="jsp.submit.upload-file-list.help1"/></dspace:popup></li> <% } else { %> <li class="uploadHelp"><fmt:message key="jsp.submit.upload-file-list.info6"/> <dspace:popup page="/help/index.html#checksum"><fmt:message key="jsp.submit.upload-file-list.help2"/></dspace:popup> <input type="submit" name="submit_show_checksums" value="<fmt:message key="jsp.submit.upload-file-list.button3"/>" /></li> <% } %> </ul> <br /> <% } %> --%>

Get rid of citation and publisher in describe page

This step required the following change in InitialQuestionsStep.java
// Louise Letnes and Julia Kelly want to drop citation and pulisher. However they // want to keep date.issued so the logic below must be commented // out. // // J. Silvis willRemoveDate = (dateIssued.length > 0); // || (citation.length > 0) || (publisher.length > 0); }
Also the following change was required in DCInputSet.java public boolean isDefinedPubBefore() { return ( isFieldPresent("date.issued")); // Louise Letnes and Julia Kelly wants to drop citation and pulisher. However they // want to keep date.issued so the logic below must be commented // out. // // J. Silvis // && // isFieldPresent("identifier.citation") // && // isFieldPresent("publisher.null") ); }

January 7, 2008

rsync and expect

Using expect to rsync the directory /Users/silvi003/Documents/workspace/dspace-sr
over ssh using the password $ThePassWord

#!/usr/bin/expect spawn rsync -a --delete -e ssh /Users/silvi003/Documents/workspace/dspace-sr silvi003@odin.lib.umn.edu:/home/silvi003/src expect "password:" send "$ThePassWord\r" expect eof

Changes to AGEcon Submit -- First Set of Changes

I) Fields to add

1) Items to modify

Here are all the meta data for the agecon project The items labeled must be added to the submit form.
These items are:
A) hasEndPage
B) hasStartPage
C) ispartofname
D) ispartofnumber
C) ispartoftitle
D) ispartofvolume

B) Changes to the java code

Needed to modify the code shown below in from the Item.java class : public DCValue[] getDC(String element, String qualifier, String lang) { DCValue[] MetaData = getMetadata(MetadataSchema.DC_SCHEMA, element, qualifier, lang); if (MetaData.length == 0) MetaData = getMetadata("agecon", element, qualifier, lang); // return getMetadata(MetadataSchema.DC_SCHEMA, element, qualifier, lang); return MetaData; } This allows the software to recognize both agecon elements and dc, so the items will appear in in the verify step.

2) Making changers so that new items appear in search

A) In the file /config/dspace.cfg add lines to webui.itemdisplay.default so that it has the form below: webui.itemdisplay.default = dc.title, dc.title.alternative, \ dc.contributor.author, \ agecon.contributor.authorContact, \ dc.contributor.editor, \ agecon.contributor.editorContact, \ dc.subject, dc.date.issued(date), \ dc.relation.ispartofseries, \ dc.description.abstract, \ dc.description, \ agecon.relation.ispartoftitle, \ agecon.relation.ispartofnumber, \ agecon.relation.ispartofvolume, \ agecon.relation.ispartofname, \ agecon.format.hasStartPage, \ agecon.format.hasEndPage, \ dc.format.extent, \ dc.relation B) In the file config/language-packs/Messages.properties add: metadata.agecon.relation.ispartoftitle = Journal Title metadata.agecon.relation.ispartofnumber = Journal Number metadata.agecon.relation.ispartofvolume = Journal Volume metadata.agecon.relation.ispartofname = Journal Issue metadata.agecon.format.hasStartPage = From Page metadata.agecon.format.hasEndPage = To Page

All the new items are now visible in the dspace search.

II) Move License to the front

In the file item-submission.xml create a new Submisssion Processs with the license first. Make this submission process thew default.

III) Combine two description pages

By eliminating the xml below that separated two description pages (in the file input-forms.xml). I was able to combine two of the description pages. </page> <page number="2">

January 2, 2008

Possible ant builds for dspace

ant compile
ant build_wars
ant update
ant install_code
ant init_configs
ant setup_database
ant clean_database
ant load_registries
ant fresh_install
ant clean
ant public_api
ant javadoc