<%-- - edit-metadata-1.jsp - - Version: $Revision$ - - Date: $Date$ - - Copyright (c) 2001, Hewlett-Packard Company and Massachusetts - Institute of Technology. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - - Neither the name of the Hewlett-Packard Company nor the name of the - Massachusetts Institute of Technology nor the names of their - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. --%> <%-- - Edit metadata form, page 1 - - Attributes to pass in to this page: - submission.info - the SubmissionInfo object --%> <%@ page import="java.util.HashMap" %> <%@ page import="java.util.Iterator" %> <%@ page import="java.util.Map" %> <%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> <%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> <%@ page import="org.dspace.content.DCDate" %> <%@ page import="org.dspace.content.DCLanguage" %> <%@ page import="org.dspace.content.DCPersonName" %> <%@ page import="org.dspace.content.DCSeriesNumber" %> <%@ page import="org.dspace.content.DCValue" %> <%@ page import="org.dspace.content.Item" %> <%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> <% SubmissionInfo si = (SubmissionInfo) request.getAttribute("submission.info"); Item item = si.submission.getItem(); final int lastNameWidth = 23; final int firstNamesWidth = 23; final int formWidth = 50; %>

Submit: Describe Your Item

Please fill in the requested information about your submission below. In most browsers, you can use the tab key to move the cursor to the next input box or button, to save you having to use the mouse each time. (More Help...)

<%-- HACK: a
tag seems to be the only way to convince certain --%> <%-- browsers to center the table. --%>
<%-- ================================================ --%> <%-- Contributor.Author --%> <%-- ================================================ --%> <%-- Width hints used here to affect whole table --%> <% DCValue[] authors = item.getDC("contributor", "author", Item.ANY); int authorFieldCount = authors.length + 1; if (si.moreBoxesFor != null && si.moreBoxesFor.equals("contributor_author")) { authorFieldCount += 2; } for (int i = 0; i < authorFieldCount; i++) { DCPersonName dpn = (i < authors.length ? new DCPersonName(authors[i].value) : new DCPersonName() ); %> <% if (i == 0) { %> <% } else { %> <% } %> <% if (i < authors.length) { // Put a "remove" button next to all filled-in values %> <% } else if (i == authorFieldCount - 1) { // Put an "add more" button next to the last space (which is always // initially empty.) %> <% } else { // An empty space that isn't the last one %> <% } %> <% } %> <%-- HACK: Using this line to give the browser hints as to the widths of cells --%> <%-- ================================================ --%> <%-- Main title --%> <%-- ================================================ --%> <% // FIXME: (Maybe) Assumes a single main title DCValue[] titleArray = item.getDC("title", null, Item.ANY); String title = (titleArray.length > 0 ? titleArray[0].value : ""); %> <%-- ================================================ --%> <%-- Alternative titles --%> <%-- ================================================ --%> <% if (si.submission.hasMultipleTitles()) { %> <% DCValue[] altTitles = item.getDC("title", "alternative", Item.ANY); int altTitleFieldCount = altTitles.length + 1; if (si.moreBoxesFor != null && si.moreBoxesFor.equals("title_alternative")) { altTitleFieldCount += 2; } for (int i = 0; i < altTitleFieldCount; i++) { String val = ""; if (i < altTitles.length) { val = altTitles[i].value; } %> <%-- HACK: nowrap used since browsers do not act on "white-space" CSS property --%> <% if (i == 0) { %> <% } else { %> <% } %> <% if (i < altTitles.length) { // Put a "remove" button next to all filled-in values %> <% } else if(i == altTitleFieldCount - 1) { // Put an "add more" button next to the last space (which is always // initially empty.) %> <% } else { // An empty space that isn't the last one %> <% } %> <% } %> <% } %> <%-- ================================================ --%> <%-- date.issued --%> <%-- ================================================ --%> <% if (si.submission.isPublishedBefore()) { %> <% DCValue[] dateIssuedArray = item.getDC("date", "issued", Item.ANY); DCDate dateIssued = new DCDate( (dateIssuedArray.length > 0 ? dateIssuedArray[0].value : "")); %> <%-- HACK: nowrap used since browsers do not act on "white-space" CSS property --%> <% } %> <%-- ================================================ --%> <%-- relation.ispartofseries --%> <%-- ================================================ --%> <% DCValue[] seriesNumbers = item.getDC("relation", "ispartofseries", Item.ANY); int seriesNumberFieldCount = seriesNumbers.length + 1; if (si.moreBoxesFor != null && si.moreBoxesFor.equals("relation_ispartofseries")) { seriesNumberFieldCount += 2; } for (int i = 0; i < seriesNumberFieldCount; i++) { DCSeriesNumber sn = (i < seriesNumbers.length ? new DCSeriesNumber(seriesNumbers[i].value) : new DCSeriesNumber()); %> <% if (i == 0) { %> <% } else { %> <% } %> <% if (i < seriesNumbers.length) { // Put a "remove" button next to all filled-in values %> <% } else if(i == seriesNumberFieldCount - 1) { // Put an "add more" button next to the last space (which is always // initially empty.) %> <% } else { // An empty space that isn't the last one %> <% } %> <% } %> <%-- ================================================ --%> <%-- Identifiers --%> <%-- ================================================ --%> <% // Names of each identifier type // FIXME: Maybe should draw from DC registry? Map identifierQualNames = new HashMap(); identifierQualNames.put("govdoc", "Gov't Doc #"); identifierQualNames.put("uri", "URI"); identifierQualNames.put("isbn", "ISBN"); identifierQualNames.put("issn", "ISSN"); identifierQualNames.put("ismn", "ISMN"); identifierQualNames.put("other", "Other"); DCValue[] identifiers = item.getDC("identifier", Item.ANY, Item.ANY); %> <% int identifierFieldCount = identifiers.length + 1; if (si.moreBoxesFor != null && si.moreBoxesFor.equals("identifier")) { identifierFieldCount += 2; } for (int i = 0; i < identifierFieldCount; i++) { String currentQual = ""; String currentValue = ""; if (i < identifiers.length) { currentQual = identifiers[i].qualifier; currentValue = identifiers[i].value; } if (i == 0) { %> <%-- HACK: nowrap used since browsers do not act on "white-space" CSS property --%> <% } else { %> <% } %> <%-- Qualifier pull-down --%> <% if (i < identifiers.length) { // Remove button next to filled-in values %> <% } else if (i == identifierFieldCount - 1) { // "Add more" button on last line %> <% } else { // Empty space %> <% } %> <% } %> <%-- ================================================ --%> <%-- Language --%> <%-- ================================================ --%> <% // FIXME: (Maybe) assume one language String[] defLanguages = {"en_US", "en", "es", "de", "fr", "it", "ja", "zh", "other", ""}; DCValue[] langArray = item.getDC("language", "iso", Item.ANY); String lang = (langArray.length > 0 ? langArray[0].value : ""); %>
<% if (si.jumpToField != null && si.jumpToField.equals("contributor_author")) { %> <% } %> Enter the names of the authors of this item below.
  Last name
e.g. Smith
First name(s) + "Jr"
e.g. Donald Jr
 
Authors  size=<%= lastNameWidth %> value="<%= dpn.getLastName() %>"> size=<%= firstNamesWidth %> value="<%= dpn.getFirstNames() %>"> value="Remove This Author"> 
     
Enter the main title of the item.
Title value="<%= title %>">  
 
<% if (si.jumpToField != null && si.jumpToField.equals("title_alternative")) { %> <% } %> If the item has any alternative titles, please enter them below.
Other titles  size=<%= formWidth %> value="<%= val %>"> value="Remove This Value"> 
 
Please give the date of previous publication or public distribution below. You can leave out the day and/or month if they aren't applicable.
Date of Issue Month: Day:"> Year:">  
 
<% if (si.jumpToField != null && si.jumpToField.equals("relation_ispartofseries")) { %> <% } %> Enter the series and number assigned to this item by your community.
  Series Name Report or Paper No.  
Series/Report No.  size=<%= lastNameWidth %> value="<%= sn.getSeries() %>"> size=<%= firstNamesWidth %> value="<%= sn.getNumber() %>"> value="Remove This Value"> 
 
<% if (si.jumpToField != null && si.jumpToField.equals("identifier")) { %> <% } %> If the item has any identification numbers or codes associated with it, please enter the types and the actual numbers or codes below.
Identifiers    size=34 value="<%= currentValue %>"> value="Remove This Value"> 
 
Select the language of the main content of the item. If the language does not appear in the list below, please select "Other". If the content does not really have a language (for example, if it is a dataset or an image) please select "N/A".
Language  
<%-- HACK: Need a space - is there a nicer way to do this than
or a --%> <%-- blank

? --%>

 

<%-- Hidden fields needed for submit servlet to know which item to deal with --%> <%= SubmitServlet.getSubmissionParameters(si) %> >