Commit dd71b4c1c17c2111b1a2adf572fc881e110b4ae1

Authored by Fernando Ribeiro

Merge branch 'doifix' into 'DSpace52++'

Doifix

Fixed error of invalid string index

See merge request !10
dspace-api/src/main/java/pt/uminho/sdum/dspace/curationtasks/DoiValidator.java
... ... @@ -30,14 +30,20 @@ public class DoiValidator extends Distributor {
30 30 sb.append("</a> não tem o prefixo do DOI (http://dx.doi.org/) <br>");
31 31 //got regex from http://blog.crossref.org/2015/08/doi-regular-expressions.html
32 32 } else { */
33   - String sub = doi.substring(18);
34   - if (!sub.matches("^10.\\d{4,9}/[-._;()/:a-zA-Z0-9]+$")) {
35   - sb.append("<a href=\"http://hdl.handle.net/");
36   - sb.append(handle);
37   - sb.append("\" target=\"_blank\">");
38   - sb.append(handle);
39   - sb.append("</a> pode ter um DOI inválido <br>");
40   - }
  33 + String sub;
  34 + if (doi.startsWith("http://dx.doi.org/"))
  35 + sub = doi.substring(18);
  36 + else if(doi.startsWith("http://doi.org/"))
  37 + sub = doi.substring(15);
  38 + else
  39 + sub = doi;
  40 + if (!sub.matches("^10.\\d{4,9}/[-._;()/:a-zA-Z0-9]+$")) {
  41 + sb.append("<a href=\"http://hdl.handle.net/");
  42 + sb.append(handle);
  43 + sb.append("\" target=\"_blank\">");
  44 + sb.append(handle);
  45 + sb.append("</a> pode ter um DOI inválido <br>");
  46 + }
41 47 //}
42 48 }
43 49  
... ...
dspace-api/src/main/resources/Messages.properties
... ... @@ -1742,6 +1742,8 @@ jsp.submit.start-lookup-submission.identifiers = Search for identifier
1742 1742 jsp.submit.start-lookup-submission.identifier-tid = TID Thesis identifier
1743 1743 jsp.submit.start-lookup-submission.identifier-tid.hint = e.g. 201002744
1744 1744  
  1745 +jsp.submit.start-lookup-submission.identifier-tid = TID da Tese ou Disserta&ccedil&atilde;o
  1746 +jsp.submit.start-lookup-submission.identifier-tid.hint = e.g. 201002744
1745 1747 jsp.submit.start-lookup-submission.identifiers.hints = Fill in publication identifiers (DOI is preferable) and then press "Search". A list of all matching publications will be shown to you to select in order to proceed with the submission process.
1746 1748 jsp.submit.start-lookup-submission.identifier-doi = DOI (Digital Object Identifier)
1747 1749 jsp.submit.start-lookup-submission.identifier-doi.hint = e.g. 10.1021/ac0354342
... ...
dspace/config/spring/api/bte.xml
... ... @@ -109,7 +109,7 @@
109 109 <!-- Specify here any data loaders you want to include in the submission lookup process.
110 110 Dataloaders must either extend the "NetworkSubmissionLookupDataLoader" abstract class
111 111 or conform to "FileDataLoader" interface of BTE -->
112   - <entry key="renates" value-ref="renatesOnlineDataLoader"/>
  112 + <entry key="renates" value-ref="renatesOnlineDataLoader"/>
113 113 <entry key="pubmed" value-ref="pubmedOnlineDataLoader"/>
114 114 <entry key="crossref" value-ref="crossRefOnlineDataLoader"/>
115 115 <entry key="arxiv" value-ref="arXivOnlineDataLoader"/>
... ... @@ -346,13 +346,13 @@
346 346 </map>
347 347 </property>
348 348 </bean>
349   -
  349 +
350 350 <!-- Renates TID Online data loader -->
351   - <bean id="renatesOnlineDataLoader" class="pt.uminho.sdum.dspace.submit.lookup.RenatesOnlineDataLoader">
352   - <property name="fieldMap" ref="renatesInputMap" />
353   -
  351 + <bean id="renatesOnlineDataLoader" class="pt.uminho.sdum.dspace.submit.lookup.RenatesOnlineDataLoader">
  352 + <property name="fieldMap" ref="renatesInputMap" />
  353 +
354 354 </bean>
355   -
  355 +
356 356 <bean name="renatesInputMap" class="java.util.HashMap" scope="prototype">
357 357 <constructor-arg>
358 358 <map key-type="java.lang.String" value-type="java.lang.String">
... ... @@ -583,6 +583,7 @@
583 583  
584 584 <!--Added -->
585 585 <!--<entry value="publisher" key="dc.publisher" />--> <!-- Already exists-->
  586 + <entry value="publisher" key="dc.publisher" />
586 587 <entry value="titleAlternative" key="dc.title.alternative" />
587 588 <entry value="firstpage" key="degois.publication.firstPage" />
588 589 <entry value="lastpage" key="degois.publication.lastPage" />
... ... @@ -591,7 +592,7 @@
591 592 <entry value="mesh" key="dc.subject" />
592 593 <entry value="tid" key="dc.identifier.tid" />
593 594 <entry value="curso" key="thesis.degree.name" />
594   -
  595 +
595 596 <!-- Not used - new metadata fields need to be declared for them in DSpace registry -->
596 597 <!--
597 598 <entry value="url" key="" />
... ...