removed email from the class that binds responsible, contributor, owner and creator data, added new class that binds publisher data with email; updated properties and queries according to the new model
This commit is contained in:
parent
d2696d4f6e
commit
14e7228068
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public class AriadnePlusEntry {
|
|||
private List<NativeSubject> nativeSubject;
|
||||
private String originalId;
|
||||
private List<AgentInfo> owner;
|
||||
private List<AgentInfo> publisher;
|
||||
private List<PublisherInfo> publisher;
|
||||
private List<AriadneResource> is_about;
|
||||
private String resourceType;
|
||||
private AriadneResource has_type;
|
||||
|
@ -79,14 +79,6 @@ public class AriadnePlusEntry {
|
|||
this.derivedSubject = derivedSubject;
|
||||
}
|
||||
|
||||
public List<AgentInfo> getPublisher() {
|
||||
return publisher;
|
||||
}
|
||||
|
||||
public void setPublisher(List<AgentInfo> 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<PublisherInfo> getPublisher() {
|
||||
return publisher;
|
||||
}
|
||||
|
||||
public void setPublisher(List<PublisherInfo> publisher) {
|
||||
this.publisher = publisher;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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": {\
|
||||
|
|
|
@ -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 .
|
||||
}
|
||||
|
|
|
@ -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 .
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue