added new fields from es mapping: agent (homepage,institution,agentIdentifier) and wasCreated

This commit is contained in:
Enrico Ottonello 2021-06-23 11:26:56 +02:00
parent 89f309feaa
commit 4882e38d64
5 changed files with 101 additions and 5 deletions

View File

@ -126,10 +126,10 @@ public class BulkUpload {
Double.parseDouble(p.getLon()), Double.parseDouble(p.getLon()),
Double.parseDouble(p.getLat())); Double.parseDouble(p.getLat()));
}); });
PolygonBuilder polygonBuilder = new PolygonBuilder(coordinatesBuilder); // PolygonBuilder polygonBuilder = new PolygonBuilder(coordinatesBuilder);
String wkt = polygonBuilder.toWKT(); // String wkt = polygonBuilder.toWKT();
log.debug("POLYGON "+wkt); // log.debug("POLYGON "+wkt);
s.setPolygon(wkt); // s.setPolygon(wkt);
}); });
ace.getSpatial() ace.getSpatial()
.stream() .stream()

View File

@ -225,7 +225,7 @@ public class AriadnePlusEntry {
} }
public void setWasCreated(String wasCreated) { public void setWasCreated(String wasCreated) {
this.wasCreated = wasCreated; this.wasCreated = ESUtils.getESFormatDate(wasCreated);
} }
public String getUniqueIsPartOf() { public String getUniqueIsPartOf() {

View File

@ -170,6 +170,11 @@ class.map.specifications={\
"class_field": "Institution",\ "class_field": "Institution",\
"substring": "no",\ "substring": "no",\
"element_type": "java.lang.String"\ "element_type": "java.lang.String"\
},\
"https://www.ariadne-infrastructure.eu/property/agentIdentifier": {\
"class_field": "AgentIdentifier",\
"substring": "no",\
"element_type": "java.lang.String"\
}\ }\
}\ }\
},\ },\
@ -246,6 +251,11 @@ class.map.specifications={\
"element_type": "java.lang.String",\ "element_type": "java.lang.String",\
"substring": "no"\ "substring": "no"\
},\ },\
"https://www.ariadne-infrastructure.eu/property/created": {\
"class_field": "WasCreated",\
"element_type": "java.lang.String",\
"substring": "no"\
},\
"https://www.ariadne-infrastructure.eu/property/resourceType": {\ "https://www.ariadne-infrastructure.eu/property/resourceType": {\
"class_field": "ResourceType",\ "class_field": "ResourceType",\
"element_type": "java.lang.String",\ "element_type": "java.lang.String",\

View File

@ -12,22 +12,38 @@ CONSTRUCT {
%record aoprop:originalId ?originalId . %record aoprop:originalId ?originalId .
%record aoprop:issued ?issued . %record aoprop:issued ?issued .
%record aoprop:modified ?modified . %record aoprop:modified ?modified .
%record aoprop:created ?created .
%record aoprop:partOf ?partOf . %record aoprop:partOf ?partOf .
%record aoprop:creator ?creator . %record aoprop:creator ?creator .
?creator aoprop:name ?creatorName . ?creator aoprop:name ?creatorName .
?creator aoprop:email ?creatorEmail . ?creator aoprop:email ?creatorEmail .
?creator aoprop:homepage ?creatorHomepage .
?creator aoprop:institution ?creatorInstitution .
?creator aoprop:agentIdentifier ?creator .
%record aoprop:contributor ?contributor . %record aoprop:contributor ?contributor .
?contributor aoprop:name ?contributorName . ?contributor aoprop:name ?contributorName .
?contributor aoprop:email ?contributorEmail . ?contributor aoprop:email ?contributorEmail .
?contributor aoprop:homepage ?contributorHomepage .
?contributor aoprop:institution ?contributorInstitution .
?contributor aoprop:agentIdentifier ?contributor .
%record aoprop:legalResponsible ?legalResponsible . %record aoprop:legalResponsible ?legalResponsible .
?legalResponsible aoprop:name ?legalResponsibleName . ?legalResponsible aoprop:name ?legalResponsibleName .
?legalResponsible aoprop:email ?legalResponsibleEmail . ?legalResponsible aoprop:email ?legalResponsibleEmail .
?legalResponsible aoprop:homepage ?legalResponsibleHomepage .
?legalResponsible aoprop:institution ?legalResponsibleInstitution .
?legalResponsible aoprop:agentIdentifier ?legalResponsible .
%record aoprop:owner ?owner . %record aoprop:owner ?owner .
?owner aoprop:name ?ownerName . ?owner aoprop:name ?ownerName .
?owner aoprop:email ?ownerEmail . ?owner aoprop:email ?ownerEmail .
?owner aoprop:homepage ?ownerHomepage .
?owner aoprop:institution ?ownerInstitution .
?owner aoprop:agentIdentifier ?owner .
%record aoprop:publisher ?publisher . %record aoprop:publisher ?publisher .
?publisher aoprop:name ?publisherName . ?publisher aoprop:name ?publisherName .
?publisher aoprop:email ?publisherEmail . ?publisher aoprop:email ?publisherEmail .
?publisher aoprop:homepage ?publisherHomepage .
?publisher aoprop:institution ?publisherInstitution .
?publisher aoprop:agentIdentifier ?publisher .
%record aoprop:accessPolicy ?accessPolicy . %record aoprop:accessPolicy ?accessPolicy .
%record aoprop:accessRights ?accessRights . %record aoprop:accessRights ?accessRights .
%record aoprop:landingPage ?landingPage . %record aoprop:landingPage ?landingPage .
@ -156,18 +172,45 @@ where {
%record aocat:has_access_rights ?accessRights . %record aocat:has_access_rights ?accessRights .
%record aocat:has_ARIADNE_subject ?archeologicalResourceType . %record aocat:has_ARIADNE_subject ?archeologicalResourceType .
?archeologicalResourceType skos:prefLabel ?archeologicalResourceTypeName . ?archeologicalResourceType skos:prefLabel ?archeologicalResourceTypeName .
optional {
%record aocat:was_created_on ?created .
}
optional { optional {
?contributor aocat:has_email ?contributorEmail . ?contributor aocat:has_email ?contributorEmail .
} }
optional {
?contributor aocat:has_homepage ?contributorHomepage .
}
optional {
?contributor aocat:has_institution ?contributorInstitution .
}
optional { optional {
?legalResponsible aocat:has_email ?legalResponsibleEmail . ?legalResponsible aocat:has_email ?legalResponsibleEmail .
} }
optional {
?legalResponsible aocat:has_homepage ?legalResponsibleHomepage .
}
optional {
?legalResponsible aocat:has_institution ?legalResponsibleInstitution .
}
optional { optional {
?owner aocat:has_email ?ownerEmail . ?owner aocat:has_email ?ownerEmail .
} }
optional {
?owner aocat:has_homepage ?ownerHomepage .
}
optional {
?owner aocat:has_institution ?ownerInstitution .
}
optional { optional {
?publisher aocat:has_email ?publisherEmail . ?publisher aocat:has_email ?publisherEmail .
} }
optional {
?publisher aocat:has_homepage ?publisherHomepage .
}
optional {
?publisher aocat:has_institution ?publisherInstitution .
}
} }
} }
} }

View File

@ -12,22 +12,38 @@ CONSTRUCT {
%record aoprop:originalId ?originalId . %record aoprop:originalId ?originalId .
%record aoprop:issued ?issued . %record aoprop:issued ?issued .
%record aoprop:modified ?modified . %record aoprop:modified ?modified .
%record aoprop:created ?created .
%record aoprop:partOf ?partOf . %record aoprop:partOf ?partOf .
%record aoprop:creator ?creator . %record aoprop:creator ?creator .
?creator aoprop:name ?creatorName . ?creator aoprop:name ?creatorName .
?creator aoprop:email ?creatorEmail . ?creator aoprop:email ?creatorEmail .
?creator aoprop:homepage ?creatorHomepage .
?creator aoprop:institution ?creatorInstitution .
?creator aoprop:agentIdentifier ?creator .
%record aoprop:contributor ?contributor . %record aoprop:contributor ?contributor .
?contributor aoprop:name ?contributorName . ?contributor aoprop:name ?contributorName .
?contributor aoprop:email ?contributorEmail . ?contributor aoprop:email ?contributorEmail .
?contributor aoprop:homepage ?contributorHomepage .
?contributor aoprop:institution ?contributorInstitution .
?contributor aoprop:agentIdentifier ?contributor .
%record aoprop:legalResponsible ?legalResponsible . %record aoprop:legalResponsible ?legalResponsible .
?legalResponsible aoprop:name ?legalResponsibleName . ?legalResponsible aoprop:name ?legalResponsibleName .
?legalResponsible aoprop:email ?legalResponsibleEmail . ?legalResponsible aoprop:email ?legalResponsibleEmail .
?legalResponsible aoprop:homepage ?legalResponsibleHomepage .
?legalResponsible aoprop:institution ?legalResponsibleInstitution .
?legalResponsible aoprop:agentIdentifier ?legalResponsible .
%record aoprop:owner ?owner . %record aoprop:owner ?owner .
?owner aoprop:name ?ownerName . ?owner aoprop:name ?ownerName .
?owner aoprop:email ?ownerEmail . ?owner aoprop:email ?ownerEmail .
?owner aoprop:homepage ?ownerHomepage .
?owner aoprop:institution ?ownerInstitution .
?owner aoprop:agentIdentifier ?owner .
%record aoprop:publisher ?publisher . %record aoprop:publisher ?publisher .
?publisher aoprop:name ?publisherName . ?publisher aoprop:name ?publisherName .
?publisher aoprop:email ?publisherEmail . ?publisher aoprop:email ?publisherEmail .
?publisher aoprop:homepage ?publisherHomepage .
?publisher aoprop:institution ?publisherInstitution .
?publisher aoprop:agentIdentifier ?publisher .
%record aoprop:accessPolicy ?accessPolicy . %record aoprop:accessPolicy ?accessPolicy .
%record aoprop:accessRights ?accessRights . %record aoprop:accessRights ?accessRights .
%record aoprop:landingPage ?landingPage . %record aoprop:landingPage ?landingPage .
@ -142,18 +158,45 @@ where {
%record aocat:has_access_rights ?accessRights . %record aocat:has_access_rights ?accessRights .
%record aocat:has_ARIADNE_subject ?archeologicalResourceType . %record aocat:has_ARIADNE_subject ?archeologicalResourceType .
?archeologicalResourceType skos:prefLabel ?archeologicalResourceTypeName . ?archeologicalResourceType skos:prefLabel ?archeologicalResourceTypeName .
optional {
%record aocat:was_created_on ?created .
}
optional { optional {
?contributor aocat:has_email ?contributorEmail . ?contributor aocat:has_email ?contributorEmail .
} }
optional {
?contributor aocat:has_homepage ?contributorHomepage .
}
optional {
?contributor aocat:has_institution ?contributorInstitution .
}
optional { optional {
?legalResponsible aocat:has_email ?legalResponsibleEmail . ?legalResponsible aocat:has_email ?legalResponsibleEmail .
} }
optional {
?legalResponsible aocat:has_homepage ?legalResponsibleHomepage .
}
optional {
?legalResponsible aocat:has_institution ?legalResponsibleInstitution .
}
optional { optional {
?owner aocat:has_email ?ownerEmail . ?owner aocat:has_email ?ownerEmail .
} }
optional {
?owner aocat:has_homepage ?ownerHomepage .
}
optional {
?owner aocat:has_institution ?ownerInstitution .
}
optional { optional {
?publisher aocat:has_email ?publisherEmail . ?publisher aocat:has_email ?publisherEmail .
} }
optional {
?publisher aocat:has_homepage ?publisherHomepage .
}
optional {
?publisher aocat:has_institution ?publisherInstitution .
}
} }
} }
} }