From 16c8dc047b9ba93f0d63a50e11201b2250ab4e6a Mon Sep 17 00:00:00 2001 From: Robert Tansley Date: Mon, 22 Jul 2002 17:38:21 +0000 Subject: [PATCH] Cleaned-up submission UI git-svn-id: http://scm.dspace.org/svn/repo/trunk@232 9c30dcfa-912a-0410-8fc2-9e0234be79fd --- dspace/config/dspace.cfg | 5 + dspace/etc/database_schema.sql | 12 + dspace/jsp/WEB-INF/dspace-tags.tld | 5 - .../{config/templates => jsp/WEB-INF}/web.xml | 11 +- dspace/jsp/error/authorize.jsp | 64 + dspace/jsp/error/integrity.jsp | 82 + dspace/jsp/image/submit/complete-current.gif | Bin 0 -> 1324 bytes dspace/jsp/image/submit/complete-done.gif | Bin 0 -> 1826 bytes dspace/jsp/image/submit/complete-notdone.gif | Bin 0 -> 1228 bytes dspace/jsp/image/submit/describe-current.gif | Bin 0 -> 1304 bytes dspace/jsp/image/submit/describe-done.gif | Bin 0 -> 1798 bytes dspace/jsp/image/submit/describe-notdone.gif | Bin 0 -> 1257 bytes dspace/jsp/image/submit/license-current.gif | Bin 0 -> 1252 bytes dspace/jsp/image/submit/license-done.gif | Bin 0 -> 1769 bytes dspace/jsp/image/submit/license-notdone.gif | Bin 0 -> 1187 bytes dspace/jsp/image/submit/upload-current.gif | Bin 0 -> 1260 bytes dspace/jsp/image/submit/upload-done.gif | Bin 0 -> 1772 bytes dspace/jsp/image/submit/upload-notdone.gif | Bin 0 -> 1180 bytes dspace/jsp/image/submit/verify-current.gif | Bin 0 -> 1222 bytes dspace/jsp/image/submit/verify-done.gif | Bin 0 -> 1740 bytes dspace/jsp/image/submit/verify-notdone.gif | Bin 0 -> 1158 bytes dspace/jsp/layout/footer-default.jsp | 11 +- dspace/jsp/layout/header-default.jsp | 10 +- dspace/jsp/submit/cancel.jsp | 108 + dspace/jsp/submit/cancelled-removed.jsp | 57 + dspace/jsp/submit/change-file-description.jsp | 112 + dspace/jsp/submit/choose-file.jsp | 146 ++ dspace/jsp/submit/complete.jsp | 65 + dspace/jsp/submit/edit-metadata-1.jsp | 625 +++++ dspace/jsp/submit/edit-metadata-2.jsp | 274 ++ dspace/jsp/submit/get-file-format.jsp | 168 ++ dspace/jsp/submit/initial-questions.jsp | 150 ++ dspace/jsp/submit/license-rejected.jsp | 62 + dspace/jsp/submit/no-theses.jsp | 79 + dspace/jsp/submit/progressbar.jsp | 159 ++ dspace/jsp/submit/review.jsp | 445 ++++ dspace/jsp/submit/saved.jsp | 58 + dspace/jsp/submit/select-collection.jsp | 119 + dspace/jsp/submit/show-license.jsp | 101 + dspace/jsp/submit/show-uploaded-file.jsp | 209 ++ .../jsp/submit/thesis-removed-workaround.jsp | 66 + dspace/jsp/submit/upload-error.jsp | 85 + dspace/jsp/submit/upload-file-list.jsp | 248 ++ dspace/jsp/submit/verify-prune.jsp | 147 ++ .../app/webui/servlet/SubmitServlet.java | 2327 +++++++++++++++++ .../dspace/app/webui/util/SubmissionInfo.java | 75 + .../src/org/dspace/app/webui/util/UIUtil.java | 123 +- dspace/src/org/dspace/content/DCLanguage.java | 145 + .../org/dspace/content/DCSeriesNumber.java | 137 + .../org/dspace/content/FormatIdentifier.java | 122 + dspace/src/org/dspace/content/Item.java | 2 +- .../org/dspace/core/ConfigurationManager.java | 2 +- 52 files changed, 6596 insertions(+), 20 deletions(-) rename dspace/{config/templates => jsp/WEB-INF}/web.xml (95%) create mode 100644 dspace/jsp/error/authorize.jsp create mode 100644 dspace/jsp/error/integrity.jsp create mode 100644 dspace/jsp/image/submit/complete-current.gif create mode 100644 dspace/jsp/image/submit/complete-done.gif create mode 100644 dspace/jsp/image/submit/complete-notdone.gif create mode 100644 dspace/jsp/image/submit/describe-current.gif create mode 100644 dspace/jsp/image/submit/describe-done.gif create mode 100644 dspace/jsp/image/submit/describe-notdone.gif create mode 100644 dspace/jsp/image/submit/license-current.gif create mode 100644 dspace/jsp/image/submit/license-done.gif create mode 100644 dspace/jsp/image/submit/license-notdone.gif create mode 100644 dspace/jsp/image/submit/upload-current.gif create mode 100644 dspace/jsp/image/submit/upload-done.gif create mode 100644 dspace/jsp/image/submit/upload-notdone.gif create mode 100644 dspace/jsp/image/submit/verify-current.gif create mode 100644 dspace/jsp/image/submit/verify-done.gif create mode 100644 dspace/jsp/image/submit/verify-notdone.gif create mode 100644 dspace/jsp/submit/cancel.jsp create mode 100644 dspace/jsp/submit/cancelled-removed.jsp create mode 100644 dspace/jsp/submit/change-file-description.jsp create mode 100644 dspace/jsp/submit/choose-file.jsp create mode 100644 dspace/jsp/submit/complete.jsp create mode 100644 dspace/jsp/submit/edit-metadata-1.jsp create mode 100644 dspace/jsp/submit/edit-metadata-2.jsp create mode 100644 dspace/jsp/submit/get-file-format.jsp create mode 100644 dspace/jsp/submit/initial-questions.jsp create mode 100644 dspace/jsp/submit/license-rejected.jsp create mode 100644 dspace/jsp/submit/no-theses.jsp create mode 100644 dspace/jsp/submit/progressbar.jsp create mode 100644 dspace/jsp/submit/review.jsp create mode 100644 dspace/jsp/submit/saved.jsp create mode 100644 dspace/jsp/submit/select-collection.jsp create mode 100644 dspace/jsp/submit/show-license.jsp create mode 100644 dspace/jsp/submit/show-uploaded-file.jsp create mode 100644 dspace/jsp/submit/thesis-removed-workaround.jsp create mode 100644 dspace/jsp/submit/upload-error.jsp create mode 100644 dspace/jsp/submit/upload-file-list.jsp create mode 100644 dspace/jsp/submit/verify-prune.jsp create mode 100644 dspace/src/org/dspace/app/webui/servlet/SubmitServlet.java create mode 100644 dspace/src/org/dspace/app/webui/util/SubmissionInfo.java create mode 100644 dspace/src/org/dspace/content/DCLanguage.java create mode 100644 dspace/src/org/dspace/content/DCSeriesNumber.java create mode 100644 dspace/src/org/dspace/content/FormatIdentifier.java diff --git a/dspace/config/dspace.cfg b/dspace/config/dspace.cfg index ca00effd10..b9a74dc52f 100644 --- a/dspace/config/dspace.cfg +++ b/dspace/config/dspace.cfg @@ -94,3 +94,8 @@ webui.site.authenticator = edu.mit.dspace.MITAuthenticator # omitted, SFX support is switched off. sfx.server.url = http://owens.mit.edu:8888/sfx_local? + +##### Ingest settings ##### + +# Default language for content of submissions +default.language = en_US diff --git a/dspace/etc/database_schema.sql b/dspace/etc/database_schema.sql index 14dbc9a7da..9c1546489a 100644 --- a/dspace/etc/database_schema.sql +++ b/dspace/etc/database_schema.sql @@ -64,6 +64,18 @@ CREATE TABLE BitstreamFormatRegistry internal BOOL ); +------------------------------------------------------- +-- FormatIdentifier table +------------------------------------------------------- +DROP TABLE FormatIdentifier; + +CREATE TABLE FormatIdentifier +( + id INTEGER PRIMARY KEY, + bitstream_format_id INTEGER REFERENCES BitstreamFormatRegistry(bitstream_format_id), + extension VARCHAR(16) +); + ------------------------------------------------------- -- Bitstream table ------------------------------------------------------- diff --git a/dspace/jsp/WEB-INF/dspace-tags.tld b/dspace/jsp/WEB-INF/dspace-tags.tld index 2953d284a4..761fbc4933 100644 --- a/dspace/jsp/WEB-INF/dspace-tags.tld +++ b/dspace/jsp/WEB-INF/dspace-tags.tld @@ -54,11 +54,6 @@ http://www.dspace.org/dspace-tags.tld DSpace JSP tags - - @@ -134,6 +132,10 @@ org.dspace.app.webui.servlet.SimpleSearchServlet + + submit + org.dspace.app.webui.servlet.SubmitServlet + @@ -193,6 +195,11 @@ /simple-search + + submit + /submit + + diff --git a/dspace/jsp/error/authorize.jsp b/dspace/jsp/error/authorize.jsp new file mode 100644 index 0000000000..7471ad06d0 --- /dev/null +++ b/dspace/jsp/error/authorize.jsp @@ -0,0 +1,64 @@ +<%-- + - authorize.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. + --%> + +<%-- + - Page representing an authorization error + --%> + +<%@ page isErrorPage="true" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + + + +

Authorization Required

+ +

You do not have permission to perform the action you just attempted.

+ +

If you think you should have authorization, please feel free to + contact the DSpace administrators:

+ + <%@ include file="/components/contact-info.jsp" %> + +

+ Go to the DSpace home page +

+ +
diff --git a/dspace/jsp/error/integrity.jsp b/dspace/jsp/error/integrity.jsp new file mode 100644 index 0000000000..6fdb04f3e2 --- /dev/null +++ b/dspace/jsp/error/integrity.jsp @@ -0,0 +1,82 @@ +<%-- + - internal.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. + --%> + +<%-- + - Page representing an integrity error - an inconsistency or error in the + - data received from the browser + --%> + +<%@ page isErrorPage="true" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + + +

System Error: Malformed Request

+ +

There was an inconsistency in the data received from your browser. + This may be due to one of several things:

+ +
    +
  • Sometimes, if you used your browser's "back" button during an operation like a + submission, clicking on a button may try and do something that's already + been done, such as commit the submission to the archive. + Clicking your browsers "reload" or "refresh" button may have similar + results.
  • +
  • If you got here by following a link or bookmark provided by someone + else, the link may be incorrect or you mistyped the link. Please check + the link and try again.
  • +
  • If you have more than one browser window open with DSpace, this can cause + a similar problem whereby a button clicked in one window may make a button + click in the other window invalid.
  • +
  • Of course, you may have uncovered a problem with the system! All of + these errors are logged, and we'll be checking them regularly to see + if there is a problem.
  • +
+ +

If the problem persists, please contact the DSpace site administrators:

+ + <%@ include file="/components/contact-info.jsp" %> + +

+ Go to the DSpace home page +

+ + +
diff --git a/dspace/jsp/image/submit/complete-current.gif b/dspace/jsp/image/submit/complete-current.gif new file mode 100644 index 0000000000000000000000000000000000000000..2af37be7ef98fcda6927682de22a21d30f0e512f GIT binary patch literal 1324 zcmV+{1=IRRNk%v~VPF6s0LB0S|NsB~{r&#?`~3Cw`|$Al?(X{M=lbR4{r2|!@$viW z>iFN^@v^e&jg9Dqh3Sfl>WhozaB$^va{1uk_Rr7rz`*XKqv2Rs+BY}ZGBVmVHQF;X z*)A^m;^Otn%J8qR>z0=2fr0qh+3~oz>y(t`badfdT=&-2=!1jdUS8cqMEvvf=YD?R zRaM(OJpK6i`Q+sCxw+dqI`z)Z;$L6gNlEITpY67`;9g$mii+{HwB~nr-AG9H_xJ6b zoZC1!@ypBg$jIr4h~G|5s-bqRDt*z~%qV1rd?341ejE# zc(h;>!U7l=0~99GML@&|5+zJrT*xU5E4I6L!;KyjZ{%nhhs_u&2n-E4;e*DHi9mYf zsIkFD4B|SC1Ah96>?_;uVpE5=t!L0tZY))*3xIoYqcglRf4ehowo^PGY2ixLSt( z)llGwdf|WsY8!;6+&oNh;KC9RCh=f|6IN(Xdi1Qun_fZ+iQIG-vi|58Wb!Gt+lALT zIUPMU-k4)}4{VvIqy*=3)tcG_&C?e^Mlw+;8& icHDu79blYM3)Z<gcol3;fOC12mm{{-I788 literal 0 HcmV?d00001 diff --git a/dspace/jsp/image/submit/complete-done.gif b/dspace/jsp/image/submit/complete-done.gif new file mode 100644 index 0000000000000000000000000000000000000000..e7836e851984336979ec25254cc14cea16bdf7f1 GIT binary patch literal 1826 zcmeH`c~g=J0LEVe6cY&qj}p(kbs9X%BQ;(`@gB-7D>F$molIFX&2m~;Krsiy*2*gv zuSB=Q%u%}`E$Ol~&GAe;P`ttWcI#8@Kl^-v-!s2w9*VEGvlA@>Fa*W`V0(LeYjbmJ zeSKqbab2NUpP5-38(WjfHkXz*l*;vqiIsr?Wo_*Qk09WMcRjG98 z>(_aaXr`=eFf_Es$*J4kzGwgb9tVf+efw62h8915R6Kq>dFPIt$&@7|NP~m>eS8Lv z92pD?8;Xpa6$)o6D_6R^m5q&)xw*2Wq#uES!%(`|rA-!&Ht0NWYdAW3y0mnCYHD+BZSKX3k=WR&{QQxN7yCeP zsl9!nsc9@NZK0)Qxuaw79apiqPQn{jH2hHqC)y;=-*sIKW34U65oBS^!7yS5*=NoYl@39zWm+ zR}HNLe~uOi!nL$&q%2fOsF*6aHkWF4(`nC>D$L=bE~_Fhd|P>C+7g1nb1L0^4!f0{ zd=*xtZbs#xJZh-ovfwZ#T-!`80<}-zMSPyBejBVP5T9d>1swfh7-5ev@@Z9PEIZpr z7c+UAg0p*=i^P0lqRcj~avqCz`cI+mUOmV!1Ox>a|MC)?n7zHalPr64?}yyH8lqS7 zn534M_2_vv$=a&IIxjP_;KD7vnEJmbPEBKy!jW|F*o=A`u3_}KjaD#{%uwAGlLOfq z;Hp-U`^6-OU8}onQ_J(}>m%299LOP8ebqdCsUhDyS9a&LwpEk1hhrC&=QJvb7JeFi zVD}~v=4$iaiREX334Fb~;yZFvcZ9EEEb-DYwG~4%5#s^NMDtRi$yOGOMq%oBq?Np5 zrC_6$`?1Ha(9%`(8==UEu(l?+l}@}1xCOB^Vk-J0;85c*r5DOlp0e6MR?!fCZPvIs zR2Rt@glbc{b}Hy71R5Bq40dE-TR{u`%bln1GPI(v*ugZYBXp*k$4k1mzir5yZ;Ks~ zXEqIz*pE~VYd(0NQmU)bn^3_7MmjWBCkMaFYI14((U%YimbGMpoB$APlk%NPS_4W0E zfdRQ(u23kJmX?NwhBh`fR4Nsp&mSBd92*-OA0Piv@jpcbKKSnipsURQm|595tS7lo z^YROx6+SOw7r!XUhB3>4@}D`CFRLnksi}U&fgxe#r7Rc-!4U`@U7ecHmo55p=a!6@UHH+_d12;abH!W zD5`P!cvpQNa%_aF9Z%O$!ywi4M+f3)J;_B(_8mMEJ%ulM&(9nIs8DXpY1%pn=<^GC z-p%&|Tn*DdwrUH9BRv>BcoW-9HP(?Lk)I@w)ssOmeKlv@Izhp0f=ruv0RQooS8}U3#>G)(GNZhn`NLuZ zH!!onO<)Cgh$hG|>ftEaqXHlATspuws=No(0bf34zj4mJN4gnRMqeCg73Af|aulpy zt1@Y7)hvE48NYfMmv_}#D+KR{^hF~RiGfC4KW-2TDzLo@n}Ch6A6vkQWdl6i^>?WZZy4jlW?nx6ok^Fp*H`Z zTr+c%sv%fbjFE)a;ZC#Gbgte1ho zwqJ?2sqIRZ9a+a%q=F2w*Gb^&XYJkoNC6xK G{Qd<*J-WUC literal 0 HcmV?d00001 diff --git a/dspace/jsp/image/submit/describe-current.gif b/dspace/jsp/image/submit/describe-current.gif new file mode 100644 index 0000000000000000000000000000000000000000..e9eb41dc1ed2a6ac5528f1c717f4fa3ad5f6445e GIT binary patch literal 1304 zcmV+z1?T!lNk%v~VPF6s0LB0S|NsB~{r&#?`~3Cw`|$Al?(X{M=lbR4{r2|!@$viW z>iFN^@v^e&jg9Dqh3Sfl>WhozaB$^va{1uk_Rr7rz`*XKqv2Rs+BY}ZGBVmVHQF;X z*)A^m;^Otn%J8qR>z0=2fr0qh+3~oz>y(t`badfdT=&-2=!1jdUS8cqMEvvf=YD?R zRaM(OJpK6i`Q+sCxw+dqI`z)Z;$L6$ySw6GVDYrH=6849NJ#CRoZC1!?xdvm(b3*X zN%hFc>4=EmPEPgA%=5y+;$dOgEG+xz=-^jZ-9|>=Qc~C{Dc?{~?Vg_TwzlSZdF+>$ z+&w+=y}jv%hWOjt_t@C-ySwa}ndEJ4+(AM1)6?|B!{>Z_;8Rok?CkW%$MnU;@2IHm zr>Fh;`uEh-;aXby>FMTmb?cCj?xm&kzP{sVXx>dt41ejE#4>0%O3!M7juw7(t?h35_sg%9JU?#Tqtk(o8U^NC1HoA5f%FF|(-A zqy1e9izt z!)nGFc=0x{q1K;`8hjhn$QmR>nlfJtiM@d%$JvaB`1Wmw0|1T?T$h6wxs5+uWE&HMy4c&*wpKN~#+U2cbbwdBk` zc;KjfIdcO+JdP*tA^9Q)BwL0Q7$juKkP0M-xG3_wU**9@0MtmH-G+P|)?WiKQX{_X z{gzRO*?#>2z?Xge#n)X$MYuo&2^E+p#1Tj!k%S8zD4|4q{JeKvc0TO4L1n}JH5?B{ zT&7xe_rYddW|v*p!v;O1xWR`QX~=;KNmO_Qg%)C{A%~R7msuhD3I5WfCmpO;hRRNwWHc#GU_*&a_u;o+;G=P8RdYjCHm-%#$i<3ZK0jO1QCxxR)`U; z4XEUS1SWTx5AiA4&TNxr)+(v5wW{VtoOuSCVlXt}L=G_JrB`=m*1$ulH|Dk61~%|u ztYm^62UxOy)v#={H86=$VTUC~h))zeK?D@8m5UTxZowr;STIB(#S!MlE7Mk8d0Pln zQ!o$$yz=&Iky1=Kg-AnGFdzjH{w7@0O*!qPt|1LgQN}98(x%A3(~n*qKg=C3qZ-- Obk}Y7-FPn&2mm|O1CZnZ literal 0 HcmV?d00001 diff --git a/dspace/jsp/image/submit/describe-done.gif b/dspace/jsp/image/submit/describe-done.gif new file mode 100644 index 0000000000000000000000000000000000000000..f830014cdd220c8eff02ef23fc08fd81c274aa45 GIT binary patch literal 1798 zcmeH``CHNl0EfSbD4HS&k}l86v}J}`p=QMw5jCen^Pn<|VNRbOllhqD=Hnm{>AH$JX?@L-O|Q)Xw+UcEYZ?V6mykS8a9 zk;zuxyjc{9)U~w}RO&DuKjiK{eBi*ahsThs>zB#N<(?kR{rmHUg-RAno|Ggzetaw- zU_2~rB074KPXE~0sBUP`4Gn4A+voXwc}mKM;NYp)*iX-%Ep>K&9vDz&WlhAyjFCti zI^Fu>q9QX>77;Px0Dza5S8i_Z zLV5X!r)P3<^3>GSa(DMEmpdL3^0B!&A|j%zt84l7>&1?aAr}|j$cT-NjVvl^j7%Qf zy?dNOS*WbkwzbWqr>lyJMh_pJ<#0X^4o=0zE!5PksZ<-QtDl}cnNCPhm6S{;CXRyO z%KP_A5{V)sW2vj_bASKD$&;(IvojYj&gbQ+>+2VvKOZ9!r{d%1Z{8fj;YN=h)wHyH z2n_rX6r{O(ccH3ERaW**!TRpKl-`upf^VYMU&x#L** zAdcw=fxEx;vpq}bmAz!Crrg%k1!Vm$*>Yab>O zB(iJ#dD~A5S`*$i{7~)9>)8)C^#n_cAz_ZayfS1OwwO?TIeUwxd%Q?UgXXj)jdfJ) zd3a&;Ns4y(ub?910+;aq?h@aIToV|aaS)SNm6c;=PvlyHHS8;BXG&f7(-R(wHJMvYW)O}5e2tufskR91~P2dWRp0d%sNjcc#0 z$wS;mgy_d+6oa)dx$xcLn}ePqmD^dntW^35l%M^7VnZ%8>X?{ zvI&mfIcp5l^pFPUi#V*)Kz~Pu>HFHImeW`!_|b#NR00#pMtF52C%EPgwGF?#?O56!E zq_(AHl!dMD3VY@wBddQQKJN9p~CyqTuqQ z#AA2Pfl-eW_5uFNOSorM_tJ$`_g{L?W5P^GOhdEye28%ZakspIOzmT!LY-Oel6SVD z%@z?yToMZ@kDKYQoZb&1i()RP*O{Esy**ospV7_mcR@vJ0ab9FeuG*nkn;Ji6|KG? z;zS(?Pws;m1!@SBgJvb%nyW76Y#UgNPLqu_ySW!nL`PntaSUwQp=y(}(R~t_)tkNT zgiVOEJxeo2fk7RjwSEX^C0;kEsDBvq+eZf})zXAH0mX)J-3*Yia3o>)){pxEbT8;+ zb8+Bw5y2wvlAFG1$TWjxbmS?69OMFf@lGQ`+pXKC?7wGdCwxUdrP^Y|kRZZvOb#@m zQ4F!LjwSpZE(>zp{5+L4Zir3o2mH6OtvJP;EjCnw;d!AJ+!l2`Phyd=Ab$}9sLlWz zML9kc2k2G}H0r4ymaCK+;O!-lSQ*E%T?}pX;u!=>#3refEV>SA|5C>B?5|^awQxgv SL_|oPIvaPr+E-5xIP?!Qqab1c literal 0 HcmV?d00001 diff --git a/dspace/jsp/image/submit/describe-notdone.gif b/dspace/jsp/image/submit/describe-notdone.gif new file mode 100644 index 0000000000000000000000000000000000000000..e4924b7cb37982301b86a8131326324aacaa4f6c GIT binary patch literal 1257 zcmdVXi!<8?0KoCz@0W-qBnawJij4_Xi&#lcrLA?Y*R8)s z<~7xrGSnk8z2nABQP1L+i1#a=2@(?Tw|KuI*8Lg#{0HCr`Um)Vd9qo64bTn%XJ=+8eA!@a$|O-)UWjg2yytiQj1cXxMb zX{oELOQ}?gyV7 zn;M!wv^0?I%*d`*C4c8)ad$OwXB_TWC(TXMjgclE8Vi6pJHqWVY0JI&63(Bnx3$GTxpO$fO$HgbCI@5r-9k z*pFzGRT?8^bCXFnk75~udqxmw?3*ND+0y$msTTFo0IChhO$~c#8}tbe7BKA|sJBoz z5?`l4)%NTeabpQ9^cYU33q!7B?FD4oOpL5nn|#$L&drWi^vcOOyP{_aPHAzr$^%wH z_$jE1Y&oJbUdNlbP`$QSl?bTo99A|0n zY$9;T$!X(hP%6nW>a$czJcgj>U>jSQR&p%Z)QwwYM*X6A!oBa<$$9frK`Dp(gR}Vp z0_WmNz__$nT^jD3%#;4}!F;XF{V@=>W<3`Qz^HNshMt`8eN8wI!EN7(hlO=X306;K z5zxSmj%hnB2!!(rO|_!X7*B{JVg(dPE#d<#559SZbAU}B>r_jqn6ls}7IDN*bum7& zX!$PB(U2S;6*Ocn10N7?FXYsEkS3zv61Y@?V{Drxi`$iulOujdrhj)yGY_-#^QBPK zSa}Illtyls@omPLpq>@ta4+KV=vzjZqg>)!_?M_n`1QB%t|r}f?PZCe@EW}IR&Zpd z$(L8;R4BWl+2dA_KOvNH(KV0Ss^^s*?7}pvLuUjsyo)l?PCPY)(~IChSns&Y>ycb6 zUx>b<0j~R<|8Xwehh!*dB^rtW8mgw4iU8IOgbuo=z7m9*-c@F^(o*%6oiKKI#(DuXY?5(Kg& fR}ImOOsoe78II-dRN_C#U_I0SlE=sk0J!!q?=;Qk literal 0 HcmV?d00001 diff --git a/dspace/jsp/image/submit/license-current.gif b/dspace/jsp/image/submit/license-current.gif new file mode 100644 index 0000000000000000000000000000000000000000..810d3ee2adff7d61eee02865ec70e85c09decc41 GIT binary patch literal 1252 zcmViFN^@v^e&jg9Dqh3Sfl>WhozaB$^va{1uk_Rr7rz`*XKqv2Rs+BY}ZGBVmVHQF;X z*)A^m;^Otn%J8qR>z0=2fr0qh+3~oz>y(t`badfdT=&-2=!1jdUS8cqMEvvf=YD?R zRaM(OJpK6i`Q+sCxw+dqI`z)Z;$L6$ySwqUwB~nr-AG97oSfS@IO1Sn^~lKSh=|`# zPTomL?xdvm(b4tH%=5y+;$dO?=;+{ASKUTN-%?W8DJkDjQ0<4t{*+uQfp*z&u(?3tP5ZEf5^LD?)U_S4h!!^7u%eBe`4`|RxW$H(-=#qX%7?x&~y z`ug|O)ZtoM`swNBb#?2IknW|W^S-|0XlUL|P2_25>ynb)LPFd41ejE# zaI{Dh!a^4q0~99GML@&|5+zJrT*@(0~&;Xy_1ZSl*5shr_loGb4c^0z7*7 z$UvEJ;^lkhtKG#3l21&S~5Jz9C2v z%nblwTVVhKfY}WIj90^S{uOAOMM-er0ut~U@m_rM)mK_`hB+sXA#!<$AZ9-d62x>H zfOt`a6IMu^amXpR(tYqa=ivr7#P-?^Jm$E8hz7Rv16|nJwquX6S^kvXdhHEDfCmpK zVP9qV85Up=8c2}=+$B_SbJR@fjvWQm<1b%9A8 z0M@xi;++80Wszcx8L|}Ce*N}0oMja51wnG?erpn00281NL*3? literal 0 HcmV?d00001 diff --git a/dspace/jsp/image/submit/license-done.gif b/dspace/jsp/image/submit/license-done.gif new file mode 100644 index 0000000000000000000000000000000000000000..8eea8f89761698c9fd9f24b5aa818b0ad218502a GIT binary patch literal 1769 zcmeH`X;+d707hQ~1kHs_Ob1OfJ8GUX%~aCjMclHCOedysOq5ESN+rvjJcbJ{l^iKf zt{I{wxr}ROr)9vEY09LWau-~24ctOan&wx`mwA4|z4!6)^LBNihXLDwDFFEP?VDzE zQ?s%0b!BBksoYptSf83&pP1NOUHz(3ZOqK5M@Cfj^)uPo3O0NC=FOQ~wjPBSwzH#axg$&*9g-o3WAOeT}V z;fzqJ^Toxgrl!e+gt^?@K@X4V^z<*iy<=z3&I<$^b90;P>x<8yk4Ht#<>!xIyf_Gg zs~e!UN=?+V__gJ7(?vI|l1_&icc3VX{|$4F5v9h%V;J=Ai4 z*V9Xb&*N16Z~cvRdAq1Rl6=o{jvgEtvmckkPt7p2AZKm`1!-AW8)}*4#ZOLC?}|O+ z&Gic!74P};3K0uLWD(-Yw3vnn)@T}0M@SP3*gD3>p^|iTsz8+ig&`e)2ya8P-CeTB zPU0pq1jb0r14}zHk+wmaUe|!)?a9_AbFe7tIiK(}$R(kgWtCxIx=oum5}oK}?g7f= z=~`z9IF|karGuw|hgu1}feM6qnqMuVC+oQk?nhlEu~2CSZW5F{6H`|U!CLm9eUjmp zHf^XK%Tx%3f}>MFFBB+&LBw`N~SF}|Cp9+M}8D1Ym&q$(BWbUG-(GGt~cI>Jr*QNF(i`E?YTz` zcve6lu0(;02q;mMcu`e~yUu}@k8$S@61@rytO2&c!CEThK|m0lZDg$wiH%MYNRfFO zfJ&!evM|Z*xV%7dWSQTNSRp#dJ&J+{j_j?hq4~DiA&9(~^G1&Z6?T;eUK~c1F-=uM z0YK=l=1^RTaQv}LTXs@(><8u=uCK10^46E!k+c?s)an%y7ugKQL~pC}HVA zc^e6KP07NW@Rim^XNYSTt4=VuUg*G(+g{CoE>w=;#2vqt{*I3zaCt$e+{*NRR(H#C z2i{jkVD8{Sdq9H+7uv8Hm64Kt#>eX@9-6IXAd)GC>-Z{xi4R-yGX*#8F==M-P_>ec zHzdzHgV-Oh(bKifnxT4OLDE(@;>P@w8-T8_MWPEuOhN`Ha-mY)^=C&%6Q-*_4PQs@ z#cM;u)M0RJ_-zQxL<>fJGJ?_Pr(N#$^SOWJlQoKM5~>G6v2Gz@DTaHBq!|CIn(_6S znub>hvum?r#D#ik#~N8{ur?K|$Cr~#&&L38gbCI8@5MmpniordeWA0>oJCS?db;H! zIT?ZP7Mos3?DjUY8mGcfUw>HhXM pfmXpJ3q}cpbSe>~+hYA#p^kMw`RZW;$730 zP+AlV!|B%Th-!l(;w2IBE|Pdn=KWm|?_%AbvCn_-y>DPpfY-SVn>#r-B22x}&3`t*x!Sy_xCFlim|b=si~>m-Q9zO1D#GcKR-V-G&DUueRy~{K0e;t+q=BHtW+wcQmI5D znVg)Qn3z~tSP%#Va=Cnad%LTvYj1CFZEbCMc(}Q_xv8m1rBe0v^^J^-?Ck6;E-rR= zcWX2ntyViTGt<-4v$V9dxw$D4iDWX_z`(%Z;Nbg;|0x&Xz5iYS#s&_MoRXTBo{{;G z`{?nLtZZIR?$f+fSn_kA@I^sMQEBmSNqI9%z0%l!39cVzc)tVnOzktDidil>24j zP}Fn2WG0x2x4_;GLkZ^Xt#J{>L|$(Ad4dCjgJ;$`Q*l>+Emmp5!+{)!-~x8S>$?on zx%m4|VmuN_|slWyHnS~^9sGu_`_ zD1%(L0+w~mYuUA__Cod`*{wqSvkpwWN3Y}eJtO@1=AF$Bxv!Ms&!MFR#`+MJSF?R-f7T34;Lal9WRxVJ1eWed#y0h zi&VB9Ef(ueMNqypbOLQKnx( zIkbW7hr;YER^MQJ*qImV+RbW5`u-4Y`PpS%9^VlZGR4@7nwtEVB!AlVASeB-^m8*l zAjUYju#!+`W&v64?=IJa1@d%zI>KDK3E^>9EW)WexgW>Gn+`y59MW7a6y=@&yI}_5 zmV&0liXiXxi2K1HxJibL9HjIiFN^@v^e&jg9Dqh3Sfl>WhozaB$^va{1uk_Rr7rz`*XKqv2Rs+BY}ZGBVmVHQF;X z*)A^m;^Otn%J8qR>z0=2fr0qh+3~oz>y(t`badfdT=&-2=!1jdUS8cqMEvvf=YD?R zRaM(OJpK6i`Q+sCxw+dqI`z)Z;$L6$ySw6GVDYrH=6849NJ#CRoZC1!^~lKSh=|`# zPVS_n-bqRK(b4tH%=5y+;$dO?=;+{ASKUTN-%?W8DJkDjQ0<4t{*+uQfp*z&u(?3tP5ZEf5^LD?)U_S4h!!^7u%eBe`4`|RxW$H(-=#qX%7?x&~y z`ug|O)ZtoM`swNBb#?2IknW|W^S-|0XlUL|P2_25>ynb)LPFd41ejE# zaJghYkuLW~?ag2V-f zBtL1lL1?uBklS!}Mb-cSL9~M)U2@?t+y)E&5Zrh!CBcCUNbF~Xe*F0dplsXa#a(xD zMW!5WHjFpO2Bs-@k%k<4C>?dyVb_v?1a{Zp1~$;9A^^q#xmb$;;Qj#PV=>0J5`FgJ zHwXb9JfOr+$38EDYPe5Trt0%sC(Hn43W!0&LBoze%A?)hwvK3_@ z6j4UiifRH;6S3w3oCGOzzJP=(S-+Jd;vzxGs{f#%{J#;^UgT)taHye%P|KXa&$pPEhXn- Wi7sI@EdV7@M=kZ#R9C%7AOJfw3ui$9 literal 0 HcmV?d00001 diff --git a/dspace/jsp/image/submit/upload-done.gif b/dspace/jsp/image/submit/upload-done.gif new file mode 100644 index 0000000000000000000000000000000000000000..ecbb7286b009b6a4712e8dd1d59a3a4017604202 GIT binary patch literal 1772 zcmeH``CHNl0EfR^N~MU1=TOtEtjIhQJQgT;WI54HEHh2#v;%#7Y?6;_5O`$6L6K&W zL(o#Q3C`>=8+fm|(qhd674O?1FFf1!SL~O4{)G2^KmLJ!IQQ5Xz#5nUfX|;lZ*6XF zt*>t^Ev>87>+|z#6BBD=W1Gv%8yd~}^t5(xP*YPg&EZUDWliPfP2adNmXb1-n!2h| zEx&!cAd}6D#Y0qTue*DXvvaSTTd#{tkAuVN@bJ>>*Xru(nSz2zCUYz~Srr!69}qAY z8afmeH5?cBvAlf#;X`dtkLKC489sk3Ep6cV@sarWPYn%=EiEe_K1{M$L($RwB+{l< zyRon^arLSyJiO1#Yjt$=)AQ$j9v;K7vCCauOK;u`pFOLotsPHKudJ*D03bX(d`=+f z!{L_N+oy7K2ZMt@R#mmNwT+C7EOm4&G&c5NvD&^qOH0et)KokkuZoE1_w(!Cw=X|G ze=sCuuDEz(V?$F{H-6>HY+<3&+j}ZId!@U3Bq3o=BwC-H-CSGyR9`=ulr&pZG_5c-|9%00Zvh}UCO{&Tv*1SiquM1UO*zP2 zM+M!E3^E7;NAD!a7)*#2@v2^6YH1+PKInm0MNKK%DWy5h{uaP20*oMV0+%2M>*!;= z7)YWITjbBNJyThm^zPxY5)aO6S2zbp1Uu(o_X7(C@Lnk!`G80_@PH6x1H*NyB$O50yXx=g$+ z_D#3azgs)`PWW+B#vtlm$IyMK^k3o_!)%Xjo7IZ9%)u=b=e4-}s+ngJ|Vi#;zQMg|!ZUFgY`; z*qb=2$p$B2&TdRhAj|_#ftkQ+COg(qyVdS?229k}ywcH8kAJm7(VkWj60Xjpd3t@YR4g!`3b- z5s?P)7(}RDNi)javCEDR;Ce_#UyCC5+y=W5p@z`sfovl%Uh{yD@|MeuX#|Rl@D%|> zhGDfrUv%gX72;cd$DGK9WZ9J1kZa-uyMF>rAsdr%L(SrX8axF|nN&e`7{k}t#t~7J zYltmO46_B4_vMvcWsyKg3;F`MlVo@TP(dYt8Sesz6ygNC%eUHlK-YucS!rDLV*8^i zPsNMz$2UTM6Z8F)0nK7Q%5eTx>u&YM+V?shi6uFe!h_=9!Q7;3w@Q2qC*CiER*m+i zOjlI+XqpL7x|(5PF5KBAktJvnf96{_(Tp1qr(uSXXx<~vxL>c6@kri&-fimnq*A@p z+Rm6C1*h)9Oj}O!rpkcAV;7~|gzbCF!j$WATwjx(VZ<3a5sdOuuN=CLEXoz-VNq;L z*jX)*ZDLTc;;PU;P94fJw@6bV9NDpC15=FNa-Ytsu8;w3OlP6>*fB7L8D1!~Rwn;c zIFK>dkb{gn=ZMTUh`>7Om=pLm1RxwjQv!iF-TP^Z$n-PdP=Tfe>5Anw!S-m?V2gv& z(Y2$Jr&jednTnDXtM6oczPMC;$WEs3=_MyvAj+jWx|9?yC_K#V(4Pw(zJo8VBa{?h z3=NrJcFw{fEe2#M>1x%bQJs7cC)H2>TFZD+{c3$?ro&zNm#@kaZ8XCaoxwA zk&%)9{{G?N;faZfsi~>Gy}kYY{msoywOTEc$)=~L4-O9Ga(QoW@6yuJ=;)|KBI)Sp zn4FwcC=~Pa^9>CRJv}|!+uLHXcy)DkaBxtg(eU|v9*;LPG&D9g*4Nj!v$M0Xu+Z7r zsZ=UeD%H%)Om}zp;^N}Q#)d#3=<4c{N~Hq>1Me#Sr_KTI{PzMt>X<-EYFc_mCM%2m zOLk7~Lrz|PL17vsr5GqJEBW=&0fEBc2!tL|?|I{km#<&(n)uCc zT3VaWkcel_Th;#g2&Iq4fLH?%hrPsvo_=ed^{ncBod1sLH3x4D5gTa{4g&FYeF#GwnXUw^Wk?qoBV;1J3WdM3!8+^U zogz06e3d#T_NskU7LM1oPTQS+Y-{B-I!sY!xRCo>z!f;L^PBG@1()Ms1>-skgjvmaCs3Vk_~iA{FWusDQ7>ZzCC z5?l`2=hr#S?2!ZH!3h{wwAQtj`H) zQ?xs-`7J(HO#AYSpAm^Dzl&i45%L26X1GmEwV&KNvXq_*-U_Omf6Pu|7KNu9Y=vQ* z3+n|rthKDd(7^p68F(pM5LNw^s>noG@2p=KL!S*J_J9*es}mnJq%9qlrky81WZqpB1ImDcd5mT z5bpIeL3TB^Bmn0eOc8;z*-=kjwIgLu`5s!p2Zm{>0I4;;G&&q%SGOSo9E01?_}Apk Nc4K%%5|sqF{R=TPo%{d* literal 0 HcmV?d00001 diff --git a/dspace/jsp/image/submit/verify-current.gif b/dspace/jsp/image/submit/verify-current.gif new file mode 100644 index 0000000000000000000000000000000000000000..48295cd94db7bafa67f57e0f34010244db0724d4 GIT binary patch literal 1222 zcmV;%1UdUhNk%v~VPF6s0LB0S|NsB~{r&#?`~3Cw`|$Al?(X{M=lbR4{r2|!@$viW z>iFN^@v^e&jg9Dqh3Sfl>WhozaB$^va{1uk_Rr7rz`*XKqv2Rs+BY}ZGBVmVHQF;X z*)A^m;^Otn%J8qR>z0=2fr0qh+3~oz>y(t`badfdT=&-2=!1jdUS8cqMEvvf=YD?R zRaM(OJpK6i`Q+sCxw+dqI`z)Z;$L6$ySw6GVBSed@wBw&cX!=LNbaPh?VOz3I5_vw z(e=p4>4=EmPEPyi==IFZ^TNX7VPW7`SKUTN-%?W8DJkDjQ0<4t{*+uQfp*z&u(?3tP5ZEf5^LD?)U_S4h!!^7u%eBe`4`|RxW$H(-=#qX%7?x&~y z`ug|O)ZtoM`swNBb#?2IknW|W^S-|0XlUL|P2_25>ynb)LPFd41ejE# zbhJnl!a^4q0~99GML@&|5+zJrT*54WSZ-6|uT?;ca5*Q-z14xhzQFkjTRNsC14gNxa2M;JA)*z}G zIH736Erud%8;ls$Yq4#1!V*P@#Tbe@3L->!0}6@d4Wa=F)Mc3&vK13eh?Rp~@!ZMR zVnyP$fuAQ9>C<0<4MxaK6gUxPYhkeoKwmz+(MDNkr6q_~FgyW;5sXR|+)r=7L6ud8 z7LrsH41~aGr>s_#flx#lW$B>_NWlOUi?*t3JTkZdlT0+tS_nf?OyNWhDFm^rt~YGd z(ML5gBESkT48Z^u4pdk>l#TZ|#vBex`-0{X9 kXDr7YbjZ;K8MPRkizT{*;j#df#4Pj7G}mnNB7pz^JE(()$ zN%<<3ZoGZFDip5N*2*Fy$8fmO6DP(_o*Z*=8Fg~{Iz7GK->-W1Y^kI~!Di1TCrd*^ zC;k1WLPBIQG1GBzpBo!j8X7dCqw0>1rQ+hb)YMOB&(6^4UtYah>+RkA@IjHCEu&H= zeSLQ{ns2MC^2|(Wc=))d=hxZUFE3t<_Iqv2b9v(h3GqWy{Eac@)1qFS6^2FWUef`aw)vm5lM@P;0xTU3~G$LY> zL>h5$n4(aYtE$xP?eppB%F@yaFRz81oXwGunTr>f`TT9Aa%XGnOK0b7VxqFVeD?C? z2@u?P|9-8zTb_}zCKhiF56hyXw-y%WuU%W>@m3x^T7CU`l1Q9kFqVpnMxC7}PM=n_ zwtfl-_!JnZdir#^rbby&@jb!+{8t7Xzb^*(_X_}g7l6Pq{w+14Y&hyzjHKmZcP_%_ zhsqIWmLCKPM_UtwEH)GiX6gl`)CCmU2iAKwwbAc8CwHY<-vhvM00o5;cm$D_jy}ed zg#d{hJ~{vJxn@D)P{Wyr`22oXxV{@$Sq2HQ8_2Ifq?wcv9%gY5n4MqxXgELQ|c{SO&hStP9Gmy`@iL$5EN&bv-k-x3- zNyF;@Do_m7EGvX8aNkW#8ZnajdmL+;gV$}06!E#brlwR$4lq@{IFi2 zRFdBIPGBK82JRAsEYGO5MT9yuj3l#R zhwOV0wrdp86<;)sLm;EU9-=?`5aq5ni6J&ktE0faJG1sN0`1jW=_GV3hY&c@fk63F zqO?&q1FfLJRiKasYP-sMQ09bSDiUmSM;Q4tbqSS#* zv+YHPh6%F_@swb{^l%Gge94(eQGFGlVDuWLVQC9S_q2Gm)hIgx*TB1l0^x_muwf>< zb_yYA5{02q?=p1)IL0^<&9B}MLrdU=@25Kefxf}mrx*pL>v2TK{>M)QD=pQpPyxAWk$vQOue!6$0n9|hbsciykpfIvp4|E5de_2%JwTzR~aUC zC^%vAnr;{^$JFPY%GbcOOxk@QLC`ZacRW7n#eC^!P&{%&1*y0suzbw}a7t?!l;Ot9 zvA|G7pibD?_|CA7k5!$^KgZI@`b+^>M$1d=c*lmNw&)zR5?twpyT^z=Qiqq~ch)|J zR+F(|bSB#>CLLztiyvh|&G$*9B)z1cSYwH*iX(g5tKFyjtXOwsB+SYD>U(~8him|* Odah-mVu^L(fX6>`VgwHW literal 0 HcmV?d00001 diff --git a/dspace/jsp/image/submit/verify-notdone.gif b/dspace/jsp/image/submit/verify-notdone.gif new file mode 100644 index 0000000000000000000000000000000000000000..d57593c1faf0bd6dab879d10b635529b7fb11c4b GIT binary patch literal 1158 zcmdVXi&N4E0KoAd4+R875fDlR(+m|SI?}eBC*&M8yPs){gbOFHe z@v+@*-`(9^TU)bOEUT-lX0v&AcJ}D#=-}XBYimoV)5+!X&dyGmOeU2|J32ZJ4-Yps zHkOx{H5$#((2!cK*6a0?lat%q+k1O^>+9=tb8{mjBSxcfe}8{`e0*SFU}DESdtze3U@*+j&#P1_u~@vhx!Kj#)!*O0v$M0ZvNAe4+TPyY*4C!gY6k}gZ8qD& z!a{FvugPSZnwpxKnNcVdi;Ig^t5qVA^!4=(4-YGq%C{B&Q#9bM|6TwvdlrzB%g@Wd zbN82mdxb^CB?967(lS0M=K)alu(G!L*P2J7$MuyUIH;;T9|VR#9UL5CjxSr9|9t(b z?XULMzu$DUo}sv(2_`>%Rt-luAyH^&6b9p>9@A*Y^%FXy!8AE#2nh)dIq&fS2>~w! zxq`87jyOEQok%)7vL6EwCl5CL0uqZN3ZBxz-B1VDPtQ8lU5DI3dJ=fNU2mzlq$o0$ z$`oBFMk9O!SQIY!t_u#8!a<1VMDFOs8lvEST%fBDJIjUplIn|&{JBPJii-n;K9?$a zsm))r$w9ZMbp`NjzMF4MM$4rzWj>7V=gW?E{V)$}zZuxTiHi~-@csl(j(1wHQ55uz zsZy8u4}#!Tf#)b$9AxXgYaSWTrFlv(OpJ~AF;$8rqG`bi>kn*o5LonYjvQ|AO;|wu ziwatGJQU90$?-Vv>@~C>TVChC_}z0YaIJ?@sA{a6#1D`!kMmgtr0F7sf-s#%Q*zE5OdlgX$Z}0*Zgp}1x zOaTn#Qc$Ql^G3lAf|dBAg1hpBl$uN7Eo^W*ntnCA(6h$91w#*Q!c=KDn3$hSLk1Bo2N&0fgFAEN1(QH75!HQY>AD ziDK9|(L(vV7|{C`fQfQpP-5x*;2Dc}DD)&09mLN7VJxo_di@b_i427+q(k1DDGMBY sZ5Dmeh>4UBOTh0?AtU~-s*_CS?%cEBC?{1DIJ(x6W|ct6SU7P0U;gZmH2?qr literal 0 HcmV?d00001 diff --git a/dspace/jsp/layout/footer-default.jsp b/dspace/jsp/layout/footer-default.jsp index e68a797bf4..4ac3535c5d 100644 --- a/dspace/jsp/layout/footer-default.jsp +++ b/dspace/jsp/layout/footer-default.jsp @@ -1,9 +1,16 @@ <% String sidebar = (String) request.getAttribute("dspace.layout.sidebar"); - int overallColSpan = 3; + String navbar = (String) request.getAttribute("dspace.layout.navbar"); + int overallColSpan = 1; + if (sidebar == null) { - overallColSpan = 2; + overallColSpan++; + } + + if (!navbar.equals("off")) + { + overallColSpan++; } %> <%-- End of page content --%> diff --git a/dspace/jsp/layout/header-default.jsp b/dspace/jsp/layout/header-default.jsp index 3b785912af..8c33b746c6 100644 --- a/dspace/jsp/layout/header-default.jsp +++ b/dspace/jsp/layout/header-default.jsp @@ -1,5 +1,5 @@ <%-- - - home.jsp + - header-default.jsp - - Version: $Revision$ - @@ -103,10 +103,16 @@ <%-- Navigation bar --%> +<% + if (!navbar.equals("off")) + { +%> - +<% + } +%> <%-- Page Content --%> <%-- HACK: width specified here for non-CSS compliant Netscape 4.x --%> diff --git a/dspace/jsp/submit/cancel.jsp b/dspace/jsp/submit/cancel.jsp new file mode 100644 index 0000000000..14d636b027 --- /dev/null +++ b/dspace/jsp/submit/cancel.jsp @@ -0,0 +1,108 @@ +<%-- + - cancel.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. + --%> + +<%-- + - Cancel or save submission page + - + - This page is displayed whenever the user clicks "cancel" during a + - submission. It asks them whether they want to delete the incomplete + - item or leave it so they can continue later. + - + - Attributes to pass in: + - submission.info - the SubmissionInfo object + - step - the step the user was at when the cancelled + - (as a String) + - display.step - - this is the step to display in the progress bar + - (i.e. the step from the user's perspective, rather + - than the exact JSP the user clicked cancel on) + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> +<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + +<% + SubmissionInfo si = + (SubmissionInfo) request.getAttribute("submission.info"); + + String step = (String) request.getAttribute("step"); + String displayStep = (String) request.getAttribute("display.step"); + + if (displayStep==null) displayStep = step; +%> + + + +
+ + + + + + +

Cancel or Save Submission

+ +

Do you want the half-finished submission removed, or do you want to keep + it so you can carry on working on it later? You can also return to where + you where during the submission process if you clicked Cancel by accident.

+ + <%= SubmitServlet.getSubmissionParameters(si) %> + > + > + + + + + + + +
+ + + + + +
+ +
+ +
diff --git a/dspace/jsp/submit/cancelled-removed.jsp b/dspace/jsp/submit/cancelled-removed.jsp new file mode 100644 index 0000000000..6fea8cd265 --- /dev/null +++ b/dspace/jsp/submit/cancelled-removed.jsp @@ -0,0 +1,57 @@ +<%-- + - cancelled-removed.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. + --%> + +<%-- + - Submission cancelled and removed page - displayed whenever the user has + - clicked "cancel/save" during a submission and elected to remove the item. + --%> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + + + +

Submission Cancelled

+ +

Your submission has been cancelled, and the incomplete item removed + from the system.

+ +

Go to My DSpace

+ +
diff --git a/dspace/jsp/submit/change-file-description.jsp b/dspace/jsp/submit/change-file-description.jsp new file mode 100644 index 0000000000..bffd3c3f5b --- /dev/null +++ b/dspace/jsp/submit/change-file-description.jsp @@ -0,0 +1,112 @@ +<%-- + - change-file-description.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. + --%> + +<%-- + - Change file description form + - + - Attributes to pass in: + - submission.info - the SubmissionInfo object - bitstream field must be set + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> +<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> +<%@ page import="org.dspace.content.Bitstream" %> +<%@ page import="org.dspace.content.BitstreamFormat" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + +<% + SubmissionInfo si = + (SubmissionInfo) request.getAttribute("submission.info"); +%> + + + +
+ + + + + + +

Submit: Change File Description

+ +

Here are the details of the file. (More Help...)

+ + + + + + + + + + + + +
FileSizeFile Format
<%= si.bitstream.getName() %><%= si.bitstream.getSize() %> bytes<%= si.bitstream.getFormatDescription() %>
+ +

Enter the correct description of the file in the box below:

+ +<% + String currentDesc = si.bitstream.getDescription(); + if (currentDesc == null) + { + currentDesc=""; + } +%> +
+ + + + + +
File Description:
+
+ + <%= SubmitServlet.getSubmissionParameters(si) %> + > + +

+ +
+ +
diff --git a/dspace/jsp/submit/choose-file.jsp b/dspace/jsp/submit/choose-file.jsp new file mode 100644 index 0000000000..cf15dd409b --- /dev/null +++ b/dspace/jsp/submit/choose-file.jsp @@ -0,0 +1,146 @@ +<%-- + - choose-file.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. + --%> + +<%-- + - Select file to upload + - + - Attributes to pass in to this page: + - submission.info - the SubmissionInfo object + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> +<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + +<% + SubmissionInfo si = + (SubmissionInfo) request.getAttribute("submission.info"); +%> + + + +
+ + + + + + +

Submit: Upload a File

+ +

Please enter the name of + <%= (si.submission.hasMultipleFiles() ? "one of the files" : "the file" ) %> on your + local hard drive corresponding to your item. If you click "Browse...", a + new window will appear in which you can locate and select the file on your + local hard drive. (More Help...)

+ +

Netscape users please note: 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. + Instructions for Netscape users are available.

+ +<%-- FIXME: Collection-specific stuff should go here? --%> + +

Please also note that the DSpace system is + able to preserve the content of certain types of files better than other + types. Information about file types and levels of + support for each are available.

+ + + + + + +<% + if (si.submission.hasMultipleFiles()) + { +%> + + + + + + + + + + +<% + } +%> +
+ Document File: + + +
 
+ Please give a brief description of the contents of this file, for + example "Main article", or "Experiment data readings." +
File Description:
+ + <%= SubmitServlet.getSubmissionParameters(si) %> + + +

 

+ +
+ + + + + + + + +
  + + + +     + +
+
+ + +
+ +
diff --git a/dspace/jsp/submit/complete.jsp b/dspace/jsp/submit/complete.jsp new file mode 100644 index 0000000000..7d3df9a6f2 --- /dev/null +++ b/dspace/jsp/submit/complete.jsp @@ -0,0 +1,65 @@ +<%-- + - complete.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. + --%> + +<%-- + - Submission complete message + --%> + + + + + + + + + +

Submit: Submission Complete!

+ + <%-- FIXME Probably should say something specific to workflow --%> +

Your submission will now go through the workflow process designated for + the collection to which you are submitting. You will receive e-mail + notification as soon as your submission has become a part of the collection, + or if for some reason there is a problem with your submission. You can also + check on the status of your submission by going to the My DSpace page.

+ +

Go to My DSpace

+ +
diff --git a/dspace/jsp/submit/edit-metadata-1.jsp b/dspace/jsp/submit/edit-metadata-1.jsp new file mode 100644 index 0000000000..6688e7942f --- /dev/null +++ b/dspace/jsp/submit/edit-metadata-1.jsp @@ -0,0 +1,625 @@ +<%-- + - 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 NameReport 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) %> + > +
+ + + + + + + + +
  + + + +     + +
+
+ + diff --git a/dspace/jsp/submit/edit-metadata-2.jsp b/dspace/jsp/submit/edit-metadata-2.jsp new file mode 100644 index 0000000000..a2ca4e6af5 --- /dev/null +++ b/dspace/jsp/submit/edit-metadata-2.jsp @@ -0,0 +1,274 @@ +<%-- + - edit-metadata-2.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 2 + - + - Attributes to pass in to this page: + - submission.info - the SubmissionInfo object + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> +<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> +<%@ 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 formWidth = 50; + final int subjectWidth = 15; +%> + + + +
+ + + + + + +

Submit: Describe Your Item

+ +

Please fill further information about your submission below. (More Help...)

+ +<%-- HACK: a
tag seems to be the only way to convince certain --%> +<%-- browsers to center the table. --%> +
+ + +<%-- ================================================ --%> +<%-- Subject keywords --%> +<%-- ================================================ --%> + + + +<% + DCValue[] subjects = item.getDC("subject", null, Item.ANY); + int subjectFieldCount = subjects.length + 1; + + if (si.moreBoxesFor != null && si.moreBoxesFor.equals("subject")) + { + subjectFieldCount += 2; + } + + for (int i = 0; i < subjectFieldCount; i += 2) + { +%> + +<%-- HACK: nowrap used since browsers do not act on "white-space" CSS property --%> +<% + if (i == 0) + { +%> + +<% + } + else + { +%> + +<% + } +%> + + + +<% + } +%> + + + + + +<%-- ================================================ --%> +<%-- Abstract --%> +<%-- ================================================ --%> + + + +<% + // FIXME: (Maybe) assume one abstract + DCValue[] abstrArray = item.getDC("description", "abstract", Item.ANY); + String abstr = (abstrArray.length > 0 ? abstrArray[0].value : ""); +%> + + + + + + + + + +<%-- ================================================ --%> +<%-- Sponsorship --%> +<%-- ================================================ --%> + + + +<% + DCValue[] sponsorArray = item.getDC("description", "sponsorship", Item.ANY); + String sponsorship = (sponsorArray.length > 0 ? sponsorArray[0].value : ""); +%> + + + + + + + + + +<%-- ================================================ --%> +<%-- Other Description --%> +<%-- ================================================ --%> + + + +<% + DCValue[] descArray = item.getDC("description", null, Item.ANY); + String desc = (descArray.length > 0 ? descArray[0].value : ""); +%> + + + + + +
+<% + if (si.jumpToField != null && si.jumpToField.equals("subject")) + { +%> + +<% + } +%> + Enter appropriate subject keywords or phrases below. +
Subject Keywords  +<% + if (i < subjects.length) + { +%> +   +<% + } + else + { +%> + +<% + } +%> +    +<% + if (i + 1 < subjects.length) + { +%> +   +<% + } + else if (i + 2 >= subjectFieldCount) + { +%> +   +<% + } + else + { +%> + +<% + } +%> +
 
+ Enter the abstract of the item below. +
Abstract + +
 
+ Enter the names of any sponsors and/or funding codes in the box below. +
Sponsors + +
 
+ Enter any other description or comments relating to the item in this box. +
Description + +
+
+ + +<%-- 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) %> + > +
+ + + + + + + + +
  + + + +     + +
+
+ + + + diff --git a/dspace/jsp/submit/get-file-format.jsp b/dspace/jsp/submit/get-file-format.jsp new file mode 100644 index 0000000000..5242530338 --- /dev/null +++ b/dspace/jsp/submit/get-file-format.jsp @@ -0,0 +1,168 @@ +<%-- + - get-file-format.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. + --%> + +<%-- + - Select type of uploaded file + - + - Attributes to pass in to this page: + - submission.info - the SubmissionInfo object + - guessed.format - the system's guess as to the format - null if it + - doesn't know (BitstreamFormat) + - bitstream.formats - the (non-internal) formats known by the system + - (BitstreamFormat[]) + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> +<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> +<%@ page import="org.dspace.content.Bitstream" %> +<%@ page import="org.dspace.content.BitstreamFormat" %> +<%@ page import="org.dspace.content.Bundle" %> +<%@ page import="org.dspace.content.Item" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + +<% + SubmissionInfo si = + (SubmissionInfo) request.getAttribute("submission.info"); + BitstreamFormat guess = + (BitstreamFormat) request.getAttribute("guessed.format"); + BitstreamFormat[] formats = + (BitstreamFormat[]) request.getAttribute("bitstream.formats"); + + Item item = si.submission.getItem(); +%> + + + +
+ + + + + + +

Submit: Select File Format

+ +

Uploaded file: <%= si.bitstream.getName() %> (<%= si.bitstream.getSize() %> bytes)

+ +<% + if (guess == null) + { +%> +

DSpace could not identify the format of this file.

+<% + } + else + { +%> +

DSpace recognized the file format as <%= guess.getShortDescription() %>. + Please be sure before you change this!

+ + + <%= SubmitServlet.getSubmissionParameters(si) %> + +

+
+ +<%-- Option list put in a separate form --%> +
+<% + } +%> + +

Select the format of the file from the list below, for example "Adobe + PDF" or "Microsoft Word", OR if the format is not in the list, please describe + the format file in the input box below the list. + (More Help...)

+ +
+ +
+ +

If the format is not in the above list, describe + it in the format below. Enter the name of the application you used to create + the file, and the version number of the application (for example, + "ACMESoft SuperApp version 1.5").

+ + + + + + +
+ File Format: + +<% + String desc = si.bitstream.getUserFormatDescription(); + if (desc == null) + { + desc = ""; + } +%> + +
+ + <%= SubmitServlet.getSubmissionParameters(si) %> + + +

+
+
diff --git a/dspace/jsp/submit/initial-questions.jsp b/dspace/jsp/submit/initial-questions.jsp new file mode 100644 index 0000000000..25a3f5b540 --- /dev/null +++ b/dspace/jsp/submit/initial-questions.jsp @@ -0,0 +1,150 @@ +<%-- + - initial-questions.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. + --%> + +<%-- + - Initial questions for keeping UI as simple as possible. + - + - Attributes to pass in: + - submission.info - the SubmissionInfo object + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> +<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + +<% + SubmissionInfo si = + (SubmissionInfo) request.getAttribute("submission.info"); +%> + + + +
+ + + + + + +

Submit: Describe Your Item

+ +

Please check the boxes next to the statements that apply to your + submission. (More Help...)

+ +
+ + + + + + + +<% + // Don't display file or thesis questions in workflow mode + if (!SubmitServlet.isWorkflow(si)) + { +%> + + + +<%-- FIXME: MIT-SPECIFIC: Is this a thesis question --%> + + + +<% + } +%> +
+ + + + + +
>The item has more than one title, e.g. a translated title
+
+ + + + + +
>The item has been published or publicly distributed before
+
+ + + + + +
>The item consists of more than one file
+
+ + + + + +
The item is a thesis
+
+
+ +

 

+ +<%-- Hidden fields needed for submit servlet to know which item to deal with --%> + <%= SubmitServlet.getSubmissionParameters(si) %> + > +
+ + + + + + + +
+   + + +     + +
+
+
+ +
diff --git a/dspace/jsp/submit/license-rejected.jsp b/dspace/jsp/submit/license-rejected.jsp new file mode 100644 index 0000000000..a9a421a530 --- /dev/null +++ b/dspace/jsp/submit/license-rejected.jsp @@ -0,0 +1,62 @@ +<%-- + - license-rejected.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. + --%> + +<%-- + - License rejected page + --%> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + + + +

Submit: License Rejected

+ +

You have chosen not to grant the license to distribute your submission + via the DSpace system. Your submission has not been deleted and can be + accessed from the My DSpace page.

+ +

If you wish to contact us to discuss the license, please use one + of the methods below:

+ + <%@ include file="/components/contact-info.jsp" %> + +

Go to My DSpace

+ +
diff --git a/dspace/jsp/submit/no-theses.jsp b/dspace/jsp/submit/no-theses.jsp new file mode 100644 index 0000000000..a4a81017a8 --- /dev/null +++ b/dspace/jsp/submit/no-theses.jsp @@ -0,0 +1,79 @@ +<%-- + - no-theses.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. + --%> + +<%-- + - "No Theses" message + - + - This page displays a message informing the user that theses are not + - presently accepted in DSpace, and that their submission has been removed. + - FIX-ME: MIT-SPECIFIC + --%> +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + + + +

Theses Not Accepted in DSpace

+ +

DSpace does not currently accept individually-submitted + theses, but you are encouraged to use the separate electronic thesis + submission site supported by the Libraries and by MIT Information Systems to + submit your thesis to the Digital Library of + MIT Theses. To learn how to submit your thesis to that system, see Submitting + an Electronic Thesis at MIT.

+ +

Because DSpace does not accept individually-submitted theses, your + submission will not proceed; any files you have uploaded for the current item + will not be stored.

+ +

Please note that printed copies of your thesis are still the official + requirement for your degree. Due to important legal and record-keeping + reasons, it is likely that in the future DSpace will work directly with the + electronic thesis system to load groups of theses which have been officially + vetted and approved. Thanks for understanding.

+ +

For more information please contact the DSpace site + administrators:

+ + <%@ include file="/components/contact-info.jsp" %> + +

Thank you for your interest in DSpace!

+ +
diff --git a/dspace/jsp/submit/progressbar.jsp b/dspace/jsp/submit/progressbar.jsp new file mode 100644 index 0000000000..935fc7f466 --- /dev/null +++ b/dspace/jsp/submit/progressbar.jsp @@ -0,0 +1,159 @@ +<%-- + - progressbar.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. + --%> + +<%-- + - Progress bar for submission form. Note this must be included within + - the FORM element in the submission form, since it contains navigation + - buttons. + - + - Parameters: + - step (int): The current step. One of constants in + - org.dspace.app.webui.servlets.SubmitServlet. + - stage_reached: The most advanced step the user has reached (i.e. the + - most advanced step they can jump to) + - One of constants in org.dspace.servlets.SubmitServlet. + - It can also be "-1" - in this case, the progress bar + - is in "Workflow Item" mode - i.e. the "license" and + - "complete" stages aren't shown + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + +<% + // These are the filename stubs for the images used for each step + String[] imageNames = + { + "select", + "describe", + "describe", + "describe", + "upload", + "verify", + "license", + "complete" + }; + + // Step names for ALT text in images + String[] stepNames = + { + "Select", + "Describe", + "Describe", + "Describe", + "Upload", + "Verify", + "License", + "Complete" + }; + + int step = Integer.parseInt(request.getParameter("step")); + int stageReached = Integer.parseInt(request.getParameter("stage_reached")); + + // Are we in workflow mode? + boolean workflowMode = false; + if (stageReached == -1) + { + workflowMode = true; + stageReached = SubmitServlet.REVIEW_SUBMISSION; + } +%> +
+ + +<% + // Show previous (done by definition!) steps + for (int i = 1; i < step; i++) + { + // If the step has been done, and we're not on the final step, + // the user can jump back + if (step != SubmitServlet.SUBMISSION_COMPLETE) + { + %> + <%-- HACK: border=0 for non-CSS compliant Netscape 4.x --%> + + <% + } + else + { + // User has reached final step, cannot jump back + %> + + <% + } + } + + // Show current step, but only if it's not the select collection step, + // which isn't shown in the progress bar + if (step > 0) + { +%> + +<% + } + + // We only go up to the "verify" step if we're on a workflow item + int lastStep = (workflowMode ? SubmitServlet.REVIEW_SUBMISSION+1 + : stepNames.length); + + // Show next steps (some of which may have been done) + for (int i = step + 1; i < lastStep; i++) + { + if (i <= stageReached) + { + // Stage has been previously accessed, so user may jump to it +%> +<%-- HACK: border=0 for non-CSS compliant Netscape 4.x --%> + +<% + } + else + { + // Stage hasn't been reached yet (can't be jumped to) +%> + +<% + } + } +%> + +
 <%= stepNames[i] %> (Done) -  <%= stepNames[step] %> (Current) -  <%= stepNames[i] %> (Not Done) -
+
diff --git a/dspace/jsp/submit/review.jsp b/dspace/jsp/submit/review.jsp new file mode 100644 index 0000000000..8698a49f6a --- /dev/null +++ b/dspace/jsp/submit/review.jsp @@ -0,0 +1,445 @@ +<%-- + - review.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. + --%> + +<%-- + - Review submission page + - + - Attributes to pass in to this page: + - submission.info - the SubmissionInfo object + --%> + +<%@ page import="java.util.HashMap" %> +<%@ 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.Bitstream" %> +<%@ page import="org.dspace.content.BitstreamFormat" %> +<%@ page import="org.dspace.content.DCDate" %> +<%@ page import="org.dspace.content.DCLanguage" %> +<%@ 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(); + + // Names of each identifier type + 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" ); +%> + + + +
+ + + + + +

Submit: Verify Submission

+ +

Not quite there yet, but nearly!

+ +

Please spend a few minutes to examine what you've just submitted below. + If anything is wrong, please go back and correct it by using the buttons + next to the error, or by clicking on the progress bar at the top of the + page. (More Help...)

+ +

If everything is OK, please click the "Next" button at the bottom of the page.

+ +

You can safely check the files you've uploaded - a new window will + be opened to display them.

+ + +<%-- ====================================================== --%> +<%-- INITIAL QUESTIONS --%> +<%-- ====================================================== --%> + + + + +<%-- ====================================================== --%> +<%-- DESCRIBE ITEM PAGE 1 ELEMENTS --%> +<%-- ====================================================== --%> + + + +<%-- ====================================================== --%> +<%-- DESCRIBE ITEM PAGE 2 ELEMENTS --%> +<%-- ====================================================== --%> + + + +<%-- ====================================================== --%> +<%-- UPLOADED_FILES --%> +<%-- ====================================================== --%> + + + + +
+ + + + + +
+ + + + + + + + + + + + + +
Item has more than one title:<%= (si.submission.hasMultipleTitles() ? "Yes" : "No") %>
Previously published item:<%= (si.submission.isPublishedBefore() ? "Yes" : "No") %>
Item consists of more than one file:<%= (si.submission.hasMultipleFiles() ? "Yes" : "No") %>
+
+ value="Correct one of these"> +
+
+ + + + + +
+ + + + + +<% + DCValue[] titles = item.getDC("title", null, Item.ANY); + String title = "None"; + if (titles.length > 0) + { + title = titles[0].value; + } +%> + + + + +<% + if (si.submission.hasMultipleTitles()) + { + DCValue[] altTitles = item.getDC("title", "alternative", Item.ANY); +%> + + + + +<% + } + + if (si.submission.isPublishedBefore()) + { + DCValue[] dateIssued = item.getDC("date", "issued", Item.ANY); +%> + + + + + +<% + } +%> + + + + + + + + +<% + DCValue[] langArray = item.getDC("language", "iso", null); + DCLanguage language = new DCLanguage(""); + if (langArray.length > 0) + { + language = new DCLanguage(langArray[0].value); + } +%> + + + + +
Authors: +<% + DCValue[] authors = item.getDC("contributor", "author", Item.ANY); + if (authors.length == 0) + { +%> + None +<% + } + else + { + for (int i = 0; i < authors.length; i++) + { +%> + <%= authors[i].value %>
+<% + } + } +%> +
Title: + <%= title %> +
Alternative Titles: +<% + if (altTitles.length == 0) + { +%> + None +<% + } + else + { + for(int i = 0; i < altTitles.length ; i++) + { +%> + <%= altTitles[i].value %>
+<% + } + } +%> +
Date Issued: +<% + if (dateIssued.length == 0) + { +%> + None +<% + } + else + { +%> + +<% + } +%> +
Series/Report No: +<% + DCValue[] seriesNumbers = item.getDC("relation","ispartofseries", Item.ANY); + if (seriesNumbers.length == 0) + { +%> + None +<% + } + else + { + for (int i = 0; i < seriesNumbers.length ; i++) + { +%> + <%= seriesNumbers[i].value %>
+<% + } + } +%> +
Identifiers: +<% + DCValue[] identifiers = item.getDC("identifier", Item.ANY, Item.ANY); + + for (int i = 0; i < identifiers.length; i++) + { +%> + <%= identifierQualNames.get(identifiers[i].qualifier) %>: <%= identifiers[i].value %>
+<% + } +%> +
Language:<%= language.getDisplayName() %>
+
+ value="Correct one of these"> +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + +
Keywords: +<% + DCValue[] keywords = item.getDC("subject", null, Item.ANY); + + if (keywords.length == 0) + { +%> + None +<% + } + else + { + for (int i = 0; i < keywords.length; i++) + { +%> +<%= keywords[i].value %>
+<% + } + } + + DCValue[] abstr = item.getDC("description", "abstract", Item.ANY); + DCValue[] sponsors = item.getDC("description", "sponsorship", Item.ANY); + DCValue[] otherDesc = item.getDC("description", null, Item.ANY); +%> +
Abstract:<%= (abstr.length == 0 ? "None" : abstr[0].value) %>
Sponsors:<%= (sponsors.length == 0 ? "None" : sponsors[0].value) %>
Other Description:<%= (otherDesc.length == 0 ? "None" : otherDesc[0].value) %>
+
+ value="Correct one of these"> +
+
+ + + + + +
+ + + + + +
<%= (si.submission.hasMultipleFiles() ? "Uploaded Files:" : "Uploaded File:") %> +<% + Bitstream[] bitstreams = item.getNonInternalBitstreams(); + + for (int i = 0; i < bitstreams.length ; i++) + { + BitstreamFormat format = bitstreams[i].getFormat(); +%> + <%= bitstreams[i].getName() %> - <%= bitstreams[i].getFormatDescription() %> +<% + switch (format.getSupportLevel()) + { + case 0: + %>(Unknown)<% + break; + case 1: + %>(Unsupported)<% + break; + case 2: + %>(Supported)<% + } +%> +
+<% + } +%> +
+
+<% + // Can't edit files in workflow mode + if(!SubmitServlet.isWorkflow(si)) + { +%> + + value="<%= (si.submission.hasMultipleFiles() ? "Add or Remove a File" : "Upload a different file") %>"> +<% + } + else + { +%> + + value="Edit File Details"> +<% + } +%> +
+
+ + <%= SubmitServlet.getSubmissionParameters(si) %> + > + +

 

+ +
+ + + + + + + + +
  + + + +     + +
+
+ +
+ +
diff --git a/dspace/jsp/submit/saved.jsp b/dspace/jsp/submit/saved.jsp new file mode 100644 index 0000000000..627e83b20e --- /dev/null +++ b/dspace/jsp/submit/saved.jsp @@ -0,0 +1,58 @@ +<%-- + - saved.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. + --%> + +<%-- + - Submission saved message - displayed whenever the user has clicked + - "cancel/save" during a submission and elected to save the item. + --%> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + + + +

Submission Saved

+ +

Your submission has been saved for you to finish later. You can continue + the submission by going to your "My DSpace" page and clicking on the + relevant "Resume" button.

+ +

Go to My DSpace

+ +
diff --git a/dspace/jsp/submit/select-collection.jsp b/dspace/jsp/submit/select-collection.jsp new file mode 100644 index 0000000000..01def0a7e1 --- /dev/null +++ b/dspace/jsp/submit/select-collection.jsp @@ -0,0 +1,119 @@ +<%-- + - select-collection.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. + --%> + +<%-- + - UI page for selection of collection. + - + - Required attributes: + - collections - Array of collection objects to show in the drop-down. + --%> + +<%@ page import="org.dspace.content.Collection" %> +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + +<% + Collection[] collections = + (Collection[]) request.getAttribute("collections"); +%> + + + + + + + + +

Submit: Choose Collection

+ +
+<%-- HACK: a
tag seems to be the only way to convince certain --%> +<%-- browsers to center the table. --%> +
+ + + + + + + + + + + + + + + + + + + + + +
+ Have you read the Inessential Guide to Submitting to DSpace? +
 
+ Select the collection you wish to submit an item to from the list + below, then click "Next". More Help... +
Collection + +
 
+ + +<%-- Hidden field indicating the step --%> + + +
+
+ + + diff --git a/dspace/jsp/submit/show-license.jsp b/dspace/jsp/submit/show-license.jsp new file mode 100644 index 0000000000..2f107c7c1c --- /dev/null +++ b/dspace/jsp/submit/show-license.jsp @@ -0,0 +1,101 @@ +<%-- + - show-license.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. + --%> + +<%-- + - Show the user a license which they may grant or reject + - + - Attributes to pass in: + - submission.info - the SubmissionInfo object + - license - the license text to display + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> +<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + +<% + SubmissionInfo si = + (SubmissionInfo) request.getAttribute("submission.info"); + + String license = (String) request.getAttribute("license"); +%> + + + +
+ + + + + + +

Submit: Grant DSpace Distribution License

+ +

There is one last step: In order for DSpace to reproduce, translate and distribute your + submission worldwide, your agreement to the following terms is necessary. + Please take a moment to read the terms of this license, and click on one of the + buttons at the bottom of the page. By clicking on the "Grant License" + button, you indicate that you grant the following terms of the license. + (More Help...)

+ +

Not granting the license will not delete your submission. + Your item will remain in your "My DSpace" page. You can then either remove + the submission from the system, or agree to the license later once any + queries you might have are resolved.

+ + + + + +
+
<%= license %>
+
+ + <%= SubmitServlet.getSubmissionParameters(si) %> + > + +
+

+

+
+
+
diff --git a/dspace/jsp/submit/show-uploaded-file.jsp b/dspace/jsp/submit/show-uploaded-file.jsp new file mode 100644 index 0000000000..e476ee86b3 --- /dev/null +++ b/dspace/jsp/submit/show-uploaded-file.jsp @@ -0,0 +1,209 @@ +<%-- + - show-uploaded-file.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. + --%> + +<%-- + - Show uploaded file (single-file submission mode) + - + - Attributes to pass in + - submission.info - the SubmissionInfo object + - just.uploaded - Boolean indicating whether the user has just + - uploaded a file OK + - show.checksums - Boolean indicating whether to show checksums + - + - FIXME: Merely iterates through bundles, treating all bit-streams as + - separate documents. Shouldn't be a problem for early adopters. + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> +<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> +<%@ page import="org.dspace.content.Bitstream" %> +<%@ page import="org.dspace.content.BitstreamFormat" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + +<% + SubmissionInfo si = + (SubmissionInfo) request.getAttribute("submission.info"); + + boolean justUploaded = ((Boolean) request.getAttribute("just.uploaded")).booleanValue(); + boolean showChecksums = ((Boolean) request.getAttribute("show.checksums")).booleanValue(); + + // Get the bitstream + Bitstream[] all = si.submission.getItem().getNonInternalBitstreams(); + Bitstream bitstream = all[0]; + BitstreamFormat format = bitstream.getFormat(); +%> + + + +
+ + + + + + +<% + if (justUploaded) + { +%> +

Submit: File Uploaded Successfully

+ +

Your file was successfully uploaded.

+<% + } + else + { +%> +

Submit: Uploaded File

+<% + } +%> +

Here are the details of the file you have uploaded. Please check the + details before going to the next step. (More Help...)

+ + + + + + +<% + if (showChecksums) + { +%> + +<% + } +%> + + + + + + +<% + if (showChecksums) + { +%> + +<% + } +%> + +
FileSizeFile FormatChecksum
<%= bitstream.getName() %><%= bitstream.getSize() %> bytes +<% + String description = bitstream.getFormatDescription(); + String supportLevel = "supported"; + + if (format.getSupportLevel() == 1) + { + supportLevel = "known"; + } + + if (format.getSupportLevel() == 0) + { + supportLevel = "unsupported"; + } +%> + <%= description %> (<%= supportLevel %>) + + <%= bitstream.getChecksum() %> (<%= bitstream.getChecksumAlgorithm() %>) +
+ +
+

+ +

+
+ +
+

+ +

+
+ +
+<%-- Show information about how to verify correct upload --%> +

You can verify that the file has been uploaded correctly by:

+
    +
  • Clicking on the filename above. This will download the file in a + new browser window, so that you can check the contents.
  • +<% + if (showChecksums) + { +%> +
  • Comparing the checksum displayed above with a checksum worked out on + your local computer. They should be exactly the same. Click + here to find out how to do this.
  • +<% + } + else + { +%> +
  • The system can calculate a checksum you can verify. Click + here for more information.
  • +<% + } +%> +
+
+ +<%-- Hidden fields needed for submit servlet to know which item to deal with --%> + <%= SubmitServlet.getSubmissionParameters(si) %> + > + +<%-- HACK: Center used to align table; CSS and align=center ignored by some browsers --%> +
+ + + + + +
+ + +   +
+
+
+ +
+ diff --git a/dspace/jsp/submit/thesis-removed-workaround.jsp b/dspace/jsp/submit/thesis-removed-workaround.jsp new file mode 100644 index 0000000000..e734723568 --- /dev/null +++ b/dspace/jsp/submit/thesis-removed-workaround.jsp @@ -0,0 +1,66 @@ +<%-- + - thesis-removed-workaround.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. + --%> + +<%-- + - Submission removed message - this is displayed when the user has checked + - the "This is a thesis" option on the first submission page, had their + - submission removed, used the back button to go back to the submission + - page, and tried carry on. Normally this would result in an integrity error + - since the workspace ID is no longer valid but in this special case we + - will display a decent message. + - + - This page displays a message informing the user that theses are not + - presently accepted in DSpace, and that their submission has been removed. + - FIXME: MIT-SPECIFIC + --%> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + + + +

Submission Stopped: Theses Not Accepted in DSpace

+ +

Since DSpace does not accept theses, your submission has been stopped. + To start submitting something else click below.

+ +

+ Start a new submission

+ +
diff --git a/dspace/jsp/submit/upload-error.jsp b/dspace/jsp/submit/upload-error.jsp new file mode 100644 index 0000000000..a774adb50b --- /dev/null +++ b/dspace/jsp/submit/upload-error.jsp @@ -0,0 +1,85 @@ +<%-- + - upload-error.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. + --%> + +<%-- + - List of uploaded files + - + - Attributes to pass in to this page: + - submission.info - the SubmissionInfo object + - + - FIXME: Merely iterates through bundles, treating all bit-streams as + - separate documents. Shouldn't be a problem for early adopters. + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> +<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + +<% + SubmissionInfo si = + (SubmissionInfo) request.getAttribute("submission.info"); +%> + + + +
+ + + + + + +

Submit: Error Uploading File

+ +

There was a problem uploading your file. Either the filename you entered + was incorrect, or there was a network problem which prevented the file from + reaching us correctly. Please try again.

+ + <%= SubmitServlet.getSubmissionParameters(si) %> + +<%-- HACK:
tag needed for broken Netscape 4.78 behaviour --%> +
+

+
+ + + diff --git a/dspace/jsp/submit/upload-file-list.jsp b/dspace/jsp/submit/upload-file-list.jsp new file mode 100644 index 0000000000..8e066dd227 --- /dev/null +++ b/dspace/jsp/submit/upload-file-list.jsp @@ -0,0 +1,248 @@ +<%-- + - upload-file-list.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. + --%> + +<%-- + - List of uploaded files + - + - Attributes to pass in to this page: + - submission.info - the SubmissionInfo object + - just.uploaded - Boolean indicating if a file has just been uploaded + - so a nice thank you can be displayed. + - show.checksums - Boolean indicating whether to show checksums + - + - FIXME: Assumes each bitstream in a separate bundle. + - Shouldn't be a problem for early adopters. + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> +<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> +<%@ page import="org.dspace.content.Bitstream" %> +<%@ page import="org.dspace.content.BitstreamFormat" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + + +<% + SubmissionInfo si = + (SubmissionInfo) request.getAttribute("submission.info"); + + boolean justUploaded = ((Boolean) request.getAttribute("just.uploaded")).booleanValue(); + boolean showChecksums = ((Boolean) request.getAttribute("show.checksums")).booleanValue(); +%> + + + +
+ + + + + + +

Submit: <%= (justUploaded ? "File Uploaded Successfully" : "Uploaded Files") %>

+ +<% + if (justUploaded) + { +%> +

Your file was successfully uploaded.

+<% + } +%> +

The table below shows the files you have uploaded for this item. (More Help...)

+ + + + + + + +<% + if (showChecksums) + { +%> + +<% + } + + // Don't display last column ("Remove") in workflow mode + if (!SubmitServlet.isWorkflow(si)) + { + // Whether it's an odd or even column depends on whether we're showing checksums + String column = (showChecksums ? "Even" : "Odd"); +%> + +<% + } +%> + + +<% + String row = "even"; + + Bitstream[] bitstreams = si.submission.getItem().getNonInternalBitstreams(); + + for (int i = 0; i < bitstreams.length; i++) + { + BitstreamFormat format = bitstreams[i].getFormat(); + String description = bitstreams[i].getFormatDescription(); + String supportLevel = "supported"; + + if(format.getSupportLevel() == 1) + { + supportLevel = "known"; + } + + if(format.getSupportLevel() == 0) + { + supportLevel = "unsupported"; + } + +%> + + + + + +<% + // Checksum + if (showChecksums) + { +%> + +<% + } + + // Don't display "remove" button in workflow mode + if (!SubmitServlet.isWorkflow(si)) + { + // Whether it's an odd or even column depends on whether we're showing checksums + String column = (showChecksums ? "Even" : "Odd"); +%> + +<% + } +%> + +<% + row = (row.equals("even") ? "odd" : "even"); + } +%> +
FileSizeDescriptionFile FormatChecksum 
<%= bitstreams[i].getName() %><%= bitstreams[i].getSize() %> bytes + <%= (bitstreams[i].getDescription() == null || bitstreams[i].getDescription().equals("") + ? "None" + : bitstreams[i].getDescription()) %> + + + <%= description %> (<%= supportLevel %>) + + + <%= bitstreams[i].getChecksum() %> (<%= bitstreams[i].getChecksumAlgorithm() %>) + + +
+ +<%-- HACK: Need a space - is there a nicer way to do this than
or a --%> +<%-- blank

? --%> +
+ +<%-- Show information about how to verify correct upload, but not in workflow + mode! --%> +<% + if (SubmitServlet.isWorkflow(si)) + { +%> +

You can verify that the file(s) have been uploaded correctly by:

+
    +
  • Clicking on the filenames above. This will download the file in a + new browser window, so that you can check the contents.
  • +<% + if (showChecksums) + { +%> +
  • Comparing checksums displayed above with checksums worked out on + your local computer. They should be exactly the same. Click + here to find out how to do this.
  • +<% + } + else + { +%> +
  • The system can calculate a checksum you can verify. Click + here for more information.
  • +<% + } +%> +
+ +
+<% + } +%> + +<%-- Hidden fields needed for submit servlet to know which item to deal with --%> + <%= SubmitServlet.getSubmissionParameters(si) %> + > + +<%-- HACK: Center used to align table; CSS and align=center ignored by some browsers --%> +
+

+ + + + + + + + + +
  + + + +     + +
+
+ +
+ +
diff --git a/dspace/jsp/submit/verify-prune.jsp b/dspace/jsp/submit/verify-prune.jsp new file mode 100644 index 0000000000..aeeb56ed2b --- /dev/null +++ b/dspace/jsp/submit/verify-prune.jsp @@ -0,0 +1,147 @@ +<%-- + - verify-prune.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. + --%> + +<%-- + - Verify that it's OK to "prune" the item after changing the answer to a + - question on the first page + - + - Attributes to pass in: + - submission.info - the SubmissionInfo object + - multiple.titles, published.before, multiple.files - Booleans, indicating + - the user's choices on the initial questions page + - will.remove.titles, will.remove.date, will.remove.files - Booleans, + - indicating consequences of new answers to questions + --%> + +<%@ page import="org.dspace.app.webui.servlet.SubmitServlet" %> +<%@ page import="org.dspace.app.webui.util.SubmissionInfo" %> + +<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> + +<% + SubmissionInfo si = + (SubmissionInfo) request.getAttribute("submission.info"); + + boolean multipleTitles = ((Boolean) request.getAttribute("multiple.titles")).booleanValue(); + boolean publishedBefore = ((Boolean) request.getAttribute("published.before")).booleanValue(); + boolean multipleFiles = ((Boolean) request.getAttribute("multiple.files")).booleanValue(); + + boolean willRemoveTitles = ((Boolean) request.getAttribute("will.remove.titles")).booleanValue(); + boolean willRemoveDate = ((Boolean) request.getAttribute("will.remove.date")).booleanValue(); + boolean willRemoveFiles = ((Boolean) request.getAttribute("will.remove.files")).booleanValue(); + + String buttonPressed = (String) request.getAttribute("button.pressed"); +%> + + + +

Submit: Caution

+ +

The changes you've made to the first "Describe Your Item" page + will affect your submission:

+ +<% + if (willRemoveTitles) + { +%> +

You've indicated that your submission does not have alternative titles, + but you've already entered some. If you proceed with this change, the + alternative titles you've entered will be removed.

+<% + } + + if (willRemoveDate) + { +%> +

You've indicated that your submission has not been published or publicly + distributed before, but you've already entered a date for this. If you + proceed, the date you've entered will be removed, and DSpace will assign + a date.

+<% + } + + if (willRemoveFiles) + { +%> +

You've indicated that the item you're submitting consists of only a single + file, but you've already uploaded more than one file. If you proceed, only + the first file you uploaded will be kept, and the rest will be discarded by + the system. (The files on your local hard drive will not be affected.)

+<% + } +%> + +

Are you sure you want to proceed with the changes?

+ +

 

+ +
+ +<%-- Embed necessary information --%> + + + + + + + +<%-- Pass through original button press --%> + + + + <%= SubmitServlet.getSubmissionParameters(si) %> + +<%-- Note: These submit buttons' names don't start with "submit", so the + -- Previously passed in button will be picked up --%> +
+ + + + + +
+ + + +
+
+
+
diff --git a/dspace/src/org/dspace/app/webui/servlet/SubmitServlet.java b/dspace/src/org/dspace/app/webui/servlet/SubmitServlet.java new file mode 100644 index 0000000000..5ab46a6c61 --- /dev/null +++ b/dspace/src/org/dspace/app/webui/servlet/SubmitServlet.java @@ -0,0 +1,2327 @@ +/* + * SubmitServlet.java + * + * 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. + */ +package org.dspace.app.webui.servlet; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.IOException; +import java.sql.SQLException; +import java.util.LinkedList; +import java.util.List; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; + +import com.oreilly.servlet.MultipartWrapper; + +import org.dspace.app.webui.util.Authenticate; +import org.dspace.app.webui.util.JSPManager; +import org.dspace.app.webui.util.SubmissionInfo; +import org.dspace.app.webui.util.UIUtil; +import org.dspace.authorize.AuthorizeException; +import org.dspace.content.Bitstream; +import org.dspace.content.BitstreamFormat; +import org.dspace.content.Bundle; +import org.dspace.content.Collection; +import org.dspace.content.Community; +import org.dspace.content.DCDate; +import org.dspace.content.DCPersonName; +import org.dspace.content.DCSeriesNumber; +import org.dspace.content.DCValue; +import org.dspace.content.FormatIdentifier; +import org.dspace.content.InProgressSubmission; +import org.dspace.content.Item; +import org.dspace.core.Constants; +import org.dspace.core.Context; +import org.dspace.core.LogManager; +import org.dspace.ingest.WorkspaceItem; +import org.dspace.workflow.WorkflowItem; +import org.dspace.workflow.WorkflowManager; + + +/** + * Submission servlet for DSpace. Handles the initial submission of items, as + * well as the editing of items further down the line. + *

+ * Whenever the submit servlet receives a GET request, this is taken to + * indicate the start of a fresh new submission, where no collection has been + * selected, and the submission process is started from scratch. + *

+ * All other interactions happen via POSTs. Part of the post will normally be + * a (hidden) "step" parameter, which will correspond to the form that the + * user has just filled out. If this is absent, step 0 (select collection) + * is assumed, meaning that it's simple to place "Submit to this collection" + * buttons on collection home pages. + *

+ * According to the step number of the incoming form, the values posted from + * the form are processed (using the process* methods), and the item updated + * as appropriate. The servlet then forwards control of the request to the + * appropriate JSP (from jsp/submit) to render the next stage + * of the process or an error if appropriate. Each of these JSPs may + * require that attributes be passed in. Check the comments at the top of a + * JSP to see which attributes are needed. All submit-related forms require a + * properly initialised SubmissionInfo object to be present in the the + * "submission.info" attribute. This holds the core information relevant to + * the submission, e.g. the item, personal workspace or workflow item, the + * submitting "e-person", and the target collection. + *

+ * When control of the request reaches a JSP, it is assumed that all checks, + * interactions with the database and so on have been performed and that all + * necessary information to render the form is in memory. e.g. The + * SubmitFormInfo object passed in must be correctly filled out. Thus the + * JSPs do no error or integrity checking; it is the servlet's responsibility + * to ensure that everything is prepared. The servlet is fairly diligent + * about ensuring integrity at each step. + *

+ * Each step has an integer constant defined below. The main sequence of the + * submission procedure always runs from 0 upwards, until SUBMISSION_COMPLETE. + * Other, not-in-sequence steps (such as the cancellation screen and the + * "previous version ID verification" screen) have numbers much higher than + * SUBMISSION_COMPLETE. These conventions allow the progress bar component + * of the submission forms to render the user's progress through the process. + * + * @author Robert Tansley + * @version $Revision$ + */ +public class SubmitServlet extends DSpaceServlet +{ + // Steps in the submission process + + /** Selection collection step */ + public static final int SELECT_COLLECTION = 0; + + /** Ask initial questions about the submission step */ + public static final int INITIAL_QUESTIONS = 1; + + /** Edit DC metadata page 1 step */ + public static final int EDIT_METADATA_1 = 2; + + /** Edit DC metadata page 2 step */ + public static final int EDIT_METADATA_2 = 3; + + /** + * Upload files step. Note this doesn't correspond to an actual + * page, since the upload file step consists of a number of + * pages with no definite order. This is just used for the progress + * bar. + */ + public static final int UPLOAD_FILES = 4; + + /** Review submission step */ + public static final int REVIEW_SUBMISSION = 5; + + /** Grant license step */ + public static final int GRANT_LICENSE = 6; + + /** Submission completed step */ + public static final int SUBMISSION_COMPLETE = 7; + + // Steps which aren't part of the main sequence, but rather + // short "diversions" are given high step numbers. The main sequence + // is defined as being steps 0 to SUBMISSION_COMPLETE. + + /** Cancellation of a submission */ + public static final int SUBMISSION_CANCELLED = 101; + + /** List of uploaded files */ + public static final int FILE_LIST = 102; + + /** Choose file page */ + public static final int CHOOSE_FILE = 103; + + /** File format page */ + public static final int GET_FILE_FORMAT = 104; + + /** Error uploading file */ + public static final int UPLOAD_ERROR = 105; + + /** Change file description page */ + public static final int CHANGE_FILE_DESCRIPTION = 106; + + /** + * Verify pruning of extra files, titles, dates as a result of + * changing an answer to one of the initial questions + */ + public static final int VERIFY_PRUNE = 107; + + /** log4j logger */ + private static Logger log = Logger.getLogger(SubmitServlet.class); + + + protected void doDSGet(Context context, + HttpServletRequest request, + HttpServletResponse response) + throws ServletException, IOException, SQLException, AuthorizeException + { + /* + * A GET on a submit servlet starts a new submission. What happens + * depends on the context of the user (where they are.) If they're not + * in a community or collection, they can choose any collection + * from the list of all collections. If they're in a community, + * the list of collections they can choose from will be limited to + * those within the current community. If the user has selected + * a collection, a new submission will be started in that collection. + */ + + Community com = UIUtil.getCommunityLocation(request); + Collection col = UIUtil.getCollectionLocation(request); + + if (col != null) + { + // In a collection, skip the "choose selection" stage + // Create a workspace item + WorkspaceItem wi = WorkspaceItem.create(context, col, true); + + // Proceed to first step + SubmissionInfo si = new SubmissionInfo(); + si.submission = wi; + doStep(context, request, response, si, INITIAL_QUESTIONS); + context.complete(); + } + else + { + Collection[] collections; + + if (com != null) + { + // In a community. Show collections in that community only. + collections = com.getCollections(); + } + else + { + // Show all collections + collections = Collection.findAll(context); + } + + log.info(LogManager.getHeader(context, + "select_collection", + "")); + + request.setAttribute("collections", collections); + JSPManager.showJSP(request, response, + "/submit/select-collection.jsp"); + } + } + + + protected void doDSPost(Context context, + HttpServletRequest request, + HttpServletResponse response) + throws ServletException, IOException, SQLException, AuthorizeException + { + // First of all, we need to work out if this is a multipart request + // The file upload page uses those + String contentType = request.getContentType(); + + if (contentType != null && + contentType.indexOf("multipart/form-data") != -1) + { + // This is a multipart request, so it's a file upload + processChooseFile(context, request, response); + return; + } + + // First get the step + int step = UIUtil.getIntParameter(request, "step"); + + // select collection is a special case - no submissioninfo object + if (step == SELECT_COLLECTION) + { + processSelectCollection(context, request, response); + return; + } + + // Get submission info + SubmissionInfo subInfo = getSubmissionInfo(context, request); + + if (subInfo == null) + { + /* + * Work around for problem where people select "is a thesis", + * see the error page, and then use their "back" button thinking + * they can start another submission - it's been removed so the ID + * in the form is invalid. If we detect the "removed_thesis" + * attribute we display a friendly message instead of an integrity + * error. + */ + if (request.getSession().getAttribute("removed_thesis") != null) + { + request.getSession().removeAttribute("removed_thesis"); + JSPManager.showJSP(request, + response, + "/submit/thesis-removed-workaround.jsp"); + return; + } + else + { + /* + * If the submission info was invalid, set the step to an + * invalid number so an integrity error will be shown + */ + step = -1; + } + } + + + switch (step) + { + case INITIAL_QUESTIONS: + processInitialQuestions(context, request, response, subInfo); + break; + + case EDIT_METADATA_1: + processEditMetadataOne(context, request, response, subInfo); + break; + + case EDIT_METADATA_2: + processEditMetadataTwo(context, request, response, subInfo); + break; + + case GET_FILE_FORMAT: + processGetFileFormat(context, request, response, subInfo); + break; + + case FILE_LIST: + processFileList(context, request, response, subInfo); + break; + + case UPLOAD_ERROR: + processUploadError(context, request, response, subInfo); + break; + + case CHANGE_FILE_DESCRIPTION: + processChangeFileDescription(context, request, response, subInfo); + break; + + case REVIEW_SUBMISSION: + processReview(context, request, response, subInfo); + break; + + case GRANT_LICENSE: + processLicense(context, request, response, subInfo); + break; + + case SUBMISSION_CANCELLED: + processCancellation(context, request, response, subInfo); + break; + + case VERIFY_PRUNE: + processVerifyPrune(context, request, response, subInfo); + break; + + default: + log.warn(LogManager.getHeader(context, + "integrity_error", + UIUtil.getRequestLogInfo(request))); + JSPManager.showIntegrityError(request, response); + } + } + + + //**************************************************************** + //**************************************************************** + // METHODS FOR PROCESSING POSTED FORMS + //**************************************************************** + //**************************************************************** + + /** + * Process the selection collection stage, or the clicking of a + * "submit to this collection" button on a collection home page. + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + */ + private void processSelectCollection(Context context, + HttpServletRequest request, + HttpServletResponse response) + throws ServletException, IOException, SQLException, AuthorizeException + { + // The user might have clicked cancel. We don't do a + // standard cancellation at this stage, since we don't + // actually have an item to keep or remove yet. + if (request.getParameter("submit_cancel") != null) + { + // Just send them to their "My DSpace" for now. + response.sendRedirect(response.encodeRedirectURL( + request.getContextPath() + "/mydspace")); + return; + } + + // First we find the collection + int id = UIUtil.getIntParameter(request, "collection"); + Collection col = Collection.find(context, id); + + // Show an error if we don't have a collection + if (col == null) + { + JSPManager.showInvalidIDError(request, + response, + request.getParameter("collection"), + Constants.COLLECTION); + } + else + { + WorkspaceItem wi = WorkspaceItem.create(context, col, true); + + // Proceed to first step + SubmissionInfo si = new SubmissionInfo(); + si.submission = wi; + doStep(context, request, response, si, INITIAL_QUESTIONS); + + context.complete(); + } + } + + + /** + * process input from initial-questions.jsp + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo submission info object + */ + private void processInitialQuestions(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException, AuthorizeException + { + String buttonPressed = UIUtil.getSubmitButton(request, "submit_next"); + + // Firstly, check for a click of the cancel button. + if (buttonPressed.equals("submit_cancel")) + { + doCancellation(request, + response, + subInfo, + INITIAL_QUESTIONS, + INITIAL_QUESTIONS); + return; + } + + // Get the values from the form + boolean multipleTitles = + UIUtil.getBoolParameter(request, "multiple_titles"); + boolean publishedBefore = + UIUtil.getBoolParameter(request, "published_before"); + boolean multipleFiles = + UIUtil.getBoolParameter(request, "multiple_files"); + boolean isThesis = + UIUtil.getBoolParameter(request, "is_thesis"); + + if (isWorkflow(subInfo)) + { + // Thesis question does not appear in workflow mode.. + isThesis = false; + } + + // First and foremost - if it's a thesis, reject the submission + // FIXME: MIT-SPECIFIC + if (isThesis) + { + WorkspaceItem wi = (WorkspaceItem) subInfo.submission; + wi.delete(); + + // Remember that we've removed a thesis in the session + request.getSession().setAttribute( + "removed_thesis", + new Boolean(true)); + + // Display appropriate message + JSPManager.showJSP(request, response, "/submit/no-theses.jsp"); + + context.complete(); + return; + } + + // Now check to see if the changes will remove any values + // (i.e. multiple files, titles or an issue date.) + boolean willRemoveTitles = false; + boolean willRemoveDate = false; + boolean willRemoveFiles = false; + + if (multipleTitles == false) + { + DCValue[] altTitles = subInfo.submission.getItem().getDC( + "title", "alternative", Item.ANY); + + willRemoveTitles = altTitles.length > 0; + } + + if (publishedBefore == false) + { + DCValue[] dateIssued = subInfo.submission.getItem().getDC( + "date", "issued", Item.ANY); + + willRemoveDate = dateIssued.length > 0; + } + + if (multipleFiles == false) + { + // FIXME: Assuming each bundle has but one bitstream in it + Bundle[] bundles = subInfo.submission.getItem().getBundles(); + + willRemoveFiles = bundles.length > 1; + } + + // If anything is going to be removed from the item as a result + // of changing the answer to one of the questions, we need + // to inform the user and make sure that's OK + if (willRemoveTitles || willRemoveDate || willRemoveFiles) + { + // Verify pruning of extra bits + request.setAttribute("submission.info", subInfo); + request.setAttribute( + "multiple.titles", new Boolean(multipleTitles)); + request.setAttribute( + "published.before", new Boolean(publishedBefore)); + request.setAttribute( + "multiple.files", new Boolean(multipleFiles)); + request.setAttribute( + "will.remove.titles", new Boolean(willRemoveTitles)); + request.setAttribute( + "will.remove.date", new Boolean(willRemoveDate)); + request.setAttribute( + "will.remove.files", new Boolean(willRemoveFiles)); + request.setAttribute("button.pressed", + UIUtil.getSubmitButton(request, "submit_next")); + + JSPManager.showJSP(request, response, "/submit/verify-prune.jsp"); + } + else + { + // Nothing needs removing, so just make the changes + subInfo.submission.setMultipleTitles(multipleTitles); + subInfo.submission.setPublishedBefore(publishedBefore); + + // "Multiple files" irrelevant in workflow mode + if (!isWorkflow(subInfo)) + { + subInfo.submission.setMultipleFiles(multipleFiles); + } + + subInfo.submission.update(); + + // On to the next stage + if (buttonPressed.equals("submit_next")) + { + // Update user's progress + userHasReached(subInfo, EDIT_METADATA_1); + + // User has clicked "Next" + doStep(context, request, response, subInfo, EDIT_METADATA_1); + } + else + { + // Progress bar button clicked + doStepJump(context, request, response, subInfo); + } + + context.complete(); + } + } + + + /** + * Process input from "verify prune" step + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo submission info object + */ + private void processVerifyPrune(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException, AuthorizeException + { + if (request.getParameter("do_not_proceed") != null) + { + // User cancelled + doStep(context, request, response, subInfo, INITIAL_QUESTIONS); + return; + } + + // User elected to proceed - do the pruning + // Get the values from the form + boolean multipleTitles = + UIUtil.getBoolParameter(request, "multiple_titles"); + boolean publishedBefore = + UIUtil.getBoolParameter(request, "published_before"); + + // Multiple files question does not appear in workflow mode. + // Since the submission will have a license, the answer to + // this question will always be "yes" + boolean multipleFiles = (isWorkflow(subInfo) || + UIUtil.getBoolParameter(request, "multiple_files")); + + if (!multipleTitles) + { + subInfo.submission.getItem().clearDC("title", + "alternative", Item.ANY); + } + + if (publishedBefore == false) + { + subInfo.submission.getItem().clearDC("date", "issued", Item.ANY); + } + + if (multipleFiles == false) + { + // FIXME: Assuming each bundle has but one bitstream in it + Bundle[] bundles = subInfo.submission.getItem().getBundles(); + + // Remove all but the first bundle + for (int i = 1; i < bundles.length; i++) + { + bundles[i].deleteWithContents(); + } + } + + // Nothing needs removing, so just make the changes + subInfo.submission.setMultipleTitles(multipleTitles); + subInfo.submission.setPublishedBefore(publishedBefore); + + // "Multiple files" irrelevant in workflow mode + if (!isWorkflow(subInfo)) + { + subInfo.submission.setMultipleFiles(multipleFiles); + } + + subInfo.submission.update(); + + // Everything went OK if we get to here, so now response + // to the original button press + if (request.getParameter("submit_next") != null) + { + // Update user's progress + userHasReached(subInfo, EDIT_METADATA_1); + + // User has clicked "Next" + doStep(context, request, response, subInfo, EDIT_METADATA_1); + + context.complete(); + } + else + { + // Progress bar button clicked + doStepJump(context, request, response, subInfo); + + context.complete(); + } + } + + + /** + * process input from edit-metadata-1.jsp + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo submission info object + */ + private void processEditMetadataOne(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException, AuthorizeException + { + String buttonPressed = UIUtil.getSubmitButton(request, "submit_next"); + + // Firstly, check for a click of the cancel button. + if (buttonPressed.equals("submit_cancel")) + { + doCancellation(request, + response, + subInfo, + EDIT_METADATA_1, + EDIT_METADATA_1); + return; + } + + Item item = subInfo.submission.getItem(); + + // Update the item metadata. + readNames(request, item, "contributor", "author", true); + readText(request, item, "title", null, false); + + if (subInfo.submission.hasMultipleTitles()) + { + readText(request, item, "title", "alternative", true); + } + + if (subInfo.submission.isPublishedBefore()) + { + readDate(request, item, "date", "issued"); + } + + readSeriesNumbers(request, item, "relation", "ispartofseries", true); + + // FIXME: Maybe should do integrity check using language object + readText(request, item, "language", "iso", false); + + // Identifiers - A special case so do this here + // First, remove existing identifiers. + subInfo.submission.getItem().clearDC("identifier", Item.ANY, Item.ANY); + + // Get qualifiers and values + List quals = getRepeatedParameter(request, "identifier_qualifier"); + List vals = getRepeatedParameter(request, "identifier_value"); + + // Add to item DC + for (int i = 0; i -1) + { + // Remove button pressed - stay with same form + nextStep = EDIT_METADATA_1; + } + + // Write changes to database + subInfo.submission.update(); + + if (nextStep != -1) + { + doStep(context, request, response, subInfo, nextStep); + } + else + { + doStepJump(context, request, response, subInfo); + } + + context.complete(); + } + + + /** + * process input from edit-metadata-2.jsp + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo submission info object + */ + private void processEditMetadataTwo(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException, AuthorizeException + { + String buttonPressed = UIUtil.getSubmitButton(request, "submit_next"); + + // Firstly, check for a click of the cancel button. + if (buttonPressed.equals("submit_cancel")) + { + doCancellation(request, + response, + subInfo, + EDIT_METADATA_2, + EDIT_METADATA_2); + return; + } + + Item item = subInfo.submission.getItem(); + + // Update object from form values + readText(request, item, "subject", null, true); + readText(request, item, "description", "abstract", false); + readText(request, item, "description", "sponsorship", false); + readText(request, item, "description", null, false); + + // Proceed according to button pressed + int nextStep = -1; + + if (buttonPressed.equals("submit_subject_more")) + { + // "Add more" clicked for subject keywords + subInfo.moreBoxesFor = "subject"; + subInfo.jumpToField = "subject"; + nextStep = EDIT_METADATA_2; + } + else if (buttonPressed.equals("submit_prev")) + { + nextStep = EDIT_METADATA_1; + } + else if (buttonPressed.equals("submit_next")) + { + userHasReached(subInfo, UPLOAD_FILES); + nextStep = UPLOAD_FILES; + } + else if (buttonPressed.indexOf("remove") > -1) + { + // Remove button pressed - stay with same form + nextStep = EDIT_METADATA_2; + } + + // Write changes to database + subInfo.submission.update(); + + if (nextStep != -1) + { + doStep(context, request, response, subInfo, nextStep); + } + else + { + doStepJump(context, request, response, subInfo); + } + + context.complete(); + } + + + /** + * Process the input from the choose file page + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + */ + private void processChooseFile(Context context, + HttpServletRequest request, + HttpServletResponse response) + throws ServletException, IOException, SQLException, AuthorizeException + { + // Wrap multipart request to get the submission info + // FIXME: /tmp hardcoded and platform-specific + // FIXME: Ensure this works with large files (no small limit) + MultipartWrapper wrapper = new MultipartWrapper(request, "/tmp"); + SubmissionInfo subInfo = getSubmissionInfo(context, wrapper); + String buttonPressed = UIUtil.getSubmitButton(wrapper, "submit_next"); + + if (subInfo == null) + { + log.warn(LogManager.getHeader(context, + "integrity_error", + UIUtil.getRequestLogInfo(request))); + JSPManager.showIntegrityError(request, response); + return; + } + + Item item = subInfo.submission.getItem(); + + if (buttonPressed.equals("submit_cancel")) + { + doCancellation(request, + response, + subInfo, + SubmitServlet.CHOOSE_FILE, + SubmitServlet.UPLOAD_FILES); + } + else if (buttonPressed.equals("submit_prev")) + { + // Slightly tricky; if the user clicks on "previous," + // and they haven't uploaded any files yet, the previous + // screen is the edit metadata 2 page. If there are + // upload files, we go back to the file list page, + // without uploading the file they've specified. + if (item.getBundles().length > 0) + { + // Have files, go to list + showUploadFileList(request, + response, + subInfo, + false, + false); + } + else + { + // No files, go back to edit metadata 2 + doStep(context, request, response, subInfo, EDIT_METADATA_2); + } + } + else if (buttonPressed.equals("submit_next")) + { + boolean ok = false; + Bitstream b = null; + BitstreamFormat bf = null; + + try + { + File temp = wrapper.getFile("file"); + + if (temp == null) + { + // No file specified + doStep(context, request, response, subInfo, UPLOAD_FILES); + return; + } + + // Read the temp file into a bitstream + InputStream is = new BufferedInputStream(new FileInputStream( + temp)); + b = item.createSingleBitstream(is); + + // Strip all but the last filename. It would be nice + // to know which OS the file came from. + String noPath = wrapper.getFilesystemName("file"); + while (noPath.indexOf('/') > -1) + { + noPath = noPath.substring( + noPath.indexOf('/') + 1); + } + while (noPath.indexOf('\\') > -1) + { + noPath = noPath.substring( + noPath.indexOf('\\') + 1); + } + + b.setName(noPath); + b.setSource(wrapper.getFilesystemName("file")); + b.setDescription(wrapper.getParameter("description")); + + // Identify the format + bf = FormatIdentifier.guessFormat(context, b); + b.setFormat(bf); + + // Update to DB + b.update(); + item.update(); + + ok = true; + } + catch (IOException ie) + { + // Error storing bitstream - log it, leave ok=false + log.warn(LogManager.getHeader(context, + "upload_error", + ""), + ie); + } + + if (ok) + { + // Uploaded etc. OK + if (bf != null) + { + // Format was identified + showUploadFileList(request, response, subInfo, true, false); + } + else + { + // Format couldn't be identified + showGetFileFormat(context, request, response, subInfo, b); + } + context.complete(); + } + else + { + request.setAttribute("submission.info", subInfo); + JSPManager.showJSP(request, + response, + "/submit/upload_error.jsp"); + } + } + else + { + doStepJump(context, request, response, subInfo); + } + } + + + /** + * Process input from get file type page + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo submission info object + */ + private void processGetFileFormat(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException, AuthorizeException + { + String buttonPressed = UIUtil.getSubmitButton(request, "submit"); + + if (subInfo.bitstream != null) + { + // Did the user select a format? + int typeID = UIUtil.getIntParameter(request, "format"); + + BitstreamFormat format = BitstreamFormat.find(context, typeID); + + if (format != null) + { + subInfo.bitstream.setFormat(format); + } + else + { + String userDesc = request.getParameter("format_description"); + subInfo.bitstream.setUserFormatDescription(userDesc); + } + + subInfo.bitstream.update(); + + if (buttonPressed.equals("submit")) + { + showUploadFileList(request, response, subInfo, true, false); + } + else + { + doStepJump(context, request, response, subInfo); + } + context.complete(); + } + else + { + log.warn(LogManager.getHeader(context, + "integrity_error", + UIUtil.getRequestLogInfo(request))); + JSPManager.showIntegrityError(request, response); + } + } + + + /** + * Process input from file list page + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo submission info object + */ + private void processFileList(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException, AuthorizeException + { + String buttonPressed = UIUtil.getSubmitButton(request, "submit_next"); + Item item = subInfo.submission.getItem(); + + if (buttonPressed.equals("submit_cancel")) + { + doCancellation(request, + response, + subInfo, + SubmitServlet.FILE_LIST, + SubmitServlet.UPLOAD_FILES); + } + else if (buttonPressed.equals("submit_prev")) + { + // In some cases, this might be expected to go back + // to the "choose file" page, but that doesn't make + // a great deal of sense, so go back to edit metadata 2. + doStep(context, request, response, subInfo, EDIT_METADATA_2); + } + else if (buttonPressed.equals("submit_next")) + { + // Finished the uploading of files + // FIXME Validation check here + userHasReached(subInfo, REVIEW_SUBMISSION); + doStep(context, request, response, subInfo, REVIEW_SUBMISSION); + context.complete(); + } + else if (buttonPressed.equals("submit_more")) + { + // Upload another file + request.setAttribute("submission.info", subInfo); + JSPManager.showJSP(request, response, "/submit/choose-file.jsp"); + } + else if (buttonPressed.equals("submit_show_checksums")) + { + // Show the checksums + showUploadFileList(request, response, subInfo, false, true); + } + else if (buttonPressed.startsWith("submit_describe_")) + { + // Change the description of a bitstream + Bitstream bitstream; + + // Which bitstream does the user want to describe? + try + { + int id = Integer.parseInt(buttonPressed.substring(16)); + bitstream = Bitstream.find(context, id); + } + catch (NumberFormatException nfe) + { + bitstream = null; + } + + if (bitstream == null) + { + // Invalid or mangled bitstream ID + log.warn(LogManager.getHeader(context, + "integrity_error", + UIUtil.getRequestLogInfo(request))); + JSPManager.showIntegrityError(request, response); + return; + } + + // Display the form letting them change the description + subInfo.bitstream = bitstream; + request.setAttribute("submission.info", subInfo); + JSPManager.showJSP(request, response, + "/submit/change-file-description.jsp"); + } + else if (buttonPressed.startsWith("submit_remove_")) + { + // A "remove" button must have been pressed + Bitstream bitstream; + + // Which bitstream does the user want to describe? + try + { + int id = Integer.parseInt(buttonPressed.substring(14)); + bitstream = Bitstream.find(context, id); + } + catch (NumberFormatException nfe) + { + bitstream = null; + } + + if (bitstream == null) + { + // Invalid or mangled bitstream ID + log.warn(LogManager.getHeader(context, + "integrity_error", + UIUtil.getRequestLogInfo(request))); + JSPManager.showIntegrityError(request, response); + return; + } + + // FIXME: Assumes: 1 bitstream in each bundle + Bundle[] bundles = bitstream.getBundles(); + item.removeBundle(bundles[0]); + bundles[0].deleteWithContents(); + item.update(); + + showFirstUploadPage(context,request, response, subInfo); + context.complete(); + } + else if (buttonPressed.startsWith("submit_format_")) + { + // A "format is wrong" button must have been pressed + Bitstream bitstream; + + // Which bitstream does the user want to describe? + try + { + int id = Integer.parseInt(buttonPressed.substring(14)); + bitstream = Bitstream.find(context, id); + } + catch (NumberFormatException nfe) + { + bitstream = null; + } + + if (bitstream == null) + { + // Invalid or mangled bitstream ID + log.warn(LogManager.getHeader(context, + "integrity_error", + UIUtil.getRequestLogInfo(request))); + JSPManager.showIntegrityError(request, response); + return; + } + + subInfo.bitstream = bitstream; + showGetFileFormat(context, request, response, subInfo, bitstream); + } + else + { + doStepJump(context, request, response, subInfo); + } + } + + + /** + * Process input from the upload error page + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo submission info object + */ + private void processUploadError(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException, AuthorizeException + { + String buttonPressed = UIUtil.getSubmitButton(request, "submit_next"); + + // no real options on the page, just retry! + if (buttonPressed.equals("submit")) + { + request.setAttribute("submission.info", subInfo); + JSPManager.showJSP(request, response, "/submit/choose-file.jsp"); + } + else + { + doStepJump(context, request, response, subInfo); + } + } + + + /** + * Process input from the "change file description" page + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo submission info object + */ + private void processChangeFileDescription(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException, AuthorizeException + { + if (subInfo.bitstream != null) + { + subInfo.bitstream.setDescription( + request.getParameter("description")); + subInfo.bitstream.update(); + + if (request.getParameter("submit") != null) + { + showUploadFileList(request, response, subInfo, false, false); + } + else + { + doStepJump(context, request, response, subInfo); + } + + context.complete(); + } + else + { + log.warn(LogManager.getHeader(context, + "integrity_error", + UIUtil.getRequestLogInfo(request))); + JSPManager.showIntegrityError(request, response); + } + } + + + /** + * Process information from "submission cancelled" page + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo submission info object + */ + private void processCancellation(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException, AuthorizeException + { + String buttonPressed = UIUtil.getSubmitButton(request, "submit_back"); + + if (buttonPressed.equals("submit_back")) + { + // User wants to continue with submission + int previous = UIUtil.getIntParameter(request, "previous_step"); + + doStep(context, request, response, subInfo, previous); + } + else if (buttonPressed.equals("submit_remove")) + { + // User wants to cancel and remove + // Cancellation page only applies to workspace items + WorkspaceItem wi = (WorkspaceItem) subInfo.submission; + + wi.delete(); + + JSPManager.showJSP(request, response, + "/submit/cancelled-removed.jsp"); + + context.complete(); + } + else if (buttonPressed.equals("submit_keep")) + { + // Save submission for later - just show message + JSPManager.showJSP(request, response, + "/submit/saved.jsp"); + } + else + { + doStepJump(context, request, response, subInfo); + } + } + + + /** + * Process button click on "review submission" page + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo submission info object + */ + private void processReview(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException, AuthorizeException + { + String buttonPressed = UIUtil.getSubmitButton(request, "submit_cancel"); + + if (buttonPressed.equals("submit_cancel")) + { + doCancellation(request, + response, + subInfo, + REVIEW_SUBMISSION, + REVIEW_SUBMISSION); + } + else if (buttonPressed.equals("submit_next")) + { + // If the user is performing the initial submission + // of an item, we go to the grant license stage + if (!isWorkflow(subInfo)) + { + userHasReached(subInfo, GRANT_LICENSE); + doStep(context, request, response, subInfo, GRANT_LICENSE); + context.complete(); + } + else + { + // The user is performing an edit as part + // of a workflow task, so we take them + // back to the relevant perform task page +/* FIXME EPerson user = getCurrentUser(request); + + MyDSpaceServlet.showPerformTask( + request, + response, + user, + subInfo.workflowItem); +*/ } + } + else if (buttonPressed.equals("submit_prev")) + { + // Back to file upload + doStep(context, request, response, subInfo, UPLOAD_FILES); + } + else + { + doStepJump(context, request, response, subInfo); + } + } + + /** + * Process the input from the license page + * + * @param context current DSpace context + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo submission info object + */ + private void processLicense(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException, AuthorizeException + { + String buttonPressed = UIUtil.getSubmitButton(request, "submit_cancel"); + + if (buttonPressed.equals("submit_grant")) + { + // License granted + log.info(LogManager.getHeader(context, + "accept_license", + getSubmissionLogInfo(subInfo))); + + WorkflowManager.start(context, (WorkspaceItem) subInfo.submission); + + // FIXME: pass in more information about what happens next? + JSPManager.showJSP(request, response, "/submit/complete.jsp"); + } + else if (request.getParameter("submit_reject") != null) + { + // User has rejected license. + log.info(LogManager.getHeader(context, + "reject_license", + getSubmissionLogInfo(subInfo))); + + // Show information page. + JSPManager.showJSP(request, + response, + "/submit/license-rejected.jsp"); + } + else + { + doStepJump(context, request, response, subInfo); + } + } + + + //**************************************************************** + //**************************************************************** + // METHODS FOR SHOWING FORMS + //**************************************************************** + //**************************************************************** + + /** + * Process a click on a buttonin the progress bar. to jump to a step. + * This method should be called when it has been determined that no + * other button has been pressed. + * + * @param context DSpace context object + * @param request the request object + * @param response the response object + * @param subInfo SubmissionInfo pertaining to this submission + */ + private void doStepJump(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws ServletException, IOException, SQLException + { + // Find the button that was pressed. It would start with + // "submit_jump_". + String buttonPressed = UIUtil.getSubmitButton(request, ""); + + int nextStep = -1; + + if (buttonPressed.startsWith("submit_jump_")) + { + // Button on progress bar pressed + try + { + nextStep = Integer.parseInt(buttonPressed.substring(12, 13)); + } + catch (NumberFormatException ne) + { + // mangled number + nextStep = -1; + } + + // Integrity check: make sure they aren't going + // forward or backward too far + if (nextStep <= SubmitServlet.SELECT_COLLECTION) + { + nextStep = -1; + } + + if (nextStep > getStepReached(subInfo)) + { + nextStep = -1; + } + } + + if (nextStep == -1) + { + // Either no button pressed, or an illegal stage + // reached. UI doesn't allow this, so something's + // wrong if that happens. + log.warn(LogManager.getHeader(context, + "integrity_error", + UIUtil.getRequestLogInfo(request))); + JSPManager.showIntegrityError(request, response); + } + else + { + // Do the relevant step + doStep(context, request, response, subInfo, nextStep); + } + } + + /** + * Display the page for the relevant step. Pass in a step number + * between SubmitServlet.INITIAL_QUESTIONS and + * SubmitServlet.SUBMISSION_COMPLETE - other cases (such as cancellations + * and multi-file upload interactions) are handled elsewhere. + * + * @param context DSpace context + * @param request the request object + * @param response the response object + * @param subInfo SubmissionInfo pertaining to this submission + * @param step the step number to display + */ + private void doStep(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo, + int step) + throws ServletException, IOException, SQLException + { + // All steps require the submitforminfo + request.setAttribute("submission.info", subInfo); + + switch (step) + { + case INITIAL_QUESTIONS: + JSPManager.showJSP(request, + response, + "/submit/initial-questions.jsp"); + break; + + case EDIT_METADATA_1: + JSPManager.showJSP(request, + response, + "/submit/edit-metadata-1.jsp"); + break; + + case EDIT_METADATA_2: + JSPManager.showJSP(request, + response, + "/submit/edit-metadata-2.jsp"); + break; + + case UPLOAD_FILES: + showFirstUploadPage(context, request, response, subInfo); + break; + + case CHOOSE_FILE: + JSPManager.showJSP(request, response, "/submit/choose-file.jsp"); + break; + + case FILE_LIST: + showUploadFileList(request, + response, + subInfo, + false, + false); + break; + + case REVIEW_SUBMISSION: + JSPManager.showJSP(request, response, "/submit/review.jsp"); + break; + + case GRANT_LICENSE: + Collection c = subInfo.submission.getCollection(); + request.setAttribute("license", c.getLicense()); + JSPManager.showJSP(request, response, "submit/show-license.jsp"); + break; + + case SUBMISSION_COMPLETE: + JSPManager.showJSP(request, response, "submit/complete.jsp"); + break; + + default: + log.warn(LogManager.getHeader(context, + "integrity_error", + UIUtil.getRequestLogInfo(request))); + JSPManager.showIntegrityError(request, response); + } + } + + /** + * Respond to the user clicking "cancel". + * + * @param request current servlet request object + * @param response current servlet response object + * @param subInfo SubmissionInfo object + * @param step step corresponding to the page the user + * clicked "cancel" on. + * @param displayStep the step the user had reached in terms + * of the progress bar. + */ + private void doCancellation(HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo, + int step, + int displayStep) + throws ServletException, IOException, SQLException + { + // If this is a workflow item, we need to return the + // user to the "perform task" page + if (isWorkflow(subInfo)) + { +/* // Get the user + EPerson user = getCurrentUser(request); + + MyDSpaceServlet.showPerformTask( + request, + response, + user, + subInfo.workflowItem); +*/ } + else + { + request.setAttribute("submission.info", subInfo); + request.setAttribute("step", String.valueOf(step)); + request.setAttribute("display.step", + String.valueOf(displayStep)); + JSPManager.showJSP(request, response, "/submit/cancel.jsp"); + } + } + + /** + * Display the first appropriate page in the file upload sequence. + * Which page this is depends on whether the user has uploaded + * any files in this item already. + * + * @param context the DSpace context object + * @param request the request object + * @param response the response object + * @param subInfo the SubmissionInfo object + */ + private void showFirstUploadPage(Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo) + throws SQLException, ServletException, IOException + { + Bundle[] bundles = subInfo.submission.getItem().getBundles(); + + if (bundles.length > 0) + { + // The item has files associated with it. + showUploadFileList(request, + response, + subInfo, + false, + false); + } + else + { + // No items uploaded yet; show the "choose file" page + doStep(context, request, response, subInfo, CHOOSE_FILE); + } + } + + /** + * Show the upload file page + * + * @param request the request object + * @param response the response object + * @param subInfo the SubmissionInfo object + * @param justUploaded pass in true if the user just successfully + * uploaded a file + * @param showChecksums pass in true if checksums should be displayed + */ + private void showUploadFileList(HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo, + boolean justUploaded, + boolean showChecksums) + throws SQLException, ServletException, IOException + { + // Set required attributes + request.setAttribute("submission.info", subInfo); + request.setAttribute("just.uploaded", new Boolean(justUploaded)); + request.setAttribute("show.checksums", new Boolean(showChecksums)); + + // Always go to advanced view in workflow mode + if (subInfo.submission.hasMultipleFiles()) + { + JSPManager.showJSP(request, + response, + "/submit/upload-file-list.jsp"); + } + else + { + // FIXME: Assume one and only one bitstream + JSPManager.showJSP(request, + response, + "/submit/show-uploaded-file.jsp"); + } + } + + /** + * Get the type of a file from the user + * + * @param context context object + * @param request the request object + * @param response the response object + * @param subInfo the SubmissionInfo object + * @param bitstream the Bitstream to get the type of + */ + private void showGetFileFormat( + Context context, + HttpServletRequest request, + HttpServletResponse response, + SubmissionInfo subInfo, + Bitstream bitstream) + throws SQLException, ServletException, IOException + { + BitstreamFormat[] formats = BitstreamFormat.findNonInternal(context); + + subInfo.bitstream = bitstream; + + request.setAttribute("submission.info", subInfo); + request.setAttribute("bitstream.formats", formats); + + // What does the system think it is? + BitstreamFormat guess = + FormatIdentifier.guessFormat(context, bitstream); + + request.setAttribute("guessed.format", guess); + + JSPManager.showJSP(request, response, "/submit/get-file-format.jsp"); + } + + + //**************************************************************** + //**************************************************************** + // MISCELLANEOUS CONVENIENCE METHODS + //**************************************************************** + //**************************************************************** + + /** + * Get a filled-out submission info object from the parameters + * in the current request. If there is a problem, null + * is returned. + * + * @param context DSpace context + * @param request HTTP request + * + * @return filled-out submission info, or null + */ + private SubmissionInfo getSubmissionInfo(Context context, + HttpServletRequest request) + throws SQLException + { + SubmissionInfo info = new SubmissionInfo(); + + if (request.getParameter("workflow_id") != null) + { + int workflowID = UIUtil.getIntParameter(request, "workflow_id"); + info.submission = WorkflowItem.find(context, workflowID); + } + else + { + int workspaceID = UIUtil.getIntParameter(request, + "workspace_item_id"); + info.submission = WorkspaceItem.find(context, workspaceID); + } + + // Is something wrong? + if (info.submission == null) + { + return null; + } + + if (request.getParameter("bundle_id") != null) + { + int bundleID = UIUtil.getIntParameter(request, "bundle_id"); + info.bundle = Bundle.find(context, bundleID); + } + + if (request.getParameter("bitstream_id") != null) + { + int bitstreamID = UIUtil.getIntParameter(request, "bitstream_id"); + info.bitstream = Bitstream.find(context, bitstreamID); + } + + return info; + } + + + /** + * Is the submission in the workflow process? + * + * @param si the submission info + * @return true if the submission is in the workflow process + */ + public static boolean isWorkflow(SubmissionInfo si) + { + return (si.submission != null && si.submission instanceof WorkflowItem); + } + + + /** + * Return the submission info as hidden parameters for an HTML form + * + * @param si the submission info + * @return HTML hidden parameters + */ + public static String getSubmissionParameters(SubmissionInfo si) + { + String info = ""; + + if (isWorkflow(si)) + { + info = info + ""; + } + else + { + info = info + ""; + } + + if (si.bundle != null) + { + info = info + ""; + } + + if (si.bitstream != null) + { + info = info + ""; + } + + return info; + } + + + + /** + * Return text information suitable for logging + * + * @param si the submission info + * @return the type and ID of the submission, bundle and/or bitstream + * for logging + */ + public String getSubmissionLogInfo(SubmissionInfo si) + { + String info = ""; + + if (isWorkflow(si)) + { + info = info + "workflow_id=" + si.submission.getID(); + } + else + { + info = info + "workspace_item_id" + si.submission.getID(); + } + + if (si.bundle != null) + { + info = info + ",bundle_id=" + si.bundle.getID(); + } + + if (si.bitstream != null) + { + info = info + ",bitstream_id=" + si.bitstream.getID(); + } + + return info; + } + + + /** + * Indicate the user has advanced to the given stage. This will + * only actually do anything when it's a user initially entering + * a submission. It will only increase the "stage reached" column - + * it will not "set back" where a user has reached. + * + * @param subInfo the SubmissionInfo object pertaining to the current + * submission + * @param step the step the user has just reached + */ + private void userHasReached(SubmissionInfo subInfo, int step) + throws SQLException, AuthorizeException + { + if (!isWorkflow(subInfo)) + { + WorkspaceItem wi = (WorkspaceItem) subInfo.submission; + if (step > wi.getStageReached()) + { + wi.setStageReached(step); + wi.update(); + } + } + } + + + /** + * Find out which step a user has reached in the submission process. If + * the submission is in the workflow process, this returns + * REVIEW_SUBMISSION. + * + * @param subInfo submission info object + * + * @return step reached, between SELECT_COLLECTION and SUBMISSION_COMPLETE + */ + public static int getStepReached(SubmissionInfo subInfo) + { + if (isWorkflow(subInfo)) + { + return REVIEW_SUBMISSION; + } + else + { + WorkspaceItem wi = (WorkspaceItem) subInfo.submission; + int i = wi.getStageReached(); + + // Uninitialised workspace items give "-1" as the stage reached + // this is a special value used by the progress bar, so we change + // it to "INITIAL_QUESTIONS" + if (i == -1) + { + i = INITIAL_QUESTIONS; + } + +System.err.println("GOOOOO: " + i); + return i; + } + } + + + //**************************************************************** + //**************************************************************** + // METHODS FOR FILLING DC FIELDS FROM METADATA FORMS + //**************************************************************** + //**************************************************************** + + /** + * Set relevant DC fields in an item from name values in the form. + * Some fields are repeatable in the form. If this is the case, and + * the field is "contributor.author", the names in the request + * will be from the fields as follows: + * + * contributor_author_last_0 -> last name of first author + * contributor_author_first_0 -> first name(s) of first author + * contributor_author_last_1 -> last name of second author + * contributor_author_first_1 -> first name(s) of second author + * + * and so on. If the field is unqualified: + * + * contributor_last_0 -> last name of first contributor + * contributor_first_0 -> first name(s) of first contributor + * + * If the parameter "submit_contributor_author_remove_n" is set, that + * value is removed. + * + * Otherwise the parameters are of the form: + * + * contributor_author_last + * contributor_author_first + * + * The values will be put in separate DCValues, in the form + * "last name, first name(s)", ordered as they appear in the list. + * These will replace any existing values. + * + * @param request the request object + * @param item the item to update + * @param element the DC element + * @param qualifier the DC qualifier, or null if unqualified + * @param repeated set to true if the field is repeatable on the form + */ + private void readNames(HttpServletRequest request, + Item item, + String element, + String qualifier, + boolean repeated) + { + String dcname = element; + if (qualifier != null) + { + dcname = element + "_" + qualifier; + } + + // Names to add + List firsts = new LinkedList(); + List lasts = new LinkedList(); + + if (repeated) + { + firsts = getRepeatedParameter(request, dcname + "_first"); + lasts = getRepeatedParameter(request, dcname + "_last"); + + // Find out if the relevant "remove" button was pressed + String buttonPressed = UIUtil.getSubmitButton(request, ""); + String removeButton = "submit_" + dcname + "_remove_"; + + if (buttonPressed.startsWith(removeButton)) + { + int valToRemove = Integer.parseInt( + buttonPressed.substring(removeButton.length())); + + firsts.remove(valToRemove); + lasts.remove(valToRemove); + } + } + else + { + // Just a single name + String lastName = request.getParameter(dcname + "_last"); + String firstNames = request.getParameter(dcname + "_first"); + + // Only put it in if there was a name present + if (lastName != null && !lastName.equals("")) + { + lasts.add(lastName); + firsts.add(firstNames); + } + } + + // Remove existing values + item.clearDC(element, qualifier, Item.ANY); + + // Put the names in the correct form + for (int i = 0; i < lasts.size(); i++) + { + String f = ((String) firsts.get(i)).trim(); + String l = ((String) lasts.get(i)).trim(); + + // If there is a comma in the last name, we take everything + // after that comma, and add it to the right of the + // first name + int comma = l.indexOf(','); + + if (comma >= 0) + { + f = f + l.substring(comma + 1); + l = l.substring(0, comma); + + // Remove leading whitespace from first name + while (f.startsWith(" ")) + { + f = f.substring(1); + } + } + + // Add to the database + item.addDC(element, qualifier, null, + new DCPersonName(l, f).toString()); + } + } + + + /** + * Fill out an item's DC values from a plain standard text field. + * If the field isn't repeatable, the input field name is called: + * + * element_qualifier + * + * or for an unqualified element: + * + * element + * + * Repeated elements are appended with an underscore then an integer. + * e.g.: + * + * title_alternative_0 + * title_alternative_1 + * + * The values will be put in separate DCValues, ordered as they appear + * in the list. These will replace any existing values. + * + * @param request the request object + * @param item the item to update + * @param element the DC element + * @param qualifier the DC qualifier, or null if unqualified + * @param repeated set to true if the field is repeatable on the form + */ + private void readText(HttpServletRequest request, + Item item, + String element, + String qualifier, + boolean repeated) + { + String dcname = element; + if (qualifier != null) + { + dcname = element + "_" + qualifier; + } + + // Values to add + List vals = new LinkedList(); + + if (repeated) + { + vals = getRepeatedParameter(request, dcname); + + // Find out if the relevant "remove" button was pressed + String buttonPressed = UIUtil.getSubmitButton(request, ""); + String removeButton = "submit_" + dcname + "_remove_"; + + if (buttonPressed.startsWith(removeButton)) + { + int valToRemove = Integer.parseInt( + buttonPressed.substring(removeButton.length())); + + vals.remove(valToRemove); + } + } + else + { + // Just a single name + String s = request.getParameter(dcname); + + // Only put it in if there was a name present + if (s != null && !s.equals("")) + { + vals.add(s); + } + } + + // Remove existing values + item.clearDC(element, qualifier, Item.ANY); + + // Put the names in the correct form + for (int i = 0; i < vals.size(); i++) + { + // Add to the database + item.addDC(element, qualifier, null, (String) vals.get(i)); + } + } + + + /** + * Fill out a DC date field with the value from a form. The date is + * taken from the three parameters: + * + * element_qualifier_year + * element_qualifier_month + * element_qualifier_day + * + * The granularity is determined by the values that are actually set. + * If the year isn't set (or is invalid) + * + * @param request the request object + * @param item the item to update + * @param element the DC element + * @param qualifier the DC qualifier, or null if unqualified + */ + private void readDate(HttpServletRequest request, + Item item, + String element, + String qualifier) + throws SQLException + { + String dcname = element; + if (qualifier != null) + { + dcname = element + "_" + qualifier; + } + + int year = UIUtil.getIntParameter(request, dcname + "_year"); + int month = UIUtil.getIntParameter(request, dcname + "_month"); + int day = UIUtil.getIntParameter(request, dcname + "_day"); + + // FIXME: Probably should be some more validation + // Make a standard format date + DCDate d = new DCDate(); + + d.setDateLocal(year, month, day, -1, -1, -1); + + item.clearDC(element, qualifier, Item.ANY); + + if (year > 0) + { + // Only put in date if there is one! + item.addDC(element, qualifier, null, d.toString()); + } + } + + + /** + * Set relevant DC fields in an item from series/number values in the + * form. Some fields are repeatable in the form. If this is the case, + * and the field is "relation.ispartof", the names in the request + * will be from the fields as follows: + * + * relation_ispartof_series_0 + * relation_ispartof_number_0 + * relation_ispartof_series_1 + * relation_ispartof_number_1 + * + * and so on. If the field is unqualified: + * + * relation_series_0 + * relation_number_0 + * + * Otherwise the parameters are of the form: + * + * relation_ispartof_series + * relation_ispartof_number + * + * The values will be put in separate DCValues, in the form + * "last name, first name(s)", ordered as they appear in the list. + * These will replace any existing values. + * + * @param request the request object + * @param item the item to update + * @param element the DC element + * @param qualifier the DC qualifier, or null if unqualified + * @param repeated set to true if the field is repeatable on the form + */ + private void readSeriesNumbers(HttpServletRequest request, + Item item, + String element, + String qualifier, + boolean repeated) + { + String dcname = element; + if (qualifier != null) + { + dcname = element + "_" + qualifier; + } + + // Names to add + List series = new LinkedList(); + List numbers = new LinkedList(); + + if (repeated) + { + series = getRepeatedParameter(request, dcname + "_series"); + numbers = getRepeatedParameter(request, dcname + "_number"); + + // Find out if the relevant "remove" button was pressed + String buttonPressed = UIUtil.getSubmitButton(request, ""); + String removeButton = "submit_" + dcname + "_remove_"; + + if (buttonPressed.startsWith(removeButton)) + { + int valToRemove = Integer.parseInt( + buttonPressed.substring(removeButton.length())); + + series.remove(valToRemove); + numbers.remove(valToRemove); + } + } + else + { + // Just a single name + String s = request.getParameter(dcname + "_series"); + String n = request.getParameter(dcname + "_number"); + + // Only put it in if there was a name present + if (s != null && !s.equals("")) + { + series.add(s); + numbers.add(n); + } + } + + // Remove existing values + item.clearDC(element, qualifier, Item.ANY); + + // Put the names in the correct form + for (int i = 0; i < series.size(); i++) + { + String s = ((String) series.get(i)).trim(); + String n = ((String) numbers.get(i)).trim(); + + item.addDC(element, qualifier, null, + new DCSeriesNumber(s, n).toString()); + } + } + + + /** + * Get repeated values from a form. If "foo" is passed in, values in + * the form of parameters "foo_0", "foo_1", etc. are returned. + * + * @param request the HTTP request containing the form information + * @param param the repeated parameter + * + * @return a List of Strings + */ + private List getRepeatedParameter(HttpServletRequest request, + String param) + { + List vals = new LinkedList(); + + int i = 0; + boolean foundLast = false; + + // Iterate through the values in the form. + while (!foundLast) + { + String s = request.getParameter(param + "_" + i); + + // We're only going to add non-empty names + if (s != null && !s.equals("")) + { + vals.add(s); + } + + // If the value was null (as opposed to present, + // but empty) we've reached the last name + foundLast = (s == null); + i++; + } + + // Make into an array + return vals; + } +} diff --git a/dspace/src/org/dspace/app/webui/util/SubmissionInfo.java b/dspace/src/org/dspace/app/webui/util/SubmissionInfo.java new file mode 100644 index 0000000000..7173be09d9 --- /dev/null +++ b/dspace/src/org/dspace/app/webui/util/SubmissionInfo.java @@ -0,0 +1,75 @@ +/* + * SubmissionInfo.java + * + * 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. + */ + +package org.dspace.app.webui.util; + +import org.dspace.content.Bitstream; +import org.dspace.content.Bundle; +import org.dspace.content.InProgressSubmission; + +/** + * Information about an item being editing with the submission UI + * + * @author Robert Tansley + * @version $Revision$ + */ +public class SubmissionInfo +{ + /** The submission */ + public InProgressSubmission submission; + + /** The step reached in the submission process (where the user can jump) */ + public int stepReached; + + /** The element or element_qualifier to show more input boxes for */ + public String moreBoxesFor; + + /** The element or element_qualifier to scroll to initially using anchor */ + public String jumpToField; + + /** If true, something on the form is missing */ + public boolean missing; + + /** Specific bundle we're dealing with */ + public Bundle bundle; + + /** Specific bitstream we're dealing with */ + public Bitstream bitstream; +} diff --git a/dspace/src/org/dspace/app/webui/util/UIUtil.java b/dspace/src/org/dspace/app/webui/util/UIUtil.java index ec51a0ae13..702b3ed049 100644 --- a/dspace/src/org/dspace/app/webui/util/UIUtil.java +++ b/dspace/src/org/dspace/app/webui/util/UIUtil.java @@ -40,7 +40,9 @@ package org.dspace.app.webui.util; + import java.sql.SQLException; +import java.util.Enumeration; import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; @@ -60,6 +62,7 @@ import org.dspace.eperson.EPerson; */ public class UIUtil { + /** log4j category */ private static Logger log = Logger.getLogger(UIUtil.class); @@ -90,6 +93,7 @@ public class UIUtil if (userID != null) { EPerson e = EPerson.find(c, userID.intValue()); + Authenticate.loggedIn(c, request, e); } @@ -103,7 +107,6 @@ public class UIUtil return c; } - /** * Get the current community location, that is, where the user "is". * This returns null if there is no location, i.e. "all of @@ -118,7 +121,6 @@ public class UIUtil return ((Community) request.getAttribute("dspace.community")); } - /** * Get the current collection location, that is, where the user "is". * This returns null if there is no collection location, i.e. the @@ -133,7 +135,6 @@ public class UIUtil return ((Collection) request.getAttribute("dspace.collection")); } - /** * Put the original request URL into the request object as an attribute * for later use. This is necessary because forwarding a request removes @@ -149,6 +150,7 @@ public class UIUtil if (orig == null) { String fullURL = request.getServletPath(); + if (request.getQueryString() != null) { fullURL = fullURL + "?" + request.getQueryString(); @@ -158,7 +160,6 @@ public class UIUtil } } - /** * Get the original request URL. * @@ -174,8 +175,6 @@ public class UIUtil return ((String) request.getAttribute("dspace.original.url")); } - - /** * Utility method to convert spaces in a string to HTML non-break space * elements. @@ -191,6 +190,7 @@ public class UIUtil for (int i = 0; i < s.length(); i++) { char ch = s.charAt(i); + if (ch == ' ') { newString.append(" "); @@ -204,7 +204,6 @@ public class UIUtil return newString.toString(); } - /** * Write a human-readable version of a DCDate. * @@ -286,4 +285,114 @@ public class UIUtil return (sb.toString()); } + + /** + * Return a string for logging, containing useful information about the + * current request - the URL, the method and parameters. + * + * @param request the request object. + * @return a multi-line string containing information about + * the request. + */ + public static String getRequestLogInfo(HttpServletRequest request) + { + String report; + + report = "-- URL Was: " + getOriginalURL(request) + "\n"; + report = report + "-- Method: " + request.getMethod() + "\n"; + + // First write the parameters we had + report = report + "-- Parameters were:\n"; + Enumeration e = request.getParameterNames(); + + while (e.hasMoreElements()) + { + String name = (String) e.nextElement(); + + if (name.equals("login_password")) + { + // We don't want to write a clear text password + // to the log, even if it's wrong! + report = report + "-- " + name + ": *not logged*\n"; + } + else + { + report = report + "-- " + name + ": \"" + request.getParameter(name) + "\"\n"; + } + } + + return report; + } + + + /** + * Obtain a parameter from the given request as an int. -1 + * is returned if the parameter is garbled or does not exist. + * + * @param request the HTTP request + * @param param the name of the parameter + * + * @return the integer value of the parameter, or -1 + */ + public static int getIntParameter(HttpServletRequest request, String param) + { + String val = request.getParameter(param); + + try + { + return Integer.parseInt(val); + } + catch (Exception e) + { + // Problem with parameter + return -1; + } + } + + + /** + * Obtain a parameter from the given request as a boolean. + * false is returned if the parameter is garbled or does not + * exist. + * + * @param request the HTTP request + * @param param the name of the parameter + * + * @return the integer value of the parameter, or -1 + */ + public static boolean getBoolParameter(HttpServletRequest request, + String param) + { + return (request.getParameter(param) != null && + request.getParameter(param).equals("true")); + } + + + /** + * Get the button the user pressed on a submitted form. All buttons + * should start with the text submit for this to work. + * A default should be supplied, since often the browser will submit a form + * with no submit button pressed if the user presses enter. + * + * @param request the HTTP request + * @param def the default button + * + * @return the button pressed + */ + public static String getSubmitButton(HttpServletRequest request, String def) + { + Enumeration e = request.getParameterNames(); + + while (e.hasMoreElements()) + { + String parameterName = (String) e.nextElement(); + + if (parameterName.startsWith("submit")) + { + return parameterName; + } + } + + return def; + } } diff --git a/dspace/src/org/dspace/content/DCLanguage.java b/dspace/src/org/dspace/content/DCLanguage.java new file mode 100644 index 0000000000..f831bbadbc --- /dev/null +++ b/dspace/src/org/dspace/content/DCLanguage.java @@ -0,0 +1,145 @@ +/* + * DCLanguage.java + * + * 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. + */ + +package org.dspace.content; + +import java.util.Locale; + + +/** + * Utility class for dealing with languages + * + * @author Robert Tansley + * @version $Revision$ + */ +public class DCLanguage +{ + + /** The country code */ + private String country; + + /** The language code. Special values: "" and "other". */ + private String language; + + /** + * Construct a language object from a database entry + * + * @param l the language text from the database + */ + public DCLanguage(String l) + { + setLanguage(l); + } + + /** + * Write the language out to the database + * + * @return the language in a form for writing to the DCValue table + */ + public String toString() + { + if (language.equals("")) + { + return ""; + } + else if (country.equals("")) + { + return language; + } + else + { + return country + "_" + language; + } + } + + /** + * Set the language and country + * + * @param l The language and country code, e.g. "en_US" or "fr" + */ + public void setLanguage(String l) + { + if (l.equals("other")) + { + language = "other"; + country = ""; + } + else if (l.length() == 2) + { + language = l; + country = ""; + } + else if (l.length() == 5) + { + language = l.substring(0, 2); + country = l.substring(3); + } + else + { + language = ""; + country = ""; + } + } + + /** + * Get the displayable name for this language + * + * @return the displayable name + */ + public String getDisplayName() + { + Locale locale; + + if (language.equals("other")) + { + return "(Other)"; + } + else if (language.equals("")) + { + return "N/A"; + } + else + { + locale = new Locale(language, country); + return locale.getDisplayName(); + } + } + +} diff --git a/dspace/src/org/dspace/content/DCSeriesNumber.java b/dspace/src/org/dspace/content/DCSeriesNumber.java new file mode 100644 index 0000000000..39bf98b31f --- /dev/null +++ b/dspace/src/org/dspace/content/DCSeriesNumber.java @@ -0,0 +1,137 @@ +/* + * SeriesNumber.java + * + * 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. + */ + +package org.dspace.content; + + +/** + * Series and report number, as stored in relation.ispartofseries + * + * @author Robert Tansley + * @version $Id$ + */ +public class DCSeriesNumber +{ + /** Series */ + private String series; + + /** Number */ + private String number; + + /** Construct clean series number */ + public DCSeriesNumber() + { + series = null; + number = null; + } + + /** + * Construct from raw DC value + * + * @param value value from database + */ + public DCSeriesNumber(String value) + { + this(); + + int semicolon = -1; + + if (value != null) semicolon = value.indexOf(';'); + + if (semicolon >= 0) + { + series = value.substring(0, semicolon); + number = value.substring(semicolon + 1); + } + else + { + series = value; + } + } + + /** + * Construct from given values + * + * @param s the series + * @param n the number + */ + public DCSeriesNumber(String s, String n) + { + series = s; + number = n; + } + + /** + * Write as raw DC value + * + * @return the series and number as they should be stored in the DB + */ + public String toString() + { + if (series == null) + { + return (null); + } + else if (number == null) + { + return (series); + } + else + { + return (series + ";" + number); + } + } + + /** + * Get the series name - guaranteed non-null + */ + public String getSeries() + { + return (series == null ? "" : series); + } + + /** + * Get the number - guaranteed non-null + */ + public String getNumber() + { + return (number == null ? "" : number); + } +} diff --git a/dspace/src/org/dspace/content/FormatIdentifier.java b/dspace/src/org/dspace/content/FormatIdentifier.java new file mode 100644 index 0000000000..1251946b64 --- /dev/null +++ b/dspace/src/org/dspace/content/FormatIdentifier.java @@ -0,0 +1,122 @@ +/* + * FormatIdentifier.java + * + * 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. + */ + +package org.dspace.content; + +import java.sql.SQLException; +import java.util.List; + +import org.apache.log4j.Logger; + +import org.dspace.core.Context; +import org.dspace.core.LogManager; +import org.dspace.storage.rdbms.DatabaseManager; +import org.dspace.storage.rdbms.TableRow; +import org.dspace.storage.rdbms.TableRowIterator; + + +/** + * This class handles the recognition of bitstream formats, using the format + * registry in the database. For the moment, the format identifier simply + * uses file extensions stored in the "BitstreamFormatIdentifier" table. + * This probably isn't a particularly satisfactory long-term solution. + * + * @author Robert Tansley + * @version $Revision$ + */ +public class FormatIdentifier +{ + /** + * Attempt to identify the format of a particular bitstream. If the format + * is unknown, null is returned. + * + * @param bitstream the bitstream to identify the format of + * + * @return a format from the bitstream format registry, or null + */ + public static BitstreamFormat guessFormat(Context context, + Bitstream bitstream) + throws SQLException + { + // FIXME: Just setting format to first guess + // For now just get the file name + String filename = bitstream.getName().toLowerCase(); + + // Gracefully handle the null case + if (filename == null) + { + return null; + } + + // This isn't rocket science. We just get the name of the + // bitstream, get the extension, and see if we know the type. + String extension = filename; + int lastDot = filename.lastIndexOf('.'); + + if (lastDot != -1) + { + extension = filename.substring(lastDot + 1); + } + + // If the last character was a dot, then extension will now be + // an empty string. If this is the case, we don't know what + // file type it is. + if (extension.equals("")) + { + return null; + } + + // See if the extension is in the BitstreamFormatIdentifier table + TableRowIterator tri = DatabaseManager.query(context, + "SELECT bitstreamformatregistry.* FROM bitstreamformatregistry, " + + "formatidentifier WHERE formatidentifier.extension LIKE '" + + extension +"'"); + + if (tri.hasNext()) + { + // Return first match + return new BitstreamFormat(context, tri.next()); + } + else + { + return null; + } + } +} diff --git a/dspace/src/org/dspace/content/Item.java b/dspace/src/org/dspace/content/Item.java index 4b1872a87c..803c5fb2b6 100644 --- a/dspace/src/org/dspace/content/Item.java +++ b/dspace/src/org/dspace/content/Item.java @@ -812,7 +812,7 @@ public class Item { Bitstream[] bitstreams = bundles[i].getBitstreams(); - for (int j = 0; j < bundles.length; j++) + for (int j = 0; j < bitstreams.length; j++) { if (!bitstreams[j].getFormat().isInternal()) { diff --git a/dspace/src/org/dspace/core/ConfigurationManager.java b/dspace/src/org/dspace/core/ConfigurationManager.java index 679da6c5fb..6b44efe2b6 100644 --- a/dspace/src/org/dspace/core/ConfigurationManager.java +++ b/dspace/src/org/dspace/core/ConfigurationManager.java @@ -307,7 +307,7 @@ public class ConfigurationManager while ((lineIn = br.readLine()) != null) { - license = license + lineIn; + license = license + lineIn + '\n'; } is.close();