mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Merge branch 'coar-notify-7' into CST-10629
# Conflicts: # dspace-api/src/main/java/org/dspace/app/ldn/service/impl/LDNMessageServiceImpl.java # dspace-server-webapp/src/test/java/org/dspace/app/rest/LDNInboxControllerIT.java
This commit is contained in:
@@ -21,7 +21,7 @@ import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.core.ReloadableEntity;
|
||||
|
||||
/**
|
||||
* Class representing ldnMessages stored in the DSpace system and, when locally resolvable,
|
||||
* Class representing ldnMessages stored in the DSpace system and, when locally resolvable,
|
||||
* some information are stored as dedicated attributes.
|
||||
*
|
||||
* @author Mohamed Eskander (mohamed.eskander at 4science.com)
|
||||
@@ -190,7 +190,7 @@ public class LDNMessageEntity implements ReloadableEntity<String> {
|
||||
|
||||
/**
|
||||
*
|
||||
* @return This property is used when the notification is a direct response to a previous notification;
|
||||
* @return This property is used when the notification is a direct response to a previous notification;
|
||||
* contains an {@link org.dspace.app.ldn.LDNMessageEntity#inReplyTo id}
|
||||
*/
|
||||
public LDNMessageEntity getInReplyTo() {
|
||||
|
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.app.ldn.action;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.ldn.model.Notification;
|
||||
import org.dspace.content.Item;
|
||||
import org.dspace.content.QAEvent;
|
||||
import org.dspace.content.service.ItemService;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.qaevent.service.QAEventService;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
import org.dspace.web.ContextUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
public class LDNCorrectionAction implements LDNAction {
|
||||
|
||||
private static final Logger log = LogManager.getLogger(LDNEmailAction.class);
|
||||
|
||||
private String qaEventTopic;
|
||||
|
||||
@Autowired
|
||||
private ConfigurationService configurationService;
|
||||
@Autowired
|
||||
protected ItemService itemService;
|
||||
@Autowired
|
||||
private QAEventService qaEventService;
|
||||
|
||||
@Override
|
||||
public ActionStatus execute(Notification notification, Item item) throws Exception {
|
||||
ActionStatus result = ActionStatus.ABORT;
|
||||
Context context = ContextUtil.obtainCurrentRequestContext();
|
||||
QAEvent qaEvent = new QAEvent(QAEvent.COAR_NOTIFY,
|
||||
notification.getObject().getId(), item.getID().toString(), item.getName(),
|
||||
this.getQaEventTopic(), 0d,
|
||||
"{\"abstracts[0]\": \"" + notification.getObject().getIetfCiteAs() + "\"}"
|
||||
, new Date());
|
||||
qaEventService.store(context, qaEvent);
|
||||
result = ActionStatus.CONTINUE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getQaEventTopic() {
|
||||
return qaEventTopic;
|
||||
}
|
||||
|
||||
public void setQaEventTopic(String qaEventTopic) {
|
||||
this.qaEventTopic = qaEventTopic;
|
||||
}
|
||||
|
||||
}
|
@@ -8,6 +8,8 @@
|
||||
package org.dspace.app.ldn.service.impl;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -93,20 +95,15 @@ public class LDNMessageServiceImpl implements LDNMessageService {
|
||||
}
|
||||
ldnMessage.setType(StringUtils.joinWith(",", notification.getType()));
|
||||
Set<String> notificationType = notification.getType();
|
||||
if (notificationType != null) {
|
||||
String[] notificationTypeArray = notificationType.stream().toArray(String[]::new);
|
||||
if (notificationTypeArray.length >= 2) {
|
||||
ldnMessage.setActivityStreamType(notificationTypeArray[0]);
|
||||
ldnMessage.setCoarNotifyType(notificationTypeArray[1]);
|
||||
} else {
|
||||
log.warn("LDN Message from Notification won't be typed because notification has incorrect "
|
||||
+ "Type attribute");
|
||||
log.warn(message);
|
||||
}
|
||||
} else {
|
||||
log.warn("LDN Message from Notification won't be typed because notification has incorrect Type attribute");
|
||||
log.warn(message);
|
||||
if (notificationType == null) {
|
||||
log.error("Notification has no notificationType attribute! " + notification);
|
||||
return null;
|
||||
}
|
||||
ArrayList<String> notificationTypeArrayList = new ArrayList<String>(notificationType);
|
||||
// sorting the list
|
||||
Collections.sort(notificationTypeArrayList);
|
||||
ldnMessage.setActivityStreamType(notificationTypeArrayList.get(0));
|
||||
ldnMessage.setCoarNotifyType(notificationTypeArrayList.get(1));
|
||||
ldnMessage.setQueueStatus(LDNMessageEntity.QUEUE_STATUS_QUEUED);
|
||||
ldnMessage.setQueueTimeout(new Date());
|
||||
|
||||
@@ -138,7 +135,7 @@ public class LDNMessageServiceImpl implements LDNMessageService {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private NotifyServiceEntity findNotifyService(Context context, Service service) throws SQLException {
|
||||
return notifyServiceDao.findByLdnUrl(context, service.getInbox());
|
||||
}
|
||||
|
@@ -41,7 +41,11 @@ public class SuggestionTarget {
|
||||
* @return the source:uuid of the wrapped item
|
||||
*/
|
||||
public String getID() {
|
||||
return source + ":" + target.getID();
|
||||
if (target != null) {
|
||||
return source + ":" + target.getID();
|
||||
} else {
|
||||
return source + ":null";
|
||||
}
|
||||
}
|
||||
|
||||
public Item getTarget() {
|
||||
|
@@ -30,6 +30,7 @@ public class QAEvent {
|
||||
public static final String DISCARDED = "discarded";
|
||||
|
||||
public static final String OPENAIRE_SOURCE = "openaire";
|
||||
public static final String COAR_NOTIFY = "coar-notify";
|
||||
|
||||
private String source;
|
||||
|
||||
|
@@ -78,6 +78,12 @@ public class QAEventActionServiceImpl implements QAEventActionService {
|
||||
if (qaevent.getRelated() != null) {
|
||||
related = itemService.find(context, UUID.fromString(qaevent.getRelated()));
|
||||
}
|
||||
if (topicsToActions.get(qaevent.getTopic()) == null) {
|
||||
String msg = "Unable to manage QA Event typed " + qaevent.getTopic()
|
||||
+ ". Managed types are: " + topicsToActions;
|
||||
log.error(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
topicsToActions.get(qaevent.getTopic()).applyCorrection(context, item, related,
|
||||
jsonMapper.readValue(qaevent.getMessage(), qaevent.getMessageDtoClass()));
|
||||
qaEventService.deleteEventByEventId(qaevent.getEventId());
|
||||
|
@@ -457,7 +457,7 @@ public class QAEventServiceImpl implements QAEventService {
|
||||
}
|
||||
|
||||
private String[] getSupportedSources() {
|
||||
return configurationService.getArrayProperty("qaevent.sources", new String[] { QAEvent.OPENAIRE_SOURCE });
|
||||
return configurationService.getArrayProperty("qaevent.sources", new String[] { QAEvent.OPENAIRE_SOURCE, QAEvent.COAR_NOTIFY });
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -451,6 +451,29 @@ public class OpenaireEventsImportIT extends AbstractIntegrationTestWithDatabase
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testImportFromFileEventMoreReview() throws Exception {
|
||||
|
||||
context.turnOffAuthorisationSystem();
|
||||
|
||||
Item firstItem = createItem("Test item", "123456789/99998");
|
||||
Item secondItem = createItem("Test item 2", "123456789/99999");
|
||||
|
||||
context.restoreAuthSystemState();
|
||||
|
||||
TestDSpaceRunnableHandler handler = new TestDSpaceRunnableHandler();
|
||||
|
||||
String[] args = new String[] { "import-openaire-events", "-f", getFileLocation("event-more-review.json") };
|
||||
ScriptLauncher.handleScript(args, ScriptLauncher.getConfig(kernelImpl), handler, kernelImpl);
|
||||
|
||||
assertThat(qaEventService.findAllSources(0, 20), contains(QASourceMatcher.with(OPENAIRE_SOURCE, 1L)));
|
||||
|
||||
assertThat(qaEventService.findAllTopics(0, 20), contains(
|
||||
QATopicMatcher.with("ENRICH/MORE/REVIEW", 1L)));
|
||||
|
||||
verifyNoInteractions(mockBrokerClient);
|
||||
}
|
||||
|
||||
private Item createItem(String title, String handle) {
|
||||
return ItemBuilder.createItem(context, collection)
|
||||
.withTitle(title)
|
||||
|
@@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"originalId": "oai:www.openstarts.units.it:123456789/99999",
|
||||
"title": "Test Publication",
|
||||
"topic": "ENRICH/MORE/REVIEW",
|
||||
"trust": 1.0,
|
||||
"message": {
|
||||
"abstracts[0]": "More review"
|
||||
}
|
||||
}
|
||||
]
|
@@ -11,7 +11,10 @@ import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.validator.routines.UrlValidator;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.ldn.LDNMessageEntity;
|
||||
import org.dspace.app.ldn.LDNRouter;
|
||||
import org.dspace.app.ldn.model.Notification;
|
||||
import org.dspace.app.ldn.processor.LDNProcessor;
|
||||
import org.dspace.app.ldn.service.LDNMessageService;
|
||||
import org.dspace.app.rest.exception.InvalidLDNMessageException;
|
||||
import org.dspace.core.Context;
|
||||
@@ -35,6 +38,9 @@ public class LDNInboxController {
|
||||
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger();
|
||||
|
||||
@Autowired
|
||||
private LDNRouter router;
|
||||
|
||||
@Autowired
|
||||
private LDNMessageService ldnMessageService;
|
||||
|
||||
@@ -49,9 +55,21 @@ public class LDNInboxController {
|
||||
public ResponseEntity<Object> inbox(@RequestBody Notification notification) throws Exception {
|
||||
Context context = ContextUtil.obtainCurrentRequestContext();
|
||||
validate(notification);
|
||||
ldnMessageService.create(context, notification);
|
||||
|
||||
log.info("stored notification {} {}", notification.getId(), notification.getType());
|
||||
context.commit();
|
||||
|
||||
LDNMessageEntity ldnMsgEntity = ldnMessageService.create(context, notification);
|
||||
LDNProcessor processor = router.route(ldnMsgEntity);
|
||||
if (processor == null) {
|
||||
log.error(String.format("No processor found for type %s", notification.getType()));
|
||||
/*
|
||||
* return ResponseEntity.badRequest()
|
||||
.body(String.format("No processor found for type %s", notification.getType()));
|
||||
*/
|
||||
} else {
|
||||
processor.process(notification);
|
||||
}
|
||||
return ResponseEntity.accepted()
|
||||
.body(String.format("Successfully stored notification %s %s",
|
||||
notification.getId(), notification.getType()));
|
||||
|
@@ -27,7 +27,9 @@ public class SuggestionTargetConverter
|
||||
SuggestionTargetRest targetRest = new SuggestionTargetRest();
|
||||
targetRest.setProjection(projection);
|
||||
targetRest.setId(target.getID());
|
||||
targetRest.setDisplay(target.getTarget().getName());
|
||||
if (target != null && target.getTarget() != null) {
|
||||
targetRest.setDisplay(target.getTarget().getName());
|
||||
}
|
||||
targetRest.setTotal(target.getTotal());
|
||||
targetRest.setSource(target.getSource());
|
||||
return targetRest;
|
||||
|
@@ -7,6 +7,9 @@
|
||||
*/
|
||||
package org.dspace.app.rest;
|
||||
|
||||
import static org.dspace.content.QAEvent.OPENAIRE_SOURCE;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.contains;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
||||
@@ -27,7 +30,11 @@ import org.dspace.builder.ItemBuilder;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.Community;
|
||||
import org.dspace.content.Item;
|
||||
import org.dspace.matcher.QASourceMatcher;
|
||||
import org.dspace.matcher.QATopicMatcher;
|
||||
import org.dspace.qaevent.service.QAEventService;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
import org.dspace.utils.DSpace;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -40,6 +47,8 @@ public class LDNInboxControllerIT extends AbstractControllerIntegrationTest {
|
||||
@Autowired
|
||||
private LDNMessageService ldnMessageService;
|
||||
|
||||
private QAEventService qaEventService = new DSpace().getSingletonService(QAEventService.class);
|
||||
|
||||
@Test
|
||||
public void ldnInboxEndorsementActionTest() throws Exception {
|
||||
context.turnOffAuthorisationSystem();
|
||||
@@ -96,6 +105,26 @@ public class LDNInboxControllerIT extends AbstractControllerIntegrationTest {
|
||||
checkStoredLDNMessage(notification, ldnMessage, object);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void ldnInboxAnnounceReviewTest() throws Exception {
|
||||
InputStream announceReviewStream = getClass().getResourceAsStream("ldn_announce_review.json");
|
||||
String message = IOUtils.toString(announceReviewStream, Charset.defaultCharset());
|
||||
announceReviewStream.close();
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Notification notification = mapper.readValue(message, Notification.class);
|
||||
getClient(getAuthToken(admin.getEmail(), password))
|
||||
.perform(post("/ldn/inbox")
|
||||
.contentType("application/ld+json")
|
||||
.content(message))
|
||||
.andExpect(status().isAccepted());
|
||||
assertThat(qaEventService.findAllSources(0, 20), contains(QASourceMatcher.with(OPENAIRE_SOURCE, 1L)));
|
||||
|
||||
assertThat(qaEventService.findAllTopics(0, 20), contains(
|
||||
QATopicMatcher.with("ENRICH/MORE/REVIEW", 1L)));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ldnInboxEndorsementActionBadRequestTest() throws Exception {
|
||||
// id is not an uri
|
||||
|
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://purl.org/coar/notify"
|
||||
],
|
||||
"actor": {
|
||||
"id": "https://review-service.com",
|
||||
"name": "Review Service",
|
||||
"type": "Service"
|
||||
},
|
||||
"context": {
|
||||
"id": "oai:http://localhost:4000/handle:123456789/12",
|
||||
"ietf:cite-as": "https://doi.org/10.5555/12345680",
|
||||
"type": "sorg:AboutPage",
|
||||
"url": {
|
||||
"id": "https://research-organisation.org/repository/preprint/201203/421/content.pdf",
|
||||
"mediaType": "application/pdf",
|
||||
"type": [
|
||||
"Article",
|
||||
"sorg:ScholarlyArticle"
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "urn:uuid:2f4ec582-109e-4952-a94a-b7d7615a8c69",
|
||||
"inReplyTo": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd",
|
||||
"object": {
|
||||
"id": "https://review-service.com/review/geo/202103/0021",
|
||||
"ietf:cite-as": "https://doi.org/10.3214/987654",
|
||||
"type": [
|
||||
"Document",
|
||||
"sorg:Review"
|
||||
]
|
||||
},
|
||||
"origin": {
|
||||
"id": "https://review-service.com/system",
|
||||
"inbox": "https://review-service.com/inbox/",
|
||||
"type": "Service"
|
||||
},
|
||||
"target": {
|
||||
"id": "https://generic-service.com/system",
|
||||
"inbox": "https://generic-service.com/system/inbox/",
|
||||
"type": "Service"
|
||||
},
|
||||
"type": [
|
||||
"Announce",
|
||||
"coar-notify:ReviewAction"
|
||||
]
|
||||
}
|
27
dspace/config/emails/coar_notify_accepted
Normal file
27
dspace/config/emails/coar_notify_accepted
Normal file
@@ -0,0 +1,27 @@
|
||||
## Notification email sent when a request to review an item has been accepted by the service
|
||||
##
|
||||
## Parameters: {0} Service Name
|
||||
## {1} Item Name
|
||||
## {2} Service URL
|
||||
## {3} Item URL
|
||||
## {4} Submitter's Name
|
||||
## {5} Date of the received LDN notification
|
||||
##
|
||||
##
|
||||
#set($subject = "DSpace: The Service ${params[0]} has accepted to review the Item ""${params[1]}""")
|
||||
|
||||
An acceptance notification has been received by the service: ${params[0]}
|
||||
for the Item: ${params[1]}
|
||||
|
||||
Here is a more detailed report:
|
||||
Item: ${params[1]}
|
||||
Item URL: ${params[3]}
|
||||
Submitted by: ${params[4]}
|
||||
|
||||
Has a new status: ONGOING REVIEW
|
||||
|
||||
By Service: ${params[0]}
|
||||
Service URL: ${params[2]}
|
||||
Date: ${params[5]}
|
||||
|
||||
DSpace
|
27
dspace/config/emails/coar_notify_endorsed
Normal file
27
dspace/config/emails/coar_notify_endorsed
Normal file
@@ -0,0 +1,27 @@
|
||||
## Notification email sent when an item has been endorsed by a service
|
||||
##
|
||||
## Parameters: {0} Service Name
|
||||
## {1} Item Name
|
||||
## {2} Service URL
|
||||
## {3} Item URL
|
||||
## {4} Submitter's Name
|
||||
## {5} Date of the received LDN notification
|
||||
##
|
||||
##
|
||||
#set($subject = "DSpace: The Service ${params[0]} has endorsed the Item ""${params[1]}""")
|
||||
|
||||
An endorsement announce notification has been received by the service: ${params[0]}
|
||||
for the Item: ${params[1]}
|
||||
|
||||
Here is a more detailed report:
|
||||
Item: ${params[1]}
|
||||
Item URL: ${params[3]}
|
||||
Submitted by: ${params[4]}
|
||||
|
||||
Has a new status: ENDORSED
|
||||
|
||||
By Service: ${params[0]}
|
||||
Service URL: ${params[2]}
|
||||
Date: ${params[5]}
|
||||
|
||||
DSpace
|
27
dspace/config/emails/coar_notify_rejected
Normal file
27
dspace/config/emails/coar_notify_rejected
Normal file
@@ -0,0 +1,27 @@
|
||||
## Notification email sent when a request to review an item has been rejected by the service
|
||||
##
|
||||
## Parameters: {0} Service Name
|
||||
## {1} Item Name
|
||||
## {2} Service URL
|
||||
## {3} Item URL
|
||||
## {4} Submitter's Name
|
||||
## {5} Date of the received LDN notification
|
||||
##
|
||||
##
|
||||
#set($subject = "DSpace: The Service ${params[0]} has refused to review the Item ""${params[1]}""")
|
||||
|
||||
A rejection notification has been received by the service: ${params[0]}
|
||||
for the Item: ${params[1]}
|
||||
|
||||
Here is a more detailed report:
|
||||
Item: ${params[1]}
|
||||
Item URL: ${params[3]}
|
||||
Submitted by: ${params[4]}
|
||||
|
||||
Has a new update: REJECTED REVIEW REQUEST
|
||||
|
||||
By Service: ${params[0]}
|
||||
Service URL: ${params[2]}
|
||||
Date: ${params[5]}
|
||||
|
||||
DSpace
|
29
dspace/config/emails/coar_notify_relationship
Normal file
29
dspace/config/emails/coar_notify_relationship
Normal file
@@ -0,0 +1,29 @@
|
||||
## Notification email sent that a resource has been related by a service
|
||||
##
|
||||
## Parameters: {0} Service Name
|
||||
## {1} Item Name
|
||||
## {2} Service URL
|
||||
## {3} Item URL
|
||||
## {4} Submitter's Name
|
||||
## {5} Date of the received LDN notification
|
||||
## {6} LDN notification
|
||||
## {7} Item
|
||||
##
|
||||
##
|
||||
#set($subject = "DSpace: The Service ${params[0]} has related a Resource ""${params[6].object.subject}""")
|
||||
|
||||
A relationship announce notification has been received relating to the Item: ${params[1]}
|
||||
|
||||
Here is a more detailed report:
|
||||
Item: ${params[1]}
|
||||
Item URL: ${params[3]}
|
||||
Submitted by: ${params[4]}
|
||||
Linked Resource URL: ${params[6].object.subject}
|
||||
|
||||
Has a new status: RELATED
|
||||
|
||||
By Service: ${params[0]}
|
||||
Service URL: ${params[2]}
|
||||
Date: ${params[5]}
|
||||
|
||||
DSpace
|
27
dspace/config/emails/coar_notify_reviewed
Normal file
27
dspace/config/emails/coar_notify_reviewed
Normal file
@@ -0,0 +1,27 @@
|
||||
## Notification email sent when an item has been reviewed by a service
|
||||
##
|
||||
## Parameters: {0} Service Name
|
||||
## {1} Item Name
|
||||
## {2} Service URL
|
||||
## {3} Item URL
|
||||
## {4} Submitter's Name
|
||||
## {5} Date of the received LDN notification
|
||||
##
|
||||
##
|
||||
#set($subject = "DSpace: The Service ${params[0]} has reviewed the Item ""${params[1]}""")
|
||||
|
||||
A review announce notification has been received by the service: ${params[0]}
|
||||
for the Item: ${params[1]}
|
||||
|
||||
Here is a more detailed report:
|
||||
Item: ${params[1]}
|
||||
Item URL: ${params[3]}
|
||||
Submitted by: ${params[4]}
|
||||
|
||||
Has a new status: REVIEWED
|
||||
|
||||
By Service: ${params[0]}
|
||||
Service URL: ${params[2]}
|
||||
Date: ${params[5]}
|
||||
|
||||
DSpace
|
@@ -19,6 +19,10 @@ qaevents.openaire.import.topic = ENRICH/MORE/PID
|
||||
qaevents.openaire.import.topic = ENRICH/MISSING/PROJECT
|
||||
# add more project suggestion
|
||||
qaevents.openaire.import.topic = ENRICH/MORE/PROJECT
|
||||
# add more review
|
||||
qaevents.openaire.import.topic = ENRICH/MORE/REVIEW
|
||||
# add more endorsement
|
||||
qaevents.openaire.import.topic = ENRICH/MORE/ENDORSEMENT
|
||||
|
||||
# The list of the supported pid href for the OPENAIRE events
|
||||
qaevents.openaire.pid-href-prefix.arxiv = https://arxiv.org/abs/
|
||||
|
54
dspace/config/registries/coar-types.xml
Normal file
54
dspace/config/registries/coar-types.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE dspace-dc-types SYSTEM "dspace-dc-types.dtd">
|
||||
|
||||
<!--
|
||||
This document was based on the OpenAIRE4 Guidelines for Literature Repositories
|
||||
https://openaire-guidelines-for-literature-repository-managers.readthedocs.io/en/v4.0.0/index.html
|
||||
-->
|
||||
|
||||
<dspace-dc-types>
|
||||
<dspace-header>
|
||||
<title>COAR fields definition</title>
|
||||
</dspace-header>
|
||||
|
||||
<dc-schema>
|
||||
<name>coar</name>
|
||||
<namespace>http://dspace.org/coar</namespace>
|
||||
</dc-schema>
|
||||
|
||||
<dc-type>
|
||||
<schema>coar</schema>
|
||||
<element>notify</element>
|
||||
<qualifier>review</qualifier>
|
||||
<scope_note>Reviewed by</scope_note>
|
||||
</dc-type>
|
||||
|
||||
<dc-type>
|
||||
<schema>coar</schema>
|
||||
<element>notify</element>
|
||||
<qualifier>endorsement</qualifier>
|
||||
<scope_note>Endorsement</scope_note>
|
||||
</dc-type>
|
||||
|
||||
<dc-type>
|
||||
<schema>coar</schema>
|
||||
<element>notify</element>
|
||||
<qualifier>examination</qualifier>
|
||||
<scope_note>Examination</scope_note>
|
||||
</dc-type>
|
||||
|
||||
<dc-type>
|
||||
<schema>coar</schema>
|
||||
<element>notify</element>
|
||||
<qualifier>refused</qualifier>
|
||||
<scope_note>Refused by</scope_note>
|
||||
</dc-type>
|
||||
|
||||
<dc-type>
|
||||
<schema>coar</schema>
|
||||
<element>notify</element>
|
||||
<qualifier>release</qualifier>
|
||||
<scope_note>Released by</scope_note>
|
||||
</dc-type>
|
||||
|
||||
</dspace-dc-types>
|
43
dspace/config/registries/datacite-types.xml
Normal file
43
dspace/config/registries/datacite-types.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE dspace-dc-types SYSTEM "dspace-dc-types.dtd">
|
||||
|
||||
<!--
|
||||
This document was based on the OpenAIRE4 Guidelines for Literature Repositories
|
||||
https://openaire-guidelines-for-literature-repository-managers.readthedocs.io/en/v4.0.0/index.html
|
||||
-->
|
||||
|
||||
<dspace-dc-types>
|
||||
<dspace-header>
|
||||
<title>OpenAIRE4 Datacite fields definition</title>
|
||||
</dspace-header>
|
||||
|
||||
<dc-schema>
|
||||
<name>datacite</name>
|
||||
<namespace>http://datacite.org/schema/kernel-4</namespace>
|
||||
</dc-schema>
|
||||
|
||||
<!--
|
||||
OpenAIRE4 Guidelines
|
||||
21 - Geolocation -->
|
||||
<dc-type>
|
||||
<schema>datacite</schema>
|
||||
<element>geoLocation</element>
|
||||
<scope_note>Spatial region or named place where the data was gathered or about which the data is focused.</scope_note>
|
||||
</dc-type>
|
||||
|
||||
<!-- specific type required by OpenAIRE4 Guidelines -->
|
||||
<dc-type>
|
||||
<schema>datacite</schema>
|
||||
<element>subject</element>
|
||||
<qualifier>fos</qualifier>
|
||||
<scope_note>Fields of Science and Technology - OECD</scope_note>
|
||||
</dc-type>
|
||||
|
||||
<dc-type>
|
||||
<schema>datacite</schema>
|
||||
<element>relation</element>
|
||||
<qualifier>isReviewedBy</qualifier>
|
||||
<scope_note>Reviewd by</scope_note>
|
||||
</dc-type>
|
||||
|
||||
</dspace-dc-types>
|
21
dspace/config/registries/notify-types.xml
Normal file
21
dspace/config/registries/notify-types.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE dspace-dc-types SYSTEM "dspace-dc-types.dtd">
|
||||
|
||||
<dspace-dc-types>
|
||||
<dspace-header>
|
||||
<title>Notify fields definition</title>
|
||||
</dspace-header>
|
||||
|
||||
<dc-schema>
|
||||
<name>notify</name>
|
||||
<namespace>http://dspace.org/notify</namespace>
|
||||
</dc-schema>
|
||||
|
||||
<dc-type>
|
||||
<schema>notify</schema>
|
||||
<element>relation</element>
|
||||
<qualifier>endorsedBy</qualifier>
|
||||
<scope_note>Endorsed by</scope_note>
|
||||
</dc-type>
|
||||
|
||||
</dspace-dc-types>
|
@@ -15,11 +15,6 @@
|
||||
<name>oaire</name>
|
||||
<namespace>http://namespace.openaire.eu/schema/oaire/</namespace>
|
||||
</dc-schema>
|
||||
|
||||
<dc-schema>
|
||||
<name>datacite</name>
|
||||
<namespace>http://datacite.org/schema/kernel-4</namespace>
|
||||
</dc-schema>
|
||||
|
||||
<dc-type>
|
||||
<schema>oaire</schema>
|
||||
@@ -107,21 +102,4 @@
|
||||
<scope_note>The date when the conference took place. This property is considered to be part of the bibliographic citation. Recommended best practice for encoding the date value is defined in a profile of ISO 8601 [W3CDTF] and follows the YYYY-MM-DD format.</scope_note>
|
||||
</dc-type>
|
||||
|
||||
<!--
|
||||
OpenAIRE4 Guidelines
|
||||
21 - Geolocation -->
|
||||
<dc-type>
|
||||
<schema>datacite</schema>
|
||||
<element>geoLocation</element>
|
||||
<scope_note>Spatial region or named place where the data was gathered or about which the data is focused.</scope_note>
|
||||
</dc-type>
|
||||
|
||||
<!-- specific type required by OpenAIRE4 Guidelines -->
|
||||
<dc-type>
|
||||
<schema>datacite</schema>
|
||||
<element>subject</element>
|
||||
<qualifier>fos</qualifier>
|
||||
<scope_note>Fields of Science and Technology - OECD</scope_note>
|
||||
</dc-type>
|
||||
|
||||
</dspace-dc-types>
|
||||
|
@@ -105,6 +105,9 @@
|
||||
<property name="actionSendFilter" value="william_welling@harvard.edu" />
|
||||
<property name="actionSendEmailTextFile" value="coar_notify_reviewed" />
|
||||
</bean>
|
||||
<bean class="org.dspace.app.ldn.action.LDNCorrectionAction">
|
||||
<property name="qaEventTopic" value="ENRICH/MORE/REVIEW"/>
|
||||
</bean>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
@@ -139,6 +142,9 @@
|
||||
<property name="actionSendFilter" value="william_welling@harvard.edu" />
|
||||
<property name="actionSendEmailTextFile" value="coar_notify_endorsed" />
|
||||
</bean>
|
||||
<bean class="org.dspace.app.ldn.action.LDNCorrectionAction">
|
||||
<property name="qaEventTopic" value="ENRICH/MORE/ENDORSEMENT"/>
|
||||
</bean>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
@@ -23,6 +23,8 @@
|
||||
<entry key="ENRICH/MORE/PROJECT" value-ref="ProjectLinkedEntityAction" />
|
||||
<entry key="ENRICH/MISSING/PROJECT" value-ref="ProjectLinkedEntityAction" />
|
||||
<entry key="ENRICH/MISSING/ABSTRACT" value-ref="AbstractMetadataAction" />
|
||||
<entry key="ENRICH/MORE/REVIEW" value-ref="AddReviewMetadataAction" />
|
||||
<entry key="ENRICH/MORE/ENDORSEMENT" value-ref="AddEndorsedMetadataAction"/>
|
||||
<entry key="ENRICH/MORE/PID" value-ref="PIDMetadataAction" />
|
||||
<entry key="ENRICH/MISSING/PID" value-ref="PIDMetadataAction" />
|
||||
</map>
|
||||
@@ -52,6 +54,12 @@
|
||||
<bean id="AbstractMetadataAction" class="org.dspace.qaevent.action.QAOpenaireSimpleMetadataAction">
|
||||
<property name="metadata" value="dc.description.abstract" />
|
||||
</bean>
|
||||
<bean id="AddReviewMetadataAction" class="org.dspace.qaevent.action.QAOpenaireSimpleMetadataAction">
|
||||
<property name="metadata" value="datacite.relation.isReviewedBy" />
|
||||
</bean>
|
||||
<bean id="AddEndorsedMetadataAction" class="org.dspace.qaevent.action.QAOpenaireSimpleMetadataAction">
|
||||
<property name="metadata" value="notify.relation.endorsedBy"/>
|
||||
</bean>
|
||||
<!-- Add a new identifier to the given item, using the defined types mapping -->
|
||||
<bean id="PIDMetadataAction" class="org.dspace.qaevent.action.QAOpenaireMetadataMapAction">
|
||||
<property name="types">
|
||||
|
Reference in New Issue
Block a user