diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/AgentInfo.java b/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/AgentInfo.java index 43f17d5..c0501fb 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/AgentInfo.java +++ b/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/AgentInfo.java @@ -3,24 +3,15 @@ package eu.dnetlib.ariadneplus.elasticsearch.model; import com.google.gson.Gson; public class AgentInfo { - private String email = new String(""); - private String homepage = new String(""); - private String institution = new String(""); - private String name = new String(""); - private String agentIdentifier = new String(""); + protected String homepage = new String(""); + protected String institution = new String(""); + protected String name = new String(""); + protected String agentIdentifier = new String(""); public AgentInfo() { } - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - public String getName() { return name; } diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/AriadnePlusEntry.java b/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/AriadnePlusEntry.java index 25f886b..15cd8a6 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/AriadnePlusEntry.java +++ b/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/AriadnePlusEntry.java @@ -23,7 +23,7 @@ public class AriadnePlusEntry { private List nativeSubject; private String originalId; private List owner; - private List publisher; + private List publisher; private List is_about; private String resourceType; private AriadneResource has_type; @@ -79,14 +79,6 @@ public class AriadnePlusEntry { this.derivedSubject = derivedSubject; } - public List getPublisher() { - return publisher; - } - - public void setPublisher(List publisher) { - this.publisher = publisher; - } - public String getExtent() { return extent; } @@ -305,4 +297,12 @@ public class AriadnePlusEntry { public String toJson(){ return new Gson().toJson(this); } + + public List getPublisher() { + return publisher; + } + + public void setPublisher(List publisher) { + this.publisher = publisher; + } } \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/PublisherInfo.java b/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/PublisherInfo.java new file mode 100644 index 0000000..660f65c --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/PublisherInfo.java @@ -0,0 +1,13 @@ +package eu.dnetlib.ariadneplus.elasticsearch.model; + +public class PublisherInfo extends AgentInfo { + private String email = new String(""); + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } +} diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/application.properties b/dnet-ariadneplus-graphdb-publisher/src/main/resources/application.properties index 9b45c6f..b2c1685 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/application.properties +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/application.properties @@ -211,11 +211,6 @@ class.map.specifications={\ "substring": "no",\ "element_type": "java.lang.String"\ },\ -"https://www.ariadne-infrastructure.eu/property/email": {\ -"class_field": "Email",\ -"substring": "no",\ -"element_type": "java.lang.String"\ -},\ "https://www.ariadne-infrastructure.eu/property/homepage": {\ "class_field": "Homepage",\ "substring": "no",\ @@ -233,6 +228,41 @@ class.map.specifications={\ }\ }\ },\ +"PublisherInfo": {\ +"class_type": "prototype",\ +"mappings": {\ +"https://www.ariadne-infrastructure.eu/property/publisherName": {\ +"class_field": "Name",\ +"substring": "no",\ +"element_type": "java.lang.String"\ +},\ +"https://www.ariadne-infrastructure.eu/property/type": {\ +"class_field": "Type",\ +"substring": "no",\ +"element_type": "java.lang.String"\ +},\ +"https://www.ariadne-infrastructure.eu/property/publisherEmail": {\ +"class_field": "Email",\ +"substring": "no",\ +"element_type": "java.lang.String"\ +},\ +"https://www.ariadne-infrastructure.eu/property/publisherHomepage": {\ +"class_field": "Homepage",\ +"substring": "no",\ +"element_type": "java.lang.String"\ +},\ +"https://www.ariadne-infrastructure.eu/property/publisherInstitution": {\ +"class_field": "Institution",\ +"substring": "no",\ +"element_type": "java.lang.String"\ +},\ +"https://www.ariadne-infrastructure.eu/property/publisherAgentIdentifier": {\ +"class_field": "AgentIdentifier",\ +"substring": "no",\ +"element_type": "java.lang.String"\ +}\ +}\ +},\ "NativeSubject": {\ "class_type": "prototype",\ "mappings": {\ @@ -303,7 +333,7 @@ class.map.specifications={\ },\ "https://www.ariadne-infrastructure.eu/property/publisher": {\ "class_field": "Publisher",\ -"external_reference": "AgentInfo",\ +"external_reference": "PublisherInfo",\ "substring": "no"\ },\ "https://www.ariadne-infrastructure.eu/property/archeologicalResourceType": {\ diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_collection_data_template.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_collection_data_template.sparql index cbfadbf..9df7d5a 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_collection_data_template.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_collection_data_template.sparql @@ -17,34 +17,30 @@ CONSTRUCT { %record aoprop:partOf ?partOf . %record aoprop:creator ?creator . ?creator aoprop:name ?creatorName . -?creator aoprop:email ?creatorEmail . ?creator aoprop:homepage ?creatorHomepage . ?creator aoprop:institution ?creatorInstitution . ?creator aoprop:agentIdentifier ?creator . %record aoprop:contributor ?contributor . ?contributor aoprop:name ?contributorName . -?contributor aoprop:email ?contributorEmail . ?contributor aoprop:homepage ?contributorHomepage . ?contributor aoprop:institution ?contributorInstitution . ?contributor aoprop:agentIdentifier ?contributor . %record aoprop:legalResponsible ?legalResponsible . ?legalResponsible aoprop:name ?legalResponsibleName . -?legalResponsible aoprop:email ?legalResponsibleEmail . ?legalResponsible aoprop:homepage ?legalResponsibleHomepage . ?legalResponsible aoprop:institution ?legalResponsibleInstitution . ?legalResponsible aoprop:agentIdentifier ?legalResponsible . %record aoprop:owner ?owner . ?owner aoprop:name ?ownerName . -?owner aoprop:email ?ownerEmail . ?owner aoprop:homepage ?ownerHomepage . ?owner aoprop:institution ?ownerInstitution . ?owner aoprop:agentIdentifier ?owner . %record aoprop:publisher ?publisher . -?publisher aoprop:name ?publisherName . -?publisher aoprop:email ?publisherEmail . -?publisher aoprop:homepage ?publisherHomepage . -?publisher aoprop:institution ?publisherInstitution . -?publisher aoprop:agentIdentifier ?publisher . +?publisher aoprop:publisherName ?publisherName . +?publisher aoprop:publisherEmail ?publisherEmail . +?publisher aoprop:publisherHomepage ?publisherHomepage . +?publisher aoprop:publisherInstitution ?publisherInstitution . +?publisher aoprop:publisherAgentIdentifier ?publisher . %record aoprop:accessPolicy ?accessPolicy . %record aoprop:accessRights ?accessRights . %record aoprop:landingPage ?landingPage . @@ -113,9 +109,6 @@ where { %record aocat:has_type ?typeURI . ?typeURI skos:prefLabel ?typeLabel . optional { - ?creator aocat:has_email ?creatorEmail . - } - optional { %record aocat:has_description ?description . } optional { @@ -199,27 +192,18 @@ where { optional { %record aocat:was_created_on ?created . } - optional { - ?contributor aocat:has_email ?contributorEmail . - } optional { ?contributor aocat:has_homepage ?contributorHomepage . } optional { ?contributor aocat:has_institution ?contributorInstitution . } - optional { - ?legalResponsible aocat:has_email ?legalResponsibleEmail . - } optional { ?legalResponsible aocat:has_homepage ?legalResponsibleHomepage . } optional { ?legalResponsible aocat:has_institution ?legalResponsibleInstitution . } - optional { - ?owner aocat:has_email ?ownerEmail . - } optional { ?owner aocat:has_homepage ?ownerHomepage . } diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_record_data_template.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_record_data_template.sparql index d0747d1..bd611ac 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_record_data_template.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/read_record_data_template.sparql @@ -17,34 +17,30 @@ CONSTRUCT { %record aoprop:partOf ?partOf . %record aoprop:creator ?creator . ?creator aoprop:name ?creatorName . -?creator aoprop:email ?creatorEmail . ?creator aoprop:homepage ?creatorHomepage . ?creator aoprop:institution ?creatorInstitution . ?creator aoprop:agentIdentifier ?creator . %record aoprop:contributor ?contributor . ?contributor aoprop:name ?contributorName . -?contributor aoprop:email ?contributorEmail . ?contributor aoprop:homepage ?contributorHomepage . ?contributor aoprop:institution ?contributorInstitution . ?contributor aoprop:agentIdentifier ?contributor . %record aoprop:legalResponsible ?legalResponsible . ?legalResponsible aoprop:name ?legalResponsibleName . -?legalResponsible aoprop:email ?legalResponsibleEmail . ?legalResponsible aoprop:homepage ?legalResponsibleHomepage . ?legalResponsible aoprop:institution ?legalResponsibleInstitution . ?legalResponsible aoprop:agentIdentifier ?legalResponsible . %record aoprop:owner ?owner . ?owner aoprop:name ?ownerName . -?owner aoprop:email ?ownerEmail . ?owner aoprop:homepage ?ownerHomepage . ?owner aoprop:institution ?ownerInstitution . ?owner aoprop:agentIdentifier ?owner . %record aoprop:publisher ?publisher . -?publisher aoprop:name ?publisherName . -?publisher aoprop:email ?publisherEmail . -?publisher aoprop:homepage ?publisherHomepage . -?publisher aoprop:institution ?publisherInstitution . -?publisher aoprop:agentIdentifier ?publisher . +?publisher aoprop:publisherName ?publisherName . +?publisher aoprop:publisherEmail ?publisherEmail . +?publisher aoprop:publisherHomepage ?publisherHomepage . +?publisher aoprop:publisherInstitution ?publisherInstitution . +?publisher aoprop:publisherAgentIdentifier ?publisher . %record aoprop:accessPolicy ?accessPolicy . %record aoprop:accessRights ?accessRights . %record aoprop:landingPage ?landingPage . @@ -116,9 +112,6 @@ where { %record aocat:has_type / skos:prefLabel ?resourceType . %record aocat:has_type ?typeURI . ?typeURI skos:prefLabel ?typeLabel . - optional { - ?creator aocat:has_email ?creatorEmail . - } optional { %record aocat:has_description ?description . } @@ -213,27 +206,18 @@ where { optional { %record aocat:was_created_on ?created . } - optional { - ?contributor aocat:has_email ?contributorEmail . - } optional { ?contributor aocat:has_homepage ?contributorHomepage . } optional { ?contributor aocat:has_institution ?contributorInstitution . } - optional { - ?legalResponsible aocat:has_email ?legalResponsibleEmail . - } optional { ?legalResponsible aocat:has_homepage ?legalResponsibleHomepage . } optional { ?legalResponsible aocat:has_institution ?legalResponsibleInstitution . } - optional { - ?owner aocat:has_email ?ownerEmail . - } optional { ?owner aocat:has_homepage ?ownerHomepage . }