[personEntity] changed the data info for the relations with projects. added missing parameters to the job.properties file
This commit is contained in:
parent
821540f94a
commit
aac5eb3499
|
@ -71,13 +71,15 @@ public class ExtractPerson implements Serializable {
|
||||||
private static final String PERSON_PREFIX = ModelSupport.getIdPrefix(Person.class) + "|orcid_______";
|
private static final String PERSON_PREFIX = ModelSupport.getIdPrefix(Person.class) + "|orcid_______";
|
||||||
public static final String ORCID_AUTHORS_CLASSID = "sysimport:crosswalk:orcid";
|
public static final String ORCID_AUTHORS_CLASSID = "sysimport:crosswalk:orcid";
|
||||||
public static final String ORCID_AUTHORS_CLASSNAME = "Imported from ORCID";
|
public static final String ORCID_AUTHORS_CLASSNAME = "Imported from ORCID";
|
||||||
|
public static final String FUNDER_AUTHORS_CLASSID = "sysimport:crosswalk:funderdatabase";
|
||||||
|
public static final String FUNDER_AUTHORS_CLASSNAME = "Imported from Funder Database";
|
||||||
public static final String OPENAIRE_DATASOURCE_ID = "10|infrastruct_::f66f1bd369679b5b077dcdf006089556";
|
public static final String OPENAIRE_DATASOURCE_ID = "10|infrastruct_::f66f1bd369679b5b077dcdf006089556";
|
||||||
public static final String OPENAIRE_DATASOURCE_NAME = "OpenAIRE";
|
public static final String OPENAIRE_DATASOURCE_NAME = "OpenAIRE";
|
||||||
|
|
||||||
public static List<KeyValue> collectedfromOpenAIRE = OafMapperUtils
|
public static List<KeyValue> collectedfromOpenAIRE = OafMapperUtils
|
||||||
.listKeyValues(OPENAIRE_DATASOURCE_ID, OPENAIRE_DATASOURCE_NAME);
|
.listKeyValues(OPENAIRE_DATASOURCE_ID, OPENAIRE_DATASOURCE_NAME);
|
||||||
|
|
||||||
public static final DataInfo DATAINFO = OafMapperUtils
|
public static final DataInfo ORCIDDATAINFO = OafMapperUtils
|
||||||
.dataInfo(
|
.dataInfo(
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
|
@ -91,6 +93,20 @@ public class ExtractPerson implements Serializable {
|
||||||
ModelConstants.DNET_PROVENANCE_ACTIONS),
|
ModelConstants.DNET_PROVENANCE_ACTIONS),
|
||||||
"0.91");
|
"0.91");
|
||||||
|
|
||||||
|
public static final DataInfo FUNDERDATAINFO = OafMapperUtils
|
||||||
|
.dataInfo(
|
||||||
|
false,
|
||||||
|
null,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
OafMapperUtils
|
||||||
|
.qualifier(
|
||||||
|
FUNDER_AUTHORS_CLASSID,
|
||||||
|
FUNDER_AUTHORS_CLASSNAME,
|
||||||
|
ModelConstants.DNET_PROVENANCE_ACTIONS,
|
||||||
|
ModelConstants.DNET_PROVENANCE_ACTIONS),
|
||||||
|
"0.91");
|
||||||
|
|
||||||
public static void main(final String[] args) throws IOException, ParseException {
|
public static void main(final String[] args) throws IOException, ParseException {
|
||||||
|
|
||||||
final ArgumentApplicationParser parser = new ArgumentApplicationParser(
|
final ArgumentApplicationParser parser = new ArgumentApplicationParser(
|
||||||
|
@ -182,7 +198,7 @@ public class ExtractPerson implements Serializable {
|
||||||
source, target, ModelConstants.PROJECT_PERSON_RELTYPE, ModelConstants.PROJECT_PERSON_SUBRELTYPE,
|
source, target, ModelConstants.PROJECT_PERSON_RELTYPE, ModelConstants.PROJECT_PERSON_SUBRELTYPE,
|
||||||
ModelConstants.PROJECT_PERSON_PARTICIPATES,
|
ModelConstants.PROJECT_PERSON_PARTICIPATES,
|
||||||
collectedfromOpenAIRE,
|
collectedfromOpenAIRE,
|
||||||
DATAINFO,
|
FUNDERDATAINFO,
|
||||||
null);
|
null);
|
||||||
relation.setValidated(true);
|
relation.setValidated(true);
|
||||||
|
|
||||||
|
@ -328,7 +344,7 @@ public class ExtractPerson implements Serializable {
|
||||||
ModelConstants.DNET_PID_TYPES, ModelConstants.DNET_PID_TYPES, null));
|
ModelConstants.DNET_PID_TYPES, ModelConstants.DNET_PID_TYPES, null));
|
||||||
person.setDateofcollection(op.getLastModifiedDate());
|
person.setDateofcollection(op.getLastModifiedDate());
|
||||||
person.setOriginalId(Arrays.asList(op.getOrcid()));
|
person.setOriginalId(Arrays.asList(op.getOrcid()));
|
||||||
person.setDataInfo(DATAINFO);
|
person.setDataInfo(ORCIDDATAINFO);
|
||||||
return person;
|
return person;
|
||||||
}, Encoders.bean(Person.class))
|
}, Encoders.bean(Person.class))
|
||||||
.write()
|
.write()
|
||||||
|
@ -415,7 +431,7 @@ public class ExtractPerson implements Serializable {
|
||||||
source, target, ModelConstants.ORG_PERSON_RELTYPE, ModelConstants.ORG_PERSON_SUBRELTYPE,
|
source, target, ModelConstants.ORG_PERSON_RELTYPE, ModelConstants.ORG_PERSON_SUBRELTYPE,
|
||||||
ModelConstants.ORG_PERSON_PARTICIPATES,
|
ModelConstants.ORG_PERSON_PARTICIPATES,
|
||||||
Arrays.asList(OafMapperUtils.keyValue(orcidKey, ModelConstants.ORCID_DS)),
|
Arrays.asList(OafMapperUtils.keyValue(orcidKey, ModelConstants.ORCID_DS)),
|
||||||
DATAINFO,
|
ORCIDDATAINFO,
|
||||||
null);
|
null);
|
||||||
relation.setValidated(true);
|
relation.setValidated(true);
|
||||||
|
|
||||||
|
@ -438,31 +454,6 @@ public class ExtractPerson implements Serializable {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Collection<? extends Relation> getCoAuthorshipRelations(String orcid1, String orcid2) {
|
|
||||||
String source = PERSON_PREFIX + "::" + IdentifierFactory.md5(orcid1);
|
|
||||||
String target = PERSON_PREFIX + "::" + IdentifierFactory.md5(orcid2);
|
|
||||||
|
|
||||||
return Arrays
|
|
||||||
.asList(
|
|
||||||
OafMapperUtils
|
|
||||||
.getRelation(
|
|
||||||
source, target, ModelConstants.PERSON_PERSON_RELTYPE,
|
|
||||||
ModelConstants.PERSON_PERSON_SUBRELTYPE,
|
|
||||||
ModelConstants.PERSON_PERSON_HASCOAUTHORED,
|
|
||||||
Arrays.asList(OafMapperUtils.keyValue(orcidKey, ModelConstants.ORCID_DS)),
|
|
||||||
DATAINFO,
|
|
||||||
null),
|
|
||||||
OafMapperUtils
|
|
||||||
.getRelation(
|
|
||||||
target, source, ModelConstants.PERSON_PERSON_RELTYPE,
|
|
||||||
ModelConstants.PERSON_PERSON_SUBRELTYPE,
|
|
||||||
ModelConstants.PERSON_PERSON_HASCOAUTHORED,
|
|
||||||
Arrays.asList(OafMapperUtils.keyValue(orcidKey, ModelConstants.ORCID_DS)),
|
|
||||||
DATAINFO,
|
|
||||||
null));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private static @NotNull Iterator<Relation> getAuthorshipRelationIterator(Work w) {
|
private static @NotNull Iterator<Relation> getAuthorshipRelationIterator(Work w) {
|
||||||
|
|
||||||
if (Optional.ofNullable(w.getPids()).isPresent())
|
if (Optional.ofNullable(w.getPids()).isPresent())
|
||||||
|
@ -511,7 +502,7 @@ public class ExtractPerson implements Serializable {
|
||||||
ModelConstants.RESULT_PERSON_SUBRELTYPE,
|
ModelConstants.RESULT_PERSON_SUBRELTYPE,
|
||||||
ModelConstants.RESULT_PERSON_HASAUTHORED,
|
ModelConstants.RESULT_PERSON_HASAUTHORED,
|
||||||
Arrays.asList(OafMapperUtils.keyValue(orcidKey, ModelConstants.ORCID_DS)),
|
Arrays.asList(OafMapperUtils.keyValue(orcidKey, ModelConstants.ORCID_DS)),
|
||||||
DATAINFO,
|
ORCIDDATAINFO,
|
||||||
null);
|
null);
|
||||||
relation.setValidated(true);
|
relation.setValidated(true);
|
||||||
return relation;
|
return relation;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
inputPath=/data/orcid_2023/tables/
|
inputPath=/data/orcid_2023/tables/
|
||||||
outputPath=/user/miriam.baglioni/peopleAS
|
outputPath=/user/miriam.baglioni/peopleAS
|
||||||
postgresUrl=jdbc:postgresql://beta.services.openaire.eu:5432/dnet_openaireplus
|
postgresUrl=jdbc:postgresql://beta.services.openaire.eu:5432/dnet_openaireplus
|
||||||
postgresUser=dnet'
|
postgresUser=dnet
|
||||||
postgresPassword=dnetPwd
|
postgresPassword=dnetPwd
|
Loading…
Reference in New Issue