fixed concept label case problem and limited to 10 the about list elements retrieved

thanados
Enrico Ottonello 3 years ago
parent f4e15dbf89
commit 05b685e0aa

@ -6,6 +6,7 @@ PREFIX onto: <http://www.ontotext.com/>
PREFIX ariadneplus: <https://ariadne-infrastructure.eu/aocat/>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
CONSTRUCT {
%record aoprop:rdfType "Record" .
%record aoprop:identifier %record .
@ -101,20 +102,28 @@ where {
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
%record aocat:has_language / skos:prefLabel ?language .
%record aocat:has_original_id ?originalId .
%record aocat:is_part_of ?partOf .
%record aocat:has_creator ?creator .
?creator aocat:has_name ?creatorName .
%record aocat:has_title ?title .
%record aocat:has_title ?title .
%record aocat:has_type / skos:prefLabel ?resourceType .
%record aocat:has_type ?typeURI .
?typeURI skos:prefLabel ?typeLabel .
optional {
%record aocat:is_about ?aboutURI .
?aboutURI rdfs:label ?aboutLabel .
}
optional {
?creator aocat:has_email ?creatorEmail .
}
optional {
%record aocat:has_description ?description .
}
@ -130,35 +139,63 @@ where {
optional {
%record aocat:has_visual_component ?visualComponent .
}
}
optional {
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
select ?aboutURI ?aboutLabel
where {
%record aocat:is_about ?aboutURI .
?aboutURI rdfs:label ?aboutLabel .
}
limit 10
}
}
optional {
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
%record aocat:has_temporal_coverage ?temporalNative .
?temporalNative aocat:has_native_period ?nativeLabel .
?nativeLabel skos:prefLabel ?temporalNativePeriodName .
optional {
?temporalNative aocat:from ?temporalNativeFrom .
?temporalNative aocat:until ?temporalNativeUntil .
select distinct ?temporalNative ?nativeLabel ?temporalNativePeriodName ?temporalNativeFrom ?temporalNativeUntil
where {
%record aocat:has_temporal_coverage ?temporalNative .
?temporalNative aocat:has_native_period ?nativeLabel .
?nativeLabel skos:prefLabel ?origTemporalNativePeriodName .
optional {
?temporalNative aocat:from ?temporalNativeFrom .
?temporalNative aocat:until ?temporalNativeUntil .
}
BIND(lcase(?origTemporalNativePeriodName) as ?temporalNativePeriodName)
}
}
}
optional {
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
select distinct ?temporal ?temporalPeriodName ?temporalFrom ?temporalUntil
where {
%record aocat:has_temporal_coverage ?temporal .
}
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::periodoplus> {
?temporal aocat:has_period ?label .
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::periodo> {
?label skos:prefLabel ?temporalPeriodName .
}
optional {
?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil .
}
}
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::periodoplus> {
?temporal aocat:has_period ?label .
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::periodo> {
?label skos:prefLabel ?origTemporalPeriodName .
}
optional {
?temporal aocat:from ?temporalFrom .
?temporal aocat:until ?temporalUntil .
}
}
BIND(lcase(?origTemporalPeriodName) as ?temporalPeriodName)
}
}
}
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
@ -221,7 +258,8 @@ where {
}
}
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
{
select *
where {
@ -254,26 +292,29 @@ where {
}
}
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::%collectionId> {
{
select *
select distinct ?nativeSubject ?nativeSubjectPrefLabel
where {
%record aocat:has_native_subject ?nativeSubject .
?nativeSubject skos:prefLabel ?nativeSubjectPrefLabel .
?nativeSubject skos:prefLabel ?origNativeSubjectPrefLabel .
BIND(lcase(?origNativeSubjectPrefLabel) as ?nativeSubjectPrefLabel)
}
}
}
graph <https://ariadne-infrastructure.eu/ariadneplus::%datasource::aatplus> {
{
select *
select distinct ?derivedSubject ?derivedSubjectPrefLabel
where {
optional {
%record aocat:has_derived_subject ?derivedSubject .
graph <https://ariadne-infrastructure.eu/api_________::ariadne_plus::%datasource::aat> {
?derivedSubject skos:prefLabel ?derivedSubjectPrefLabel .
?derivedSubject skos:prefLabel ?origDerivedSubjectPrefLabel .
}
}
BIND(lcase(?origDerivedSubjectPrefLabel) as ?derivedSubjectPrefLabel)
}
}
}

@ -331,6 +331,16 @@ public class GraphDbReaderAndESIndexTest {
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
@Test
// @Ignore
public void uploadADSGreyLiteratureOver300TriplesTest() throws Exception {
boolean isRecord = true;
String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/35AEC455-6CB5-31BB-B73E-30959FF3C4FE";
String datasource = "ads";
String collectionId = "1093";
readAndIndexTest(isRecord, recordId, datasource, collectionId);
}
private void readAndIndexTest(boolean isRecord, String recordId, String datasource, String collectionId) throws Exception {
final ClassPathResource resource = new ClassPathResource("application.properties");
Properties appProps = new Properties();

Loading…
Cancel
Save