diff --git a/CHANGES.md b/CHANGES.md
index abb2609..34cb792 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,25 +2,26 @@
## Changelog
-| **Version** | **Changes** | **Readiness** |
-|-------------|---|---|
-| 2.9.24 | [Dump model]change the names of the classes to be able to automatically create the json schema with specific descriptions | beta |
-| 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance[Dump model]added json schemas | beta |
-| 2.8.22 | [Graph model]
minor: added serializable to the Measures model class[Dump model]added dedicated BestAccessRight class, used at the result level instead of AccessRight | production |
-| 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | production |
-| 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | production |
-| 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production |
-| 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | production |
-| 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | production |
-| 2.7.15 | 1. added support for delegated authorities
2. fixed regex for DOI cleaning | production |
-| 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` | production |
-| 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 |
+| **Version** | **Changes** | **Readiness** |
+|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
+| 2.10.24 | [Graph model]added utility method and constants for checking weather is an OafEntity represents an enrichment. | beta |
+| 2.9.24 | [Dump model]change the names of the classes to be able to automatically create the json schema with specific descriptions | beta |
+| 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance[Dump model]added json schemas | beta |
+| 2.8.22 | [Graph model]
minor: added serializable to the Measures model class[Dump model]added dedicated BestAccessRight class, used at the result level instead of AccessRight | production |
+| 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | production |
+| 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | production |
+| 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production |
+| 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | production |
+| 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | production |
+| 2.7.15 | 1. added support for delegated authorities
2. fixed regex for DOI cleaning | production |
+| 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` | production |
+| 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 |
diff --git a/pom.xml b/pom.xml
index 86c19c5..d0f8101 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
eu.dnetlib.dhp
dhp-schemas
jar
- 2.9.25-SNAPSHOT
+ 2.10.24-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.9.24
+ dhp-schemas-2.10.24
This module contains common schema classes meant to be used across the dnet-hadoop submodules
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 c4ae5cb..ae234dd 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java
@@ -63,6 +63,8 @@ public class ModelConstants {
public static final String HARVESTED = "Harvested";
public static final String PROVENANCE_DEDUP = "sysimport:dedup";
+ public static final String PROVENANCE_ENRICH = "sysimport:enrich";
+
public static final Qualifier PROVENANCE_ACTION_SET_QUALIFIER = qualifier(
SYSIMPORT_ACTIONSET, SYSIMPORT_ACTIONSET, DNET_PROVENANCE_ACTIONS, DNET_PROVENANCE_ACTIONS);
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java
index 68e715d..db30bf6 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java
@@ -5,9 +5,11 @@ import java.io.Serializable;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
+import java.util.Optional;
import java.util.stream.Collectors;
import eu.dnetlib.dhp.schema.common.AccessRightComparator;
+import eu.dnetlib.dhp.schema.common.ModelConstants;
public class Result extends OafEntity implements Serializable {
@@ -233,6 +235,13 @@ public class Result extends OafEntity implements Serializable {
this.instance = instance;
}
+
+ private static boolean isAnEnrichment(OafEntity e) {
+ return e.getDataInfo()!= null &&
+ e.getDataInfo().getProvenanceaction()!= null
+ && ModelConstants.PROVENANCE_ENRICH.equalsIgnoreCase(e.getDataInfo().getProvenanceaction().getClassid());
+ }
+
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);