Skip to content

Commit

Permalink
Merge pull request #22 from mlibrary/issue-working20
Browse files Browse the repository at this point in the history
so that ACM wont get doi when depositing with swordv2
  • Loading branch information
blancoj authored Jan 20, 2025
2 parents 8252bff + ac69147 commit 6a059ff
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,31 @@ public WorkspaceItem create(Context context, Collection collection, UUID uuid, b

itemService.update(context, item);

boolean noDoi = context.getNoDoiStatus();

EPerson ep = item.getSubmitter();

String email = ep.getEmail();

log.info("DOI: the submitter email ==> " + email);

//String nodoi_email = config.getProperty("nodoi.acmemail");

String nodoi_email = DSpaceServicesFactory.getInstance().getConfigurationService().getProperty("nodoi.email");

//String nodoi_email = "[email protected]";


log.info("DOI: acm email = " + nodoi_email);

if ( email.equals(nodoi_email) )
{
log.info("DOI: no doi creation, this is a special case for ACM");

context.setNoDoiStatus (true);
noDoi= true;
}

boolean noDoi = context.getNoDoiStatus();
// Put this here just for safety, but don't think it affects anything from my testing (UM Change)
log.info("DOI: trying to create a DOI for the initial page");
if ( !noDoi ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,9 +815,17 @@ protected void notifyOfArchive(Context context, Item item, Collection coll)
DSpaceObject item_dso = (DSpaceObject) item;
String doi = doiIdentifierProvider.getDOIByObject(context, item_dso);


String doi_url = "";
if (doi == null) {
doi_url ="NO DOI CREATED";
} else {
doi_url = doi.replace("doi:", "https://dx.doi.org/");
}

// what you get for doi: doi:10.33577/42
// what you want to send out in email:https://dx.doi.org/10.7302/22447
String doi_url = doi.replace("doi:", "https://dx.doi.org/");
// String doi_url = doi.replace("doi:", "https://dx.doi.org/");
log.info("DOIHERE is = " + doi_url);

// Get title
Expand Down

0 comments on commit 6a059ff

Please sign in to comment.