From 7aed048eec60931574f4be117aed63086cf31dfa Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 12 Jun 2024 16:03:51 +0200 Subject: [PATCH] added person entity to the internal graph model --- .../dhp/schema/common/ModelConstants.java | 17 +++ .../eu/dnetlib/dhp/schema/oaf/Person.java | 138 ++++++++++++++++++ .../dnetlib/dhp/schema/oaf/PersonTopic.java | 52 +++++++ 3 files changed, 207 insertions(+) create mode 100644 src/main/java/eu/dnetlib/dhp/schema/oaf/Person.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/oaf/PersonTopic.java 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 5373015..ff7c7c7 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -190,6 +190,23 @@ public class ModelConstants { public static final String UNKNOWN = "UNKNOWN"; public static final String NOT_AVAILABLE = "not available"; + public static final String RESULT_PERSON_RELTYPE = "resultPerson"; // relType + public static final String RESULT_PERSON_SUBRELTYPE = "authorship"; // subreltype + public static final String RESULT_PERSON_HASAUTHORED = "hasAuthored"; // relclass + + public static final String PERSON_PERSON_RELTYPE = "personPerson"; // relType + public static final String PERSON_PERSON_SUBRELTYPE = "coAuthorship"; // subreltype + public static final String PERSON_PERSON_HASCOAUTHORED = "hasCoAuthor"; // relclass + + public static final String PROJECT_PERSON_RELTYPE = "projectPerson"; // relType + public static final String PROJECT_PERSON_SUBRELTYPE = "participation"; // subreltype + public static final String PROJECT_PERSON_PARTICIPATES = "participatesToProject"; // relclass + + // author affiliations are intended to be characterised by a start and an end date + public static final String ORG_PERSON_RELTYPE = "organizationPerson"; // relType + public static final String ORG_PERSON_SUBRELTYPE = "affiliation"; // subreltype + public static final String ORG_PERSON_PARTICIPATES = "isAffiliatedWith"; // relclass + public static final Qualifier PUBLICATION_DEFAULT_RESULTTYPE = qualifier( PUBLICATION_RESULTTYPE_CLASSID, PUBLICATION_RESULTTYPE_CLASSID, DNET_RESULT_TYPOLOGIES, DNET_RESULT_TYPOLOGIES); diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Person.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Person.java new file mode 100644 index 0000000..a24bff4 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Person.java @@ -0,0 +1,138 @@ +package eu.dnetlib.dhp.schema.oaf; + +import java.io.Serializable; +import java.util.List; + +public class Person implements Serializable { + + private static final long serialVersionUID = -2366333710489222265L; + + private String id; + + private String givenName; + + private String familyName; + + private List alternativeNames; + + private String biography; + + private List subject; + + private List collectedfrom; + + private List pid; + + private String dateofcollection; + + /** + * The Measures. + */ + private List indicator; + + /** + * The Context. + */ + private List context; + + private Boolean consent; + + public Person() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getGivenName() { + return givenName; + } + + public void setGivenName(String givenName) { + this.givenName = givenName; + } + + public String getFamilyName() { + return familyName; + } + + public void setFamilyName(String familyName) { + this.familyName = familyName; + } + + public List getAlternativeNames() { + return alternativeNames; + } + + public void setAlternativeNames(List alternativeNames) { + this.alternativeNames = alternativeNames; + } + + public String getBiography() { + return biography; + } + + public void setBiography(String biography) { + this.biography = biography; + } + + public List getSubject() { + return subject; + } + + public void setSubject(List subject) { + this.subject = subject; + } + + public List getCollectedfrom() { + return collectedfrom; + } + + public void setCollectedfrom(List collectedfrom) { + this.collectedfrom = collectedfrom; + } + + 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 List getIndicator() { + return indicator; + } + + public void setIndicator(List indicator) { + this.indicator = indicator; + } + + public List getContext() { + return context; + } + + public void setContext(List context) { + this.context = context; + } + + public Boolean getConsent() { + return consent; + } + + public void setConsent(Boolean consent) { + this.consent = consent; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/PersonTopic.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/PersonTopic.java new file mode 100644 index 0000000..ac9dbac --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/PersonTopic.java @@ -0,0 +1,52 @@ +package eu.dnetlib.dhp.schema.oaf; + +import java.io.Serializable; +import java.time.Year; + +public class PersonTopic implements Serializable { + + private static final long serialVersionUID = 102011326860637199L; + + private String value; + + private String schema; + + private Year fromYear; + + private Year toYear; + + public PersonTopic() { + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getSchema() { + return schema; + } + + public void setSchema(String schema) { + this.schema = schema; + } + + public Year getFromYear() { + return fromYear; + } + + public void setFromYear(Year fromYear) { + this.fromYear = fromYear; + } + + public Year getToYear() { + return toYear; + } + + public void setToYear(Year toYear) { + this.toYear = toYear; + } +}