Enrichment support #8
|
@ -3,7 +3,8 @@
|
|||
## Changelog
|
||||
|
||||
| **Version** | **Changes** | **Readiness** |
|
||||
|-------------|---|---|
|
||||
|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
|
||||
| 2.10.24 | [Graph model]</br>added utility method and constants for checking weather is an OafEntity represents an enrichment. | beta |
|
||||
| 2.9.24 | [Dump model]</br>change the names of the classes to be able to automatically create the json schema with specific descriptions | beta |
|
||||
| 2.9.23 | [Graph model]<br>Added Instance.measures field, allowing to maintain the association between them and the individual result instance</br>[Dump model]</br>added json schemas | beta |
|
||||
| 2.8.22 | [Graph model]<br>minor: added serializable to the Measures model class</br>[Dump model]</br>added dedicated BestAccessRight class, used at the result level instead of AccessRight | production |
|
||||
|
@ -20,7 +21,7 @@
|
|||
| 2.5.[11-9] | 1. support for more date formats<br>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]<br>1. introduced MetadataStoreManager (MdSM) model classes| production |
|
||||
| 2.3.6 | [Aggregation]<br>1. introduced MetadataStoreManager (MdSM) model classes | production |
|
||||
| 2.2.5 | [Graph model]<br>1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`<br>2. `LicenseComparator` renamed as `AccessRightComparator`<br>3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level<br>4. `ExternalReference` cleanup (removed description, added alternateLabel(s))<br>5. added several ModelConstants<br>[Aggregation]<br>7. introduced MDStore record model classes<br>8. Introduced ORCID specific model classes | production |
|
||||
| 2.2.4 | 1. ORCID specific model classes backported in the version used in PROD<br>2. added constant for dnet:externalReference_typologies<br>3. added constant for ORCID datasource name<br>4. `Result.mergeFrom` handles field `dateOfAcceptance` | production |
|
||||
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -5,7 +5,7 @@
|
|||
<groupId>eu.dnetlib.dhp</groupId>
|
||||
<artifactId>dhp-schemas</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>2.9.25-SNAPSHOT</version>
|
||||
<version>2.10.24-SNAPSHOT</version>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<connection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</connection>
|
||||
<developerConnection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</developerConnection>
|
||||
<url>https://code-repo.d4science.org/D-Net/dhp-schemas/</url>
|
||||
<tag>dhp-schemas-2.9.24</tag>
|
||||
<tag>dhp-schemas-2.10.24</tag>
|
||||
</scm>
|
||||
|
||||
<description>This module contains common schema classes meant to be used across the dnet-hadoop submodules</description>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue