Merge pull request 'Enrichment support' (#8) from enrichment into master
Reviewed-on: #8
This commit is contained in:
commit
11ea9e46b1
|
@ -3,7 +3,8 @@
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
| **Version** | **Changes** | **Readiness** |
|
| **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.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.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 |
|
| 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 |
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -5,7 +5,7 @@
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>dhp-schemas</artifactId>
|
<artifactId>dhp-schemas</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>2.9.25-SNAPSHOT</version>
|
<version>2.10.24-SNAPSHOT</version>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
<connection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</connection>
|
<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>
|
<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>
|
<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>
|
</scm>
|
||||||
|
|
||||||
<description>This module contains common schema classes meant to be used across the dnet-hadoop submodules</description>
|
<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 HARVESTED = "Harvested";
|
||||||
|
|
||||||
public static final String PROVENANCE_DEDUP = "sysimport:dedup";
|
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(
|
public static final Qualifier PROVENANCE_ACTION_SET_QUALIFIER = qualifier(
|
||||||
SYSIMPORT_ACTIONSET, SYSIMPORT_ACTIONSET, DNET_PROVENANCE_ACTIONS, DNET_PROVENANCE_ACTIONS);
|
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.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.common.AccessRightComparator;
|
import eu.dnetlib.dhp.schema.common.AccessRightComparator;
|
||||||
|
import eu.dnetlib.dhp.schema.common.ModelConstants;
|
||||||
|
|
||||||
public class Result extends OafEntity implements Serializable {
|
public class Result extends OafEntity implements Serializable {
|
||||||
|
|
||||||
|
@ -233,6 +235,13 @@ public class Result extends OafEntity implements Serializable {
|
||||||
this.instance = instance;
|
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
|
@Override
|
||||||
public void mergeFrom(OafEntity e) {
|
public void mergeFrom(OafEntity e) {
|
||||||
super.mergeFrom(e);
|
super.mergeFrom(e);
|
||||||
|
|
Loading…
Reference in New Issue