From 0b08332dc4803771169720860be8437b8c07173f Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 28 Jun 2021 16:49:58 +0200 Subject: [PATCH 01/18] Update 'CHANGES.md' --- README.md => CHANGES.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.md => CHANGES.md (100%) diff --git a/README.md b/CHANGES.md similarity index 100% rename from README.md rename to CHANGES.md From 3601609119608997b96652482958bebdd2a9fd92 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 28 Jun 2021 16:50:09 +0200 Subject: [PATCH 02/18] Update 'README.md' --- CHANGES.md => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename CHANGES.md => README.md (100%) diff --git a/CHANGES.md b/README.md similarity index 100% rename from CHANGES.md rename to README.md From 762a9ebb731adf928b16d22009bdf12bd8f5c53c Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 28 Jun 2021 17:41:24 +0200 Subject: [PATCH 03/18] added changelog file --- CHANGES.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 CHANGES.md diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..847cdc8 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,14 @@ + + +## Changelog + +| **Version** | **Changes** | **Readiness** | +|---|---|---| +| 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | beta | +| 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | beta | +| 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | beta | +| 2.4.8 | 1. added constant for ORCID datasource name | beta | +| 2.4.7 | refactoring | | +| 2.3.6 | [Aggregation]
1. introduced MetadataStoreManager (MdSM) model classes| beta | +| 2.2.5 | [Graph model]
1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`
2. `LicenseComparator` renamed as `AccessRightComparator`
3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level
4. `ExternalReference` cleanup (removed description, added alternateLabel(s))
5. added several ModelConstants
[Aggregation]
7. introduced MDStore record model classes
8. Introduced ORCID specific model classes | beta | +| 2.2.4 | 1. ORCID specific model classes backported in the version used in PROD
2. added constant for dnet:externalReference_typologies
3. added constant for ORCID datasource name
4. `Result.mergeFrom` handles field `dateOfAcceptance` | production | From 598a4b8ed91e0048b9ac49be91648fed56118911 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Mon, 28 Jun 2021 17:49:27 +0200 Subject: [PATCH 04/18] does it work without md extension? --- README.md => README | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.md => README (100%) diff --git a/README.md b/README similarity index 100% rename from README.md rename to README From 83641012da3c54df97871f4bf048e7080096f886 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Mon, 28 Jun 2021 17:49:59 +0200 Subject: [PATCH 05/18] No, it does not work without the md extension --- README => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README => README.md (100%) diff --git a/README b/README.md similarity index 100% rename from README rename to README.md From 7605f08d81754256a16e94c40bb3a9eec9940776 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Thu, 1 Jul 2021 14:29:47 +0200 Subject: [PATCH 06/18] [Scholexplorer]: Imported Scholix Schema and Scholix Summary data model on dhp-schemas --- .../dhp/schema/scholexplorer/DLIDataset.java | 89 ---------- .../schema/scholexplorer/DLIPublication.java | 87 ---------- .../dhp/schema/scholexplorer/DLIUnknown.java | 132 --------------- .../schema/scholexplorer/ProvenaceInfo.java | 47 ------ .../{scholexplorer => sx}/OafUtils.scala | 2 +- .../dhp/schema/sx/scholix/Scholix.java | 77 +++++++++ .../sx/scholix/ScholixCollectedFrom.java | 45 ++++++ .../schema/sx/scholix/ScholixEntityId.java | 34 ++++ .../schema/sx/scholix/ScholixIdentifier.java | 33 ++++ .../sx/scholix/ScholixRelationship.java | 43 +++++ .../schema/sx/scholix/ScholixResource.java | 153 ++++++++++++++++++ .../schema/sx/summary/CollectedFromType.java | 44 +++++ .../dhp/schema/sx/summary/SchemeValue.java | 33 ++++ .../dhp/schema/sx/summary/ScholixSummary.java | 128 +++++++++++++++ .../schema/sx/summary/TypedIdentifier.java | 33 ++++ .../dhp/schema/sx/summary/Typology.java | 8 + .../dhp/schema/scholexplorer/DLItest.java | 84 ---------- 17 files changed, 632 insertions(+), 440 deletions(-) delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIDataset.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIPublication.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIUnknown.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/scholexplorer/ProvenaceInfo.java rename src/main/java/eu/dnetlib/dhp/schema/{scholexplorer => sx}/OafUtils.scala (98%) create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/summary/CollectedFromType.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/summary/SchemeValue.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/summary/Typology.java delete mode 100644 src/test/java/eu/dnetlib/dhp/schema/scholexplorer/DLItest.java diff --git a/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIDataset.java b/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIDataset.java deleted file mode 100644 index 421b4ec..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIDataset.java +++ /dev/null @@ -1,89 +0,0 @@ - -package eu.dnetlib.dhp.schema.scholexplorer; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.commons.lang3.StringUtils; - -import eu.dnetlib.dhp.schema.oaf.Dataset; -import eu.dnetlib.dhp.schema.oaf.OafEntity; - -public class DLIDataset extends Dataset { - - private String originalObjIdentifier; - - private List dlicollectedfrom; - - private String completionStatus; - - public String getCompletionStatus() { - return completionStatus; - } - - public void setCompletionStatus(String completionStatus) { - this.completionStatus = completionStatus; - } - - public List getDlicollectedfrom() { - return dlicollectedfrom; - } - - public void setDlicollectedfrom(List dlicollectedfrom) { - this.dlicollectedfrom = dlicollectedfrom; - } - - public String getOriginalObjIdentifier() { - return originalObjIdentifier; - } - - public void setOriginalObjIdentifier(String originalObjIdentifier) { - this.originalObjIdentifier = originalObjIdentifier; - } - - @Override - public void mergeFrom(OafEntity e) { - super.mergeFrom(e); - DLIDataset p = (DLIDataset) e; - if (StringUtils.isBlank(completionStatus) && StringUtils.isNotBlank(p.completionStatus)) - completionStatus = p.completionStatus; - if ("complete".equalsIgnoreCase(p.completionStatus)) - completionStatus = "complete"; - dlicollectedfrom = mergeProvenance(dlicollectedfrom, p.getDlicollectedfrom()); - } - - private List mergeProvenance( - final List a, final List b) { - Map result = new HashMap<>(); - if (a != null) - a - .forEach( - p -> { - if (p != null && StringUtils.isNotBlank(p.getId()) && result.containsKey(p.getId())) { - if ("incomplete".equalsIgnoreCase(result.get(p.getId()).getCompletionStatus()) - && StringUtils.isNotBlank(p.getCompletionStatus())) { - result.put(p.getId(), p); - } - - } else if (p != null && p.getId() != null && !result.containsKey(p.getId())) - result.put(p.getId(), p); - }); - if (b != null) - b - .forEach( - p -> { - if (p != null && StringUtils.isNotBlank(p.getId()) && result.containsKey(p.getId())) { - if ("incomplete".equalsIgnoreCase(result.get(p.getId()).getCompletionStatus()) - && StringUtils.isNotBlank(p.getCompletionStatus())) { - result.put(p.getId(), p); - } - - } else if (p != null && p.getId() != null && !result.containsKey(p.getId())) - result.put(p.getId(), p); - }); - - return new ArrayList<>(result.values()); - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIPublication.java b/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIPublication.java deleted file mode 100644 index c899a89..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIPublication.java +++ /dev/null @@ -1,87 +0,0 @@ - -package eu.dnetlib.dhp.schema.scholexplorer; - -import java.io.Serializable; -import java.util.*; - -import org.apache.commons.lang3.StringUtils; - -import eu.dnetlib.dhp.schema.oaf.OafEntity; -import eu.dnetlib.dhp.schema.oaf.Publication; - -public class DLIPublication extends Publication implements Serializable { - - private String originalObjIdentifier; - - private List dlicollectedfrom; - - private String completionStatus; - - public String getCompletionStatus() { - return completionStatus; - } - - public void setCompletionStatus(String completionStatus) { - this.completionStatus = completionStatus; - } - - public List getDlicollectedfrom() { - return dlicollectedfrom; - } - - public void setDlicollectedfrom(List dlicollectedfrom) { - this.dlicollectedfrom = dlicollectedfrom; - } - - public String getOriginalObjIdentifier() { - return originalObjIdentifier; - } - - public void setOriginalObjIdentifier(String originalObjIdentifier) { - this.originalObjIdentifier = originalObjIdentifier; - } - - @Override - public void mergeFrom(OafEntity e) { - super.mergeFrom(e); - DLIPublication p = (DLIPublication) e; - if (StringUtils.isBlank(completionStatus) && StringUtils.isNotBlank(p.completionStatus)) - completionStatus = p.completionStatus; - if ("complete".equalsIgnoreCase(p.completionStatus)) - completionStatus = "complete"; - dlicollectedfrom = mergeProvenance(dlicollectedfrom, p.getDlicollectedfrom()); - } - - private List mergeProvenance( - final List a, final List b) { - Map result = new HashMap<>(); - if (a != null) - a - .forEach( - p -> { - if (p != null && StringUtils.isNotBlank(p.getId()) && result.containsKey(p.getId())) { - if ("incomplete".equalsIgnoreCase(result.get(p.getId()).getCompletionStatus()) - && StringUtils.isNotBlank(p.getCompletionStatus())) { - result.put(p.getId(), p); - } - - } else if (p != null && p.getId() != null && !result.containsKey(p.getId())) - result.put(p.getId(), p); - }); - if (b != null) - b - .forEach( - p -> { - if (p != null && StringUtils.isNotBlank(p.getId()) && result.containsKey(p.getId())) { - if ("incomplete".equalsIgnoreCase(result.get(p.getId()).getCompletionStatus()) - && StringUtils.isNotBlank(p.getCompletionStatus())) { - result.put(p.getId(), p); - } - - } else if (p != null && p.getId() != null && !result.containsKey(p.getId())) - result.put(p.getId(), p); - }); - - return new ArrayList<>(result.values()); - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIUnknown.java b/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIUnknown.java deleted file mode 100644 index 5da5994..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/DLIUnknown.java +++ /dev/null @@ -1,132 +0,0 @@ - -package eu.dnetlib.dhp.schema.scholexplorer; - -import java.io.Serializable; -import java.util.*; -import java.util.stream.Collectors; - -import org.apache.commons.lang3.StringUtils; - -import eu.dnetlib.dhp.schema.oaf.Oaf; -import eu.dnetlib.dhp.schema.oaf.StructuredProperty; - -public class DLIUnknown extends Oaf implements Serializable { - - private String id; - - private List pid; - - private String dateofcollection; - - private String dateoftransformation; - - private List dlicollectedfrom; - - private String completionStatus = "incomplete"; - - public String getCompletionStatus() { - return completionStatus; - } - - public void setCompletionStatus(String completionStatus) { - this.completionStatus = completionStatus; - } - - public List getDlicollectedfrom() { - return dlicollectedfrom; - } - - public void setDlicollectedfrom(List dlicollectedfrom) { - this.dlicollectedfrom = dlicollectedfrom; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public List getPid() { - return pid; - } - - public void setPid(List pid) { - this.pid = pid; - } - - public String getDateofcollection() { - return dateofcollection; - } - - public void setDateofcollection(String dateofcollection) { - this.dateofcollection = dateofcollection; - } - - public String getDateoftransformation() { - return dateoftransformation; - } - - public void setDateoftransformation(String dateoftransformation) { - this.dateoftransformation = dateoftransformation; - } - - public void mergeFrom(DLIUnknown p) { - if ("complete".equalsIgnoreCase(p.completionStatus)) - completionStatus = "complete"; - dlicollectedfrom = mergeProvenance(dlicollectedfrom, p.getDlicollectedfrom()); - if (StringUtils.isEmpty(id) && StringUtils.isNoneEmpty(p.getId())) - id = p.getId(); - if (StringUtils.isEmpty(dateofcollection) && StringUtils.isNoneEmpty(p.getDateofcollection())) - dateofcollection = p.getDateofcollection(); - - if (StringUtils.isEmpty(dateoftransformation) && StringUtils.isNoneEmpty(p.getDateoftransformation())) - dateofcollection = p.getDateoftransformation(); - pid = mergeLists(pid, p.getPid()); - } - - protected List mergeLists(final List... lists) { - - return Arrays - .stream(lists) - .filter(Objects::nonNull) - .flatMap(List::stream) - .filter(Objects::nonNull) - .distinct() - .collect(Collectors.toList()); - } - - private List mergeProvenance( - final List a, final List b) { - Map result = new HashMap<>(); - if (a != null) - a - .forEach( - p -> { - if (p != null && StringUtils.isNotBlank(p.getId()) && result.containsKey(p.getId())) { - if ("incomplete".equalsIgnoreCase(result.get(p.getId()).getCompletionStatus()) - && StringUtils.isNotBlank(p.getCompletionStatus())) { - result.put(p.getId(), p); - } - - } else if (p != null && p.getId() != null && !result.containsKey(p.getId())) - result.put(p.getId(), p); - }); - if (b != null) - b - .forEach( - p -> { - if (p != null && StringUtils.isNotBlank(p.getId()) && result.containsKey(p.getId())) { - if ("incomplete".equalsIgnoreCase(result.get(p.getId()).getCompletionStatus()) - && StringUtils.isNotBlank(p.getCompletionStatus())) { - result.put(p.getId(), p); - } - - } else if (p != null && p.getId() != null && !result.containsKey(p.getId())) - result.put(p.getId(), p); - }); - - return new ArrayList<>(result.values()); - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/ProvenaceInfo.java b/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/ProvenaceInfo.java deleted file mode 100644 index b1188f0..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/ProvenaceInfo.java +++ /dev/null @@ -1,47 +0,0 @@ - -package eu.dnetlib.dhp.schema.scholexplorer; - -import java.io.Serializable; - -public class ProvenaceInfo implements Serializable { - - private String id; - - private String name; - - private String completionStatus; - - private String collectionMode = "collected"; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getCompletionStatus() { - return completionStatus; - } - - public void setCompletionStatus(String completionStatus) { - this.completionStatus = completionStatus; - } - - public String getCollectionMode() { - return collectionMode; - } - - public void setCollectionMode(String collectionMode) { - this.collectionMode = collectionMode; - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/OafUtils.scala b/src/main/java/eu/dnetlib/dhp/schema/sx/OafUtils.scala similarity index 98% rename from src/main/java/eu/dnetlib/dhp/schema/scholexplorer/OafUtils.scala rename to src/main/java/eu/dnetlib/dhp/schema/sx/OafUtils.scala index b0cd344..b34a951 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/scholexplorer/OafUtils.scala +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/OafUtils.scala @@ -1,4 +1,4 @@ -package eu.dnetlib.dhp.schema.scholexplorer +package eu.dnetlib.dhp.schema.sx import eu.dnetlib.dhp.schema.common.ModelConstants import eu.dnetlib.dhp.schema.oaf.{AccessRight, DataInfo, Field, KeyValue, Qualifier, StructuredProperty} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java new file mode 100644 index 0000000..ca01cb5 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java @@ -0,0 +1,77 @@ + +package eu.dnetlib.dhp.schema.sx.scholix; + +import java.io.Serializable; +import java.util.List; + +public class Scholix implements Serializable { + private String publicationDate; + + private List publisher; + + private List linkprovider; + + private ScholixRelationship relationship; + + private ScholixResource source; + + private ScholixResource target; + + private String identifier; + + public String getPublicationDate() { + return publicationDate; + } + + public void setPublicationDate(String publicationDate) { + this.publicationDate = publicationDate; + } + + public List getPublisher() { + return publisher; + } + + public void setPublisher(List publisher) { + this.publisher = publisher; + } + + public List getLinkprovider() { + return linkprovider; + } + + public void setLinkprovider(List linkprovider) { + this.linkprovider = linkprovider; + } + + public ScholixRelationship getRelationship() { + return relationship; + } + + public void setRelationship(ScholixRelationship relationship) { + this.relationship = relationship; + } + + public ScholixResource getSource() { + return source; + } + + public void setSource(ScholixResource source) { + this.source = source; + } + + public ScholixResource getTarget() { + return target; + } + + public void setTarget(ScholixResource target) { + this.target = target; + } + + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java new file mode 100644 index 0000000..e8e4551 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java @@ -0,0 +1,45 @@ + +package eu.dnetlib.dhp.schema.sx.scholix; + +import java.io.Serializable; + +public class ScholixCollectedFrom implements Serializable { + + private ScholixEntityId provider; + private String provisionMode; + private String completionStatus; + + public ScholixCollectedFrom() { + } + + public ScholixCollectedFrom( + ScholixEntityId provider, String provisionMode, String completionStatus) { + this.provider = provider; + this.provisionMode = provisionMode; + this.completionStatus = completionStatus; + } + + public ScholixEntityId getProvider() { + return provider; + } + + public void setProvider(ScholixEntityId provider) { + this.provider = provider; + } + + public String getProvisionMode() { + return provisionMode; + } + + public void setProvisionMode(String provisionMode) { + this.provisionMode = provisionMode; + } + + public String getCompletionStatus() { + return completionStatus; + } + + public void setCompletionStatus(String completionStatus) { + this.completionStatus = completionStatus; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java new file mode 100644 index 0000000..e4bcee3 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java @@ -0,0 +1,34 @@ + +package eu.dnetlib.dhp.schema.sx.scholix; + +import java.io.Serializable; +import java.util.List; + +public class ScholixEntityId implements Serializable { + private String name; + private List identifiers; + + public ScholixEntityId() { + } + + public ScholixEntityId(String name, List identifiers) { + this.name = name; + this.identifiers = identifiers; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public List getIdentifiers() { + return identifiers; + } + + public void setIdentifiers(List identifiers) { + this.identifiers = identifiers; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java new file mode 100644 index 0000000..2301d40 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java @@ -0,0 +1,33 @@ + +package eu.dnetlib.dhp.schema.sx.scholix; + +import java.io.Serializable; + +public class ScholixIdentifier implements Serializable { + private String identifier; + private String schema; + + public ScholixIdentifier() { + } + + public ScholixIdentifier(String identifier, String schema) { + this.identifier = identifier; + this.schema = schema; + } + + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + public String getSchema() { + return schema; + } + + public void setSchema(String schema) { + this.schema = schema; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java new file mode 100644 index 0000000..b2e0e3f --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java @@ -0,0 +1,43 @@ + +package eu.dnetlib.dhp.schema.sx.scholix; + +import java.io.Serializable; + +public class ScholixRelationship implements Serializable { + private String name; + private String schema; + private String inverse; + + public ScholixRelationship() { + } + + public ScholixRelationship(String name, String schema, String inverse) { + this.name = name; + this.schema = schema; + this.inverse = inverse; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSchema() { + return schema; + } + + public void setSchema(String schema) { + this.schema = schema; + } + + public String getInverse() { + return inverse; + } + + public void setInverse(String inverse) { + this.inverse = inverse; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java new file mode 100644 index 0000000..8665cb8 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java @@ -0,0 +1,153 @@ + +package eu.dnetlib.dhp.schema.sx.scholix; + + + +import eu.dnetlib.dhp.schema.sx.summary.ScholixSummary; + +import java.io.Serializable; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public class ScholixResource implements Serializable { + + private List identifier; + private String dnetIdentifier; + private String objectType; + private String objectSubType; + private String title; + private List creator; + private String publicationDate; + private List publisher; + private List collectedFrom; + + public static ScholixResource fromSummary(ScholixSummary summary) { + + final ScholixResource resource = new ScholixResource(); + + resource.setDnetIdentifier(summary.getId()); + + resource + .setIdentifier( + summary + .getLocalIdentifier() + .stream() + .map(i -> new ScholixIdentifier(i.getId(), i.getType())) + .collect(Collectors.toList())); + + resource.setObjectType(summary.getTypology().toString()); + + if (summary.getTitle() != null && summary.getTitle().size() > 0) + resource.setTitle(summary.getTitle().get(0)); + + if (summary.getAuthor() != null) + resource + .setCreator( + summary + .getAuthor() + .stream() + .map(c -> new ScholixEntityId(c, null)) + .collect(Collectors.toList())); + + if (summary.getDate() != null && summary.getDate().size() > 0) + resource.setPublicationDate(summary.getDate().get(0)); + if (summary.getPublisher() != null) + resource + .setPublisher( + summary + .getPublisher() + .stream() + .map(p -> new ScholixEntityId(p, null)) + .collect(Collectors.toList())); + if (summary.getDatasources() != null) + resource + .setCollectedFrom( + summary + .getDatasources() + .stream() + .map( + d -> new ScholixCollectedFrom( + new ScholixEntityId( + d.getDatasourceName(), + Collections + .singletonList( + new ScholixIdentifier(d.getDatasourceId(), "dnet_identifier"))), + "collected", + d.getCompletionStatus())) + .collect(Collectors.toList())); + return resource; + } + + public List getIdentifier() { + return identifier; + } + + public void setIdentifier(List identifier) { + this.identifier = identifier; + } + + public String getDnetIdentifier() { + return dnetIdentifier; + } + + public void setDnetIdentifier(String dnetIdentifier) { + this.dnetIdentifier = dnetIdentifier; + } + + public String getObjectType() { + return objectType; + } + + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + public String getObjectSubType() { + return objectSubType; + } + + public void setObjectSubType(String objectSubType) { + this.objectSubType = objectSubType; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public List getCreator() { + return creator; + } + + public void setCreator(List creator) { + this.creator = creator; + } + + public String getPublicationDate() { + return publicationDate; + } + + public void setPublicationDate(String publicationDate) { + this.publicationDate = publicationDate; + } + + public List getPublisher() { + return publisher; + } + + public void setPublisher(List publisher) { + this.publisher = publisher; + } + + public List getCollectedFrom() { + return collectedFrom; + } + + public void setCollectedFrom(List collectedFrom) { + this.collectedFrom = collectedFrom; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/CollectedFromType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/CollectedFromType.java new file mode 100644 index 0000000..0dae748 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/CollectedFromType.java @@ -0,0 +1,44 @@ + +package eu.dnetlib.dhp.schema.sx.summary; + +import java.io.Serializable; + +public class CollectedFromType implements Serializable { + + private String datasourceName; + private String datasourceId; + private String completionStatus; + + public CollectedFromType() { + } + + public CollectedFromType(String datasourceName, String datasourceId, String completionStatus) { + this.datasourceName = datasourceName; + this.datasourceId = datasourceId; + this.completionStatus = completionStatus; + } + + public String getDatasourceName() { + return datasourceName; + } + + public void setDatasourceName(String datasourceName) { + this.datasourceName = datasourceName; + } + + public String getDatasourceId() { + return datasourceId; + } + + public void setDatasourceId(String datasourceId) { + this.datasourceId = datasourceId; + } + + public String getCompletionStatus() { + return completionStatus; + } + + public void setCompletionStatus(String completionStatus) { + this.completionStatus = completionStatus; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/SchemeValue.java b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/SchemeValue.java new file mode 100644 index 0000000..a58bc26 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/SchemeValue.java @@ -0,0 +1,33 @@ + +package eu.dnetlib.dhp.schema.sx.summary; + +import java.io.Serializable; + +public class SchemeValue implements Serializable { + private String scheme; + private String value; + + public SchemeValue() { + } + + public SchemeValue(String scheme, String value) { + this.scheme = scheme; + this.value = value; + } + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java new file mode 100644 index 0000000..fc146b2 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java @@ -0,0 +1,128 @@ + +package eu.dnetlib.dhp.schema.sx.summary; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; + +public class ScholixSummary implements Serializable { + private String id; + private List localIdentifier; + private Typology typology; + private List title; + private List author; + private List date; + private String description; + private List subject; + private List publisher; + private long relatedPublications; + private long relatedDatasets; + private long relatedUnknown; + private List datasources; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public List getLocalIdentifier() { + return localIdentifier; + } + + public void setLocalIdentifier(List localIdentifier) { + this.localIdentifier = localIdentifier; + } + + public Typology getTypology() { + return typology; + } + + public void setTypology(Typology typology) { + this.typology = typology; + } + + public List getTitle() { + return title; + } + + public void setTitle(List title) { + this.title = title; + } + + public List getAuthor() { + return author; + } + + public void setAuthor(List author) { + this.author = author; + } + + public List getDate() { + return date; + } + + public void setDate(List date) { + this.date = date; + } + + @JsonProperty("abstract") + public String getDescription() { + return description; + } + + @JsonProperty("abstract") + public void setDescription(String description) { + this.description = description; + } + + public List getSubject() { + return subject; + } + + public void setSubject(List subject) { + this.subject = subject; + } + + public List getPublisher() { + return publisher; + } + + public void setPublisher(List publisher) { + this.publisher = publisher; + } + + public long getRelatedPublications() { + return relatedPublications; + } + + public void setRelatedPublications(long relatedPublications) { + this.relatedPublications = relatedPublications; + } + + public long getRelatedDatasets() { + return relatedDatasets; + } + + public void setRelatedDatasets(long relatedDatasets) { + this.relatedDatasets = relatedDatasets; + } + + public long getRelatedUnknown() { + return relatedUnknown; + } + + public void setRelatedUnknown(long relatedUnknown) { + this.relatedUnknown = relatedUnknown; + } + + public List getDatasources() { + return datasources; + } + + public void setDatasources(List datasources) { + this.datasources = datasources; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java new file mode 100644 index 0000000..60465aa --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java @@ -0,0 +1,33 @@ + +package eu.dnetlib.dhp.schema.sx.summary; + +import java.io.Serializable; + +public class TypedIdentifier implements Serializable { + private String id; + private String type; + + public TypedIdentifier() { + } + + public TypedIdentifier(String id, String type) { + this.id = id; + this.type = type; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/Typology.java b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/Typology.java new file mode 100644 index 0000000..e39f312 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/Typology.java @@ -0,0 +1,8 @@ + +package eu.dnetlib.dhp.schema.sx.summary; + +import java.io.Serializable; + +public enum Typology implements Serializable { + dataset, publication, unknown +} diff --git a/src/test/java/eu/dnetlib/dhp/schema/scholexplorer/DLItest.java b/src/test/java/eu/dnetlib/dhp/schema/scholexplorer/DLItest.java deleted file mode 100644 index 16ce152..0000000 --- a/src/test/java/eu/dnetlib/dhp/schema/scholexplorer/DLItest.java +++ /dev/null @@ -1,84 +0,0 @@ - -package eu.dnetlib.dhp.schema.scholexplorer; - -import java.io.IOException; -import java.util.Arrays; -import java.util.Collections; - -import org.junit.jupiter.api.Test; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; - -import eu.dnetlib.dhp.schema.common.ModelConstants; -import eu.dnetlib.dhp.schema.oaf.Qualifier; -import eu.dnetlib.dhp.schema.oaf.StructuredProperty; - -public class DLItest { - - @Test - public void testMergePublication() throws JsonProcessingException { - DLIPublication a1 = new DLIPublication(); - a1.setPid(Arrays.asList(createSP("123456", "pdb", ModelConstants.DNET_PID_TYPES))); - a1.setTitle(Collections.singletonList(createSP("Un Titolo", "title", "dnetTitle"))); - a1.setDlicollectedfrom(Arrays.asList(createCollectedFrom("znd", "Zenodo", "complete"))); - a1.setCompletionStatus("complete"); - - DLIPublication a = new DLIPublication(); - a - .setPid( - Arrays - .asList( - createSP("10.11", "doi", ModelConstants.DNET_PID_TYPES), - createSP("123456", "pdb", ModelConstants.DNET_PID_TYPES))); - a.setTitle(Collections.singletonList(createSP("A Title", "title", "dnetTitle"))); - a - .setDlicollectedfrom( - Arrays - .asList( - createCollectedFrom("dct", "datacite", "complete"), - createCollectedFrom("dct", "datacite", "incomplete"))); - a.setCompletionStatus("incomplete"); - - a.mergeFrom(a1); - - ObjectMapper mapper = new ObjectMapper(); - System.out.println(mapper.writeValueAsString(a)); - } - - @Test - public void testDeserialization() throws IOException { - - final String json = "{\"dataInfo\":{\"invisible\":false,\"inferred\":null,\"deletedbyinference\":false,\"trust\":\"0.9\",\"inferenceprovenance\":null,\"provenanceaction\":null},\"lastupdatetimestamp\":null,\"id\":\"60|bd9352547098929a394655ad1a44a479\",\"originalId\":[\"bd9352547098929a394655ad1a44a479\"],\"collectedfrom\":[{\"key\":\"dli_________::datacite\",\"value\":\"Datasets in Datacite\",\"dataInfo\":null,\"blank\":false}],\"pid\":[{\"value\":\"10.7925/DRS1.DUCHAS_5078760\",\"qualifier\":{\"classid\":\"doi\",\"classname\":\"doi\",\"schemeid\":\"dnet:pid_types\",\"schemename\":\"dnet:pid_types\",\"blank\":false},\"dataInfo\":null}],\"dateofcollection\":\"2020-01-09T08:29:31.885Z\",\"dateoftransformation\":null,\"extraInfo\":null,\"oaiprovenance\":null,\"author\":[{\"fullname\":\"Cathail, S. Ó\",\"name\":null,\"surname\":null,\"rank\":null,\"pid\":null,\"affiliation\":null},{\"fullname\":\"Donnell, Breda Mc\",\"name\":null,\"surname\":null,\"rank\":null,\"pid\":null,\"affiliation\":null},{\"fullname\":\"Ireland. Department of Arts, Culture, and the Gaeltacht\",\"name\":null,\"surname\":null,\"rank\":null,\"pid\":null,\"affiliation\":null},{\"fullname\":\"University College Dublin\",\"name\":null,\"surname\":null,\"rank\":null,\"pid\":null,\"affiliation\":null},{\"fullname\":\"National Folklore Foundation\",\"name\":null,\"surname\":null,\"rank\":null,\"pid\":null,\"affiliation\":null},{\"fullname\":\"Cathail, S. Ó\",\"name\":null,\"surname\":null,\"rank\":null,\"pid\":null,\"affiliation\":null},{\"fullname\":\"Donnell, Breda Mc\",\"name\":null,\"surname\":null,\"rank\":null,\"pid\":null,\"affiliation\":null}],\"resulttype\":null,\"language\":null,\"country\":null,\"subject\":[{\"value\":\"Recreation\",\"qualifier\":{\"classid\":\"dnet:subject\",\"classname\":\"dnet:subject\",\"schemeid\":\"unknown\",\"schemename\":\"unknown\",\"blank\":false},\"dataInfo\":null},{\"value\":\"Entertainments and recreational activities\",\"qualifier\":{\"classid\":\"dnet:subject\",\"classname\":\"dnet:subject\",\"schemeid\":\"unknown\",\"schemename\":\"unknown\",\"blank\":false},\"dataInfo\":null},{\"value\":\"Siamsaíocht agus caitheamh aimsire\",\"qualifier\":{\"classid\":\"dnet:subject\",\"classname\":\"dnet:subject\",\"schemeid\":\"unknown\",\"schemename\":\"unknown\",\"blank\":false},\"dataInfo\":null}],\"title\":[{\"value\":\"Games We Play\",\"qualifier\":null,\"dataInfo\":null}],\"relevantdate\":[{\"value\":\"1938-09-28\",\"qualifier\":{\"classid\":\"date\",\"classname\":\"date\",\"schemeid\":\"dnet::date\",\"schemename\":\"dnet::date\",\"blank\":false},\"dataInfo\":null}],\"description\":[{\"value\":\"Story collected by Breda Mc Donnell, a student at Tenure school (Tinure, Co. Louth) (no informant identified).\",\"dataInfo\":null}],\"dateofacceptance\":null,\"publisher\":{\"value\":\"University College Dublin\",\"dataInfo\":null},\"embargoenddate\":null,\"source\":null,\"fulltext\":null,\"format\":null,\"contributor\":null,\"resourcetype\":null,\"coverage\":null,\"refereed\":null,\"context\":null,\"processingchargeamount\":null,\"processingchargecurrency\":null,\"externalReference\":null,\"instance\":[],\"storagedate\":null,\"device\":null,\"size\":null,\"version\":null,\"lastmetadataupdate\":null,\"metadataversionnumber\":null,\"geolocation\":null,\"dlicollectedfrom\":[{\"id\":\"dli_________::datacite\",\"name\":\"Datasets in Datacite\",\"completionStatus\":\"complete\",\"collectionMode\":\"resolved\"}],\"completionStatus\":\"complete\"}"; - - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - DLIDataset dliDataset = mapper.readValue(json, DLIDataset.class); - mapper.enable(SerializationFeature.INDENT_OUTPUT); - System.out.println(mapper.writeValueAsString(dliDataset)); - } - - private ProvenaceInfo createCollectedFrom( - final String id, final String name, final String completionStatus) { - ProvenaceInfo p = new ProvenaceInfo(); - p.setId(id); - p.setName(name); - p.setCompletionStatus(completionStatus); - return p; - } - - private StructuredProperty createSP( - final String value, final String className, final String schemeName) { - StructuredProperty p = new StructuredProperty(); - p.setValue(value); - Qualifier schema = new Qualifier(); - schema.setClassname(className); - schema.setClassid(className); - schema.setSchemename(schemeName); - schema.setSchemeid(schemeName); - p.setQualifier(schema); - return p; - } -} From 1f7fe39c3f2f2418621c1ac393b1bdb8677a2536 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Thu, 1 Jul 2021 16:57:57 +0200 Subject: [PATCH 07/18] Update 'README.md' --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7431cda..52fe9a4 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,11 @@ Description of the project -------------------------- This project defines **object schemas** of the OpenAIRE main entities and the relationships that intercur among them. Namely it defines the model for - -- **research product (result)** which subclasses in publication, dataset, other research product, software -- **data source** object describing the data provider (institutional repository, aggregators, cris systems) -- **organization** research bodies managing a data source or participating to a research project -- **project** research project + +- the graph internal representation, defined under the package `eu.dnetlib.dhp.schema.oaf` +- the public graph dump representations, defined under the package `eu.dnetlib.dhp.schema.dump.oaf` +- the scholexplorer content representation, defined under the package `eu.dnetlib.dhp.schema.sx` +- the contents acquired from the netadata aggregation subsystem, defined under the package `eu.dnetlib.dhp.schema.mdstore` +- the ORCID common schemas, defined under the package `eu.dnetlib.dhp.schema.orcid` Te serialization of such objects (data store files) are used to pass data between workflow nodes in the processing pipeline. From fc913472a1408efffaa3350716e5250b5893d585 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 5 Jul 2021 11:11:45 +0200 Subject: [PATCH 08/18] code formatting --- .../eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java | 6 ++---- .../eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java index 8665cb8..e173e2a 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java @@ -1,15 +1,13 @@ package eu.dnetlib.dhp.schema.sx.scholix; - - -import eu.dnetlib.dhp.schema.sx.summary.ScholixSummary; - import java.io.Serializable; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; +import eu.dnetlib.dhp.schema.sx.summary.ScholixSummary; + public class ScholixResource implements Serializable { private List identifier; diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java index fc146b2..6eb9300 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java @@ -1,10 +1,11 @@ package eu.dnetlib.dhp.schema.sx.summary; -import com.fasterxml.jackson.annotation.JsonProperty; import java.io.Serializable; import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ScholixSummary implements Serializable { private String id; private List localIdentifier; From a7472744ecdf80f4f07d7ba6c338282a9a3911d2 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 5 Jul 2021 11:12:44 +0200 Subject: [PATCH 09/18] added resultResult relation types, inspired by Datacite --- pom.xml | 2 +- .../dhp/schema/common/ModelConstants.java | 82 +++++++++++++------ 2 files changed, 56 insertions(+), 28 deletions(-) diff --git a/pom.xml b/pom.xml index ed53320..be36f83 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.6.14-SNAPSHOT + 2.7.14-SNAPSHOT diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java index ddb80ee..b5535fa 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -55,54 +55,82 @@ public class ModelConstants { public static final String SOFTWARE_RESULTTYPE_CLASSID = "software"; public static final String ORP_RESULTTYPE_CLASSID = "other"; - public static final String RESULT_RESULT = "resultResult"; + public static final String RESULT_RESULT = "resultResult"; // relType /** * @deprecated Use {@link ModelConstants#RELATIONSHIP} instead. */ @Deprecated - public static final String PUBLICATION_DATASET = "publicationDataset"; - public static final String IS_RELATED_TO = "isRelatedTo"; - public static final String SUPPLEMENT = "supplement"; - public static final String IS_SUPPLEMENT_TO = "isSupplementTo"; - public static final String IS_SUPPLEMENTED_BY = "isSupplementedBy"; - public static final String PART = "part"; - public static final String IS_PART_OF = "isPartOf"; - public static final String HAS_PART = "hasPart"; - public static final String RELATIONSHIP = "relationship"; - public static final String CITATION = "citation"; - public static final String CITES = "cites"; - public static final String IS_CITED_BY = "isCitedBy"; - public static final String REVIEW = "review"; // subreltype - public static final String REVIEWS = "reviews"; - public static final String IS_REVIEWED_BY = "isReviewedBy"; + public static final String PUBLICATION_DATASET = "publicationDataset"; // subreltype - public static final String RESULT_PROJECT = "resultProject"; - public static final String OUTCOME = "outcome"; + public static final String SUPPLEMENT = "supplement"; // subreltype + public static final String IS_SUPPLEMENT_TO = "IsSupplementTo"; + public static final String IS_SUPPLEMENTED_BY = "IsSupplementedBy"; + + public static final String PART = "part"; // subreltype + public static final String IS_PART_OF = "IsPartOf"; + public static final String HAS_PART = "HasPart"; + + public static final String RELATIONSHIP = "relationship"; // subreltype + + public static final String IS_RELATED_TO = "isRelatedTo"; + public static final String IS_IDENTICAL_TO = "IsIdenticalTo"; + + public static final String REFERENCES = "References"; + public static final String IS_REFERENCED_BY = "IsReferencedBy"; + public static final String CONTINUES = "Continues"; + public static final String IS_CONTINUED_BY = "IsContinuedBy"; + public static final String DOCUMENTS = "Documents"; + public static final String IS_DOCUMENTED_BY = "IsDocumentedBy"; + public static final String IS_SOURCE_OF = "IsSourceOf"; + public static final String IS_DERIVED_FROM = "IsDerivedFrom"; + public static final String COMPILES = "Compiles"; + public static final String IS_COMPILED_BY = "IsCompiledBy"; + + public static final String CITATION = "citation"; // subreltype + public static final String CITES = "Cites"; + public static final String IS_CITED_BY = "IsCitedBy"; + + public static final String REVIEW = "review"; // subreltype + public static final String REVIEWS = "Reviews"; + public static final String IS_REVIEWED_BY = "IsReviewedBy"; + + public static final String VERSION = "version"; // subreltype + public static final String IS_VERSION_OF = "IsVersionOf"; + public static final String HAS_VERSION = "HasVersion"; + public static final String IS_PREVIOUS_VERSION_OF = "IsPreviousVersionOf"; + public static final String IS_NEW_VERSION_OF = "IsNewVersionOf"; + public static final String IS_VARIANT_FORM_OF = "IsVariantFormOf"; + public static final String IS_ORIGINAL_FORM_OF = "IsOriginalFormOf"; + public static final String IS_OBSOLETED_BY = "IsObsoletedBy"; + public static final String OBSOLETES = "Obsoletes"; + + public static final String RESULT_PROJECT = "resultProject"; // relType + public static final String OUTCOME = "outcome"; // subreltype public static final String IS_PRODUCED_BY = "isProducedBy"; public static final String PRODUCES = "produces"; - public static final String DATASOURCE_ORGANIZATION = "datasourceOrganization"; - public static final String PROVISION = "provision"; + public static final String DATASOURCE_ORGANIZATION = "datasourceOrganization"; // relType + public static final String PROVISION = "provision"; // subreltype public static final String IS_PROVIDED_BY = "isProvidedBy"; public static final String PROVIDES = "provides"; - public static final String PROJECT_ORGANIZATION = "projectOrganization"; - public static final String PARTICIPATION = "participation"; + public static final String PROJECT_ORGANIZATION = "projectOrganization"; // relType + public static final String PARTICIPATION = "participation"; // subreltype public static final String HAS_PARTICIPANT = "hasParticipant"; public static final String IS_PARTICIPANT = "isParticipant"; - public static final String RESULT_ORGANIZATION = "resultOrganization"; - public static final String AFFILIATION = "affiliation"; + public static final String RESULT_ORGANIZATION = "resultOrganization"; // relType + public static final String AFFILIATION = "affiliation"; // subreltype public static final String IS_AUTHOR_INSTITUTION_OF = "isAuthorInstitutionOf"; public static final String HAS_AUTHOR_INSTITUTION = "hasAuthorInstitution"; - public static final String ORG_ORG_RELTYPE = "organizationOrganization"; + public static final String ORG_ORG_RELTYPE = "organizationOrganization"; // relType - public static final String DEDUP = "dedup"; + public static final String DEDUP = "dedup"; // subreltype public static final String MERGES = "merges"; public static final String IS_MERGED_IN = "isMergedIn"; - public static final String SIMILARITY = "similarity"; + public static final String SIMILARITY = "similarity"; // subreltype public static final String IS_SIMILAR_TO = "isSimilarTo"; public static final String IS_DIFFERENT_FROM = "isDifferentFrom"; From b0203ff5ccd29e834047effd050abf758c8f1720 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 5 Jul 2021 14:35:26 +0200 Subject: [PATCH 10/18] added more cleaning/identifier utilities --- .../schema/oaf/utils/CleaningFunctions.java | 29 ++++++++++++------- .../schema/oaf/utils/IdentifierFactory.java | 20 +++++++------ 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/CleaningFunctions.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/CleaningFunctions.java index 56ee75a..183214c 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/CleaningFunctions.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/CleaningFunctions.java @@ -46,18 +46,27 @@ public class CleaningFunctions { * @return the PID containing the normalised value. */ public static StructuredProperty normalizePidValue(StructuredProperty pid) { - String value = Optional - .ofNullable(pid.getValue()) - .map(String::trim) - .orElseThrow(() -> new IllegalArgumentException("PID value cannot be empty")); - switch (pid.getQualifier().getClassid()) { + pid.setValue( + normalizePidValue( + pid.getQualifier().getClassid(), + pid.getValue())); - // TODO add cleaning for more PID types as needed - case "doi": - pid.setValue(value.toLowerCase().replaceFirst(DOI_PREFIX_REGEX, DOI_PREFIX)); - break; - } return pid; } + public static String normalizePidValue(String pidType, String pidValue) { + String value = Optional + .ofNullable(pidValue) + .map(String::trim) + .orElseThrow(() -> new IllegalArgumentException("PID value cannot be empty")); + + switch (pidType) { + + // TODO add cleaning for more PID types as needed + case "doi": + return value.toLowerCase().replaceFirst(DOI_PREFIX_REGEX, DOI_PREFIX); + } + return value; + } + } diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java index 43cdbc1..d0baec5 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java @@ -164,9 +164,7 @@ public class IdentifierFactory implements Serializable { .stream() // filter away PIDs provided by a DS that is not considered an authority for the // given PID Type - .filter(p -> { - return shouldFilterPid(collectedFrom, p, mapHandles); - }) + .filter(p -> shouldFilterPid(collectedFrom, p, mapHandles)) .map(CleaningFunctions::normalizePidValue) .filter(CleaningFunctions::pidFilter)) .orElse(Stream.empty()); @@ -193,13 +191,17 @@ public class IdentifierFactory implements Serializable { } private static String idFromPid(T entity, StructuredProperty s, boolean md5) { + return idFromPid(ModelSupport.getIdPrefix(entity.getClass()), s.getQualifier().getClassid(), s.getValue(), md5); + } + + public static String idFromPid(String numericPrefix, String pidType, String pidValue, boolean md5) { return new StringBuilder() - .append(ModelSupport.getIdPrefix(entity.getClass())) - .append(ID_PREFIX_SEPARATOR) - .append(createPrefix(s.getQualifier().getClassid())) - .append(ID_SEPARATOR) - .append(md5 ? md5(s.getValue()) : s.getValue()) - .toString(); + .append(numericPrefix) + .append(ID_PREFIX_SEPARATOR) + .append(createPrefix(pidType)) + .append(ID_SEPARATOR) + .append(md5 ? md5(pidValue) : pidValue) + .toString(); } // create the prefix (length = 12) From 74aa404a8089b5a91634a144c511ca7a41d14b2e Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Mon, 5 Jul 2021 14:36:45 +0200 Subject: [PATCH 11/18] [Scholexplorer]: Updated scholix model: added subtype in scholix Summary and URL in Identifier field --- .../dhp/schema/sx/scholix/ScholixResource.java | 6 ++---- .../dhp/schema/sx/summary/ScholixSummary.java | 12 +++++++++++- .../dhp/schema/sx/summary/TypedIdentifier.java | 12 +++++++++++- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java index 8665cb8..e173e2a 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java @@ -1,15 +1,13 @@ package eu.dnetlib.dhp.schema.sx.scholix; - - -import eu.dnetlib.dhp.schema.sx.summary.ScholixSummary; - import java.io.Serializable; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; +import eu.dnetlib.dhp.schema.sx.summary.ScholixSummary; + public class ScholixResource implements Serializable { private List identifier; diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java index fc146b2..5894c05 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java @@ -1,14 +1,16 @@ package eu.dnetlib.dhp.schema.sx.summary; -import com.fasterxml.jackson.annotation.JsonProperty; import java.io.Serializable; import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ScholixSummary implements Serializable { private String id; private List localIdentifier; private Typology typology; + private String subType; private List title; private List author; private List date; @@ -125,4 +127,12 @@ public class ScholixSummary implements Serializable { public void setDatasources(List datasources) { this.datasources = datasources; } + + public String getSubType() { + return subType; + } + + public void setSubType(String subType) { + this.subType = subType; + } } diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java index 60465aa..b66cb08 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java @@ -6,13 +6,23 @@ import java.io.Serializable; public class TypedIdentifier implements Serializable { private String id; private String type; + private String url; public TypedIdentifier() { } - public TypedIdentifier(String id, String type) { + public TypedIdentifier(String id, String type, String url) { this.id = id; this.type = type; + this.url = url; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; } public String getId() { From d77d4123b3ee9911f602afdff4b993895517c24d Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 5 Jul 2021 15:27:48 +0200 Subject: [PATCH 12/18] updated CHANGELOG --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 847cdc8..17b2d02 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ | **Version** | **Changes** | **Readiness** | |---|---|---| +| 2.7.14 | [Graph model]
1. Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | beta | | 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | beta | | 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | beta | | 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | beta | From ff8f91577e4aa48f34300f1c3aed383e8f32ff89 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 5 Jul 2021 15:32:58 +0200 Subject: [PATCH 13/18] minor update on the CHANGELOG --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 17b2d02..89540d6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,7 +4,7 @@ | **Version** | **Changes** | **Readiness** | |---|---|---| -| 2.7.14 | [Graph model]
1. Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | beta | +| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | beta | | 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | beta | | 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | beta | | 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | beta | From 78c8781fca20fe4efa58d6bda170a2602b973b9b Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Tue, 6 Jul 2021 09:54:26 +0200 Subject: [PATCH 14/18] [Scholexplorer]: Removed TypedIdentifier class on summary and resue ScholixIdentifier --- .../schema/sx/scholix/ScholixIdentifier.java | 28 ++++++++- .../schema/sx/scholix/ScholixResource.java | 61 ------------------- .../schema/sx/summary/CollectedFromType.java | 14 +++++ .../dhp/schema/sx/summary/ScholixSummary.java | 8 ++- .../schema/sx/summary/TypedIdentifier.java | 43 ------------- 5 files changed, 46 insertions(+), 108 deletions(-) delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java index 2301d40..8fc8b08 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java @@ -2,17 +2,43 @@ package eu.dnetlib.dhp.schema.sx.scholix; import java.io.Serializable; +import java.util.Objects; public class ScholixIdentifier implements Serializable { private String identifier; private String schema; + private String url; public ScholixIdentifier() { } - public ScholixIdentifier(String identifier, String schema) { + public ScholixIdentifier(String identifier, String schema, String url) { this.identifier = identifier; this.schema = schema; + this.url = url; + } + + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ScholixIdentifier that = (ScholixIdentifier) o; + return identifier.equals(that.identifier) && schema.equals(that.schema); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, schema); } public String getIdentifier() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java index e173e2a..569b1f3 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java @@ -2,11 +2,7 @@ package eu.dnetlib.dhp.schema.sx.scholix; import java.io.Serializable; -import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; - -import eu.dnetlib.dhp.schema.sx.summary.ScholixSummary; public class ScholixResource implements Serializable { @@ -20,63 +16,6 @@ public class ScholixResource implements Serializable { private List publisher; private List collectedFrom; - public static ScholixResource fromSummary(ScholixSummary summary) { - - final ScholixResource resource = new ScholixResource(); - - resource.setDnetIdentifier(summary.getId()); - - resource - .setIdentifier( - summary - .getLocalIdentifier() - .stream() - .map(i -> new ScholixIdentifier(i.getId(), i.getType())) - .collect(Collectors.toList())); - - resource.setObjectType(summary.getTypology().toString()); - - if (summary.getTitle() != null && summary.getTitle().size() > 0) - resource.setTitle(summary.getTitle().get(0)); - - if (summary.getAuthor() != null) - resource - .setCreator( - summary - .getAuthor() - .stream() - .map(c -> new ScholixEntityId(c, null)) - .collect(Collectors.toList())); - - if (summary.getDate() != null && summary.getDate().size() > 0) - resource.setPublicationDate(summary.getDate().get(0)); - if (summary.getPublisher() != null) - resource - .setPublisher( - summary - .getPublisher() - .stream() - .map(p -> new ScholixEntityId(p, null)) - .collect(Collectors.toList())); - if (summary.getDatasources() != null) - resource - .setCollectedFrom( - summary - .getDatasources() - .stream() - .map( - d -> new ScholixCollectedFrom( - new ScholixEntityId( - d.getDatasourceName(), - Collections - .singletonList( - new ScholixIdentifier(d.getDatasourceId(), "dnet_identifier"))), - "collected", - d.getCompletionStatus())) - .collect(Collectors.toList())); - return resource; - } - public List getIdentifier() { return identifier; } diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/CollectedFromType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/CollectedFromType.java index 0dae748..61df72f 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/CollectedFromType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/CollectedFromType.java @@ -2,6 +2,7 @@ package eu.dnetlib.dhp.schema.sx.summary; import java.io.Serializable; +import java.util.Objects; public class CollectedFromType implements Serializable { @@ -18,6 +19,19 @@ public class CollectedFromType implements Serializable { this.completionStatus = completionStatus; } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CollectedFromType that = (CollectedFromType) o; + return Objects.equals(datasourceName, that.datasourceName) && Objects.equals(datasourceId, that.datasourceId); + } + + @Override + public int hashCode() { + return Objects.hash(datasourceName, datasourceId); + } + public String getDatasourceName() { return datasourceName; } diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java index 5894c05..8da25dc 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/ScholixSummary.java @@ -6,9 +6,11 @@ import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixIdentifier; + public class ScholixSummary implements Serializable { private String id; - private List localIdentifier; + private List localIdentifier; private Typology typology; private String subType; private List title; @@ -30,11 +32,11 @@ public class ScholixSummary implements Serializable { this.id = id; } - public List getLocalIdentifier() { + public List getLocalIdentifier() { return localIdentifier; } - public void setLocalIdentifier(List localIdentifier) { + public void setLocalIdentifier(List localIdentifier) { this.localIdentifier = localIdentifier; } diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java deleted file mode 100644 index b66cb08..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/summary/TypedIdentifier.java +++ /dev/null @@ -1,43 +0,0 @@ - -package eu.dnetlib.dhp.schema.sx.summary; - -import java.io.Serializable; - -public class TypedIdentifier implements Serializable { - private String id; - private String type; - private String url; - - public TypedIdentifier() { - } - - public TypedIdentifier(String id, String type, String url) { - this.id = id; - this.type = type; - this.url = url; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } -} From 0d1b4dacaf9ee448e0acddcf0febf99017970b3e Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 12 Jul 2021 17:39:17 +0200 Subject: [PATCH 15/18] Update 'CHANGES.md' --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 89540d6..71b8e0e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,7 +4,7 @@ | **Version** | **Changes** | **Readiness** | |---|---|---| -| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | beta | +| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion`
[Scholexplorer]
1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | beta | | 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | beta | | 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | beta | | 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | beta | From 46749989ee410e259e3d7e52ef09fdd00dc844fc Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 12 Jul 2021 17:40:42 +0200 Subject: [PATCH 16/18] [maven-release-plugin] prepare release dhp-schemas-2.7.14 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index be36f83..e6e6a74 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.14-SNAPSHOT + 2.7.14 @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - HEAD + dhp-schemas-2.7.14 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 1dc24aa4adfdad3ef4aee7a0de9e8b75614254e3 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 12 Jul 2021 17:40:46 +0200 Subject: [PATCH 17/18] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e6e6a74..f0b6783 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.14 + 2.7.15-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.7.14 + HEAD This module contains common schema classes meant to be used across the dnet-hadoop submodules From bb7c6e838cb4c3ea5de241fbf9caadaaddb6b626 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 13 Jul 2021 10:28:39 +0200 Subject: [PATCH 18/18] updated realiness level in the changelog --- CHANGES.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 71b8e0e..e229bec 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,12 +4,13 @@ | **Version** | **Changes** | **Readiness** | |---|---|---| -| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion`
[Scholexplorer]
1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | beta | -| 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | beta | -| 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | beta | -| 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | beta | -| 2.4.8 | 1. added constant for ORCID datasource name | beta | -| 2.4.7 | refactoring | | -| 2.3.6 | [Aggregation]
1. introduced MetadataStoreManager (MdSM) model classes| beta | -| 2.2.5 | [Graph model]
1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`
2. `LicenseComparator` renamed as `AccessRightComparator`
3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level
4. `ExternalReference` cleanup (removed description, added alternateLabel(s))
5. added several ModelConstants
[Aggregation]
7. introduced MDStore record model classes
8. Introduced ORCID specific model classes | beta | +| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | beta | +| 2.6.14 | [Scholexplorer]
1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | production | +| 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | production | +| 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | production | +| 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | production | +| 2.4.8 | 1. added constant for ORCID datasource name | production | +| 2.4.7 | refactoring | production | +| 2.3.6 | [Aggregation]
1. introduced MetadataStoreManager (MdSM) model classes| production | +| 2.2.5 | [Graph model]
1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`
2. `LicenseComparator` renamed as `AccessRightComparator`
3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level
4. `ExternalReference` cleanup (removed description, added alternateLabel(s))
5. added several ModelConstants
[Aggregation]
7. introduced MDStore record model classes
8. Introduced ORCID specific model classes | production | | 2.2.4 | 1. ORCID specific model classes backported in the version used in PROD
2. added constant for dnet:externalReference_typologies
3. added constant for ORCID datasource name
4. `Result.mergeFrom` handles field `dateOfAcceptance` | production |