mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Merge branch 'main' of github.com:dspace/dspace into enhancement/addressing-#8633
This commit is contained in:
@@ -66,7 +66,7 @@ public class VersionedDOIIdentifierProvider extends DOIIdentifierProvider {
|
||||
try {
|
||||
history = versionHistoryService.findByItem(context, item);
|
||||
} catch (SQLException ex) {
|
||||
throw new RuntimeException("A problem occured while accessing the database.", ex);
|
||||
throw new RuntimeException("A problem occurred while accessing the database.", ex);
|
||||
}
|
||||
|
||||
String doi = null;
|
||||
@@ -76,7 +76,7 @@ public class VersionedDOIIdentifierProvider extends DOIIdentifierProvider {
|
||||
return doi;
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
log.error("Error while attemping to retrieve information about a DOI for "
|
||||
log.error("Error while attempting to retrieve information about a DOI for "
|
||||
+ contentServiceFactory.getDSpaceObjectService(dso).getTypeText(dso)
|
||||
+ " with ID " + dso.getID() + ".", ex);
|
||||
throw new RuntimeException("Error while attempting to retrieve "
|
||||
@@ -134,7 +134,7 @@ public class VersionedDOIIdentifierProvider extends DOIIdentifierProvider {
|
||||
if (history != null) {
|
||||
// versioning is currently supported for items only
|
||||
// if we have a history, we have a item
|
||||
doi = makeIdentifierBasedOnHistory(context, dso, history);
|
||||
doi = makeIdentifierBasedOnHistory(context, dso, history, filter);
|
||||
} else {
|
||||
doi = loadOrCreateDOI(context, dso, null, filter).getDoi();
|
||||
}
|
||||
@@ -145,7 +145,7 @@ public class VersionedDOIIdentifierProvider extends DOIIdentifierProvider {
|
||||
log.error("AuthorizationException while creating a new DOI: ", ex);
|
||||
throw new IdentifierException(ex);
|
||||
}
|
||||
return doi;
|
||||
return doi.startsWith(DOI.SCHEME) ? doi : DOI.SCHEME + doi;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -153,6 +153,21 @@ public class VersionedDOIIdentifierProvider extends DOIIdentifierProvider {
|
||||
register(context, dso, identifier, this.filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String register(Context context, DSpaceObject dso, Filter filter)
|
||||
throws IdentifierException {
|
||||
if (!(dso instanceof Item)) {
|
||||
// DOIs are currently assigned only to Items
|
||||
return null;
|
||||
}
|
||||
|
||||
String doi = mint(context, dso, filter);
|
||||
|
||||
register(context, dso, doi, filter);
|
||||
|
||||
return doi;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(Context context, DSpaceObject dso, String identifier, Filter filter)
|
||||
throws IdentifierException {
|
||||
@@ -162,7 +177,7 @@ public class VersionedDOIIdentifierProvider extends DOIIdentifierProvider {
|
||||
Item item = (Item) dso;
|
||||
|
||||
if (StringUtils.isEmpty(identifier)) {
|
||||
identifier = mint(context, dso);
|
||||
identifier = mint(context, dso, filter);
|
||||
}
|
||||
String doiIdentifier = doiService.formatIdentifier(identifier);
|
||||
|
||||
@@ -170,10 +185,10 @@ public class VersionedDOIIdentifierProvider extends DOIIdentifierProvider {
|
||||
|
||||
// search DOI in our db
|
||||
try {
|
||||
doi = loadOrCreateDOI(context, dso, doiIdentifier);
|
||||
doi = loadOrCreateDOI(context, dso, doiIdentifier, filter);
|
||||
} catch (SQLException ex) {
|
||||
log.error("Error in databse connection: " + ex.getMessage(), ex);
|
||||
throw new RuntimeException("Error in database conncetion.", ex);
|
||||
log.error("Error in database connection: " + ex.getMessage(), ex);
|
||||
throw new RuntimeException("Error in database connection.", ex);
|
||||
}
|
||||
|
||||
if (DELETED.equals(doi.getStatus()) ||
|
||||
|
16
pom.xml
16
pom.xml
@@ -22,10 +22,10 @@
|
||||
<spring.version>5.3.27</spring.version>
|
||||
<spring-boot.version>2.7.11</spring-boot.version>
|
||||
<spring-security.version>5.7.8</spring-security.version> <!-- sync with version used by spring-boot-->
|
||||
<hibernate.version>5.6.5.Final</hibernate.version>
|
||||
<hibernate-validator.version>6.0.23.Final</hibernate-validator.version>
|
||||
<postgresql.driver.version>42.4.3</postgresql.driver.version>
|
||||
<solr.client.version>8.11.1</solr.client.version>
|
||||
<hibernate.version>5.6.15.Final</hibernate.version>
|
||||
<hibernate-validator.version>6.2.5.Final</hibernate-validator.version>
|
||||
<postgresql.driver.version>42.6.0</postgresql.driver.version>
|
||||
<solr.client.version>8.11.2</solr.client.version>
|
||||
|
||||
<ehcache.version>3.4.0</ehcache.version>
|
||||
<errorprone.version>2.10.0</errorprone.version>
|
||||
@@ -38,10 +38,10 @@
|
||||
<jcache-version>1.1.0</jcache-version>
|
||||
<!-- NOTE: Jetty needed for Solr, Handle Server & tests -->
|
||||
<jetty.version>9.4.51.v20230217</jetty.version>
|
||||
<log4j.version>2.17.1</log4j.version>
|
||||
<pdfbox-version>2.0.27</pdfbox-version>
|
||||
<rome.version>1.18.0</rome.version>
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
<log4j.version>2.20.0</log4j.version>
|
||||
<pdfbox-version>2.0.28</pdfbox-version>
|
||||
<rome.version>1.19.0</rome.version>
|
||||
<slf4j.version>1.7.36</slf4j.version>
|
||||
<tika.version>2.3.0</tika.version>
|
||||
<!-- Sync with whatever version Tika uses -->
|
||||
<bouncycastle.version>1.70</bouncycastle.version>
|
||||
|
Reference in New Issue
Block a user