-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backend sample that works with current models / migrations
- Loading branch information
Showing
1 changed file
with
200 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,206 @@ | ||
id,name,baseUrl,ntFilePath,ntFileLastChange,isDefault,isImporting,maxDefault,filteredLanguage,dynamicSuggestions,suggestSubjects,suggestObjects,subjectName,alternativeSubjectName,predicateName,alternativePredicateName,objectName,alternativeObjectName,replacePredicates,supportedKeywords,supportedFunctions,fillPrefixes,filterEntities | ||
9999,Wikidata Full @ Uni Freiburg,http://qlever.informatik.uni-freiburg.de/api/wikidata-full,,0,1,0,100,en,2,?qleverui_sitelink <http://schema.org/about> ?qleverui_entity,?qleverui_sitelink <http://schema.org/about> ?qleverui_entity,?qleverui_entity @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name .,?qleverui_entity @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname .,"{ ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . | ||
id,name,baseUrl,ntFilePath,ntFileLastChange,isDefault,isImporting,maxDefault,filteredLanguage,dynamicSuggestions,suggestSubjects,suggestPredicates,suggestObjects,subjectName,alternativeSubjectName,predicateName,alternativePredicateName,objectName,alternativeObjectName,replacePredicates,supportedKeywords,supportedFunctions,fillPrefixes,filterEntities | ||
9999,Wikidata Full @ Uni Freiburg,http://qlever.informatik.uni-freiburg.de/api/wikidata-full,,0,1,0,100,en,2,"SELECT ?qleverui_entity (SAMPLE(?qleverui_name) as ?qleverui_name) (SAMPLE(?qleverui_altname) as ?qleverui_altname) (SAMPLE(?qleverui_count) as ?qleverui_count) WHERE { | ||
# IF CURRENT_WORD # | ||
{ | ||
{ | ||
# ENDIF # | ||
{ | ||
SELECT ?qleverui_entity (COUNT(?qleverui_entity) AS ?qleverui_count) WHERE { | ||
?qleverui_sitelink <http://schema.org/about> ?qleverui_entity . | ||
} | ||
GROUP BY ?qleverui_entity | ||
# IF CURRENT_WORD # | ||
HAVING regex(?qleverui_entity, '^%<CURRENT_WORD%') | ||
# ENDIF # | ||
} | ||
OPTIONAL { | ||
?qleverui_entity @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name . | ||
} | ||
OPTIONAL { | ||
?qleverui_entity @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname . | ||
} | ||
} | ||
# IF CURRENT_WORD # | ||
UNION | ||
{ | ||
{ | ||
SELECT ?qleverui_entity (COUNT(?qleverui_entity) AS ?qleverui_count) WHERE { | ||
?qleverui_sitelink <http://schema.org/about> ?qleverui_entity . | ||
} | ||
GROUP BY ?qleverui_entity | ||
} | ||
?qleverui_entity @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name . | ||
FILTER regex(?qleverui_name, '^""%CURRENT_WORD%') | ||
} | ||
} | ||
UNION | ||
{ | ||
{ | ||
SELECT ?qleverui_entity (COUNT(?qleverui_entity) AS ?qleverui_count) WHERE { | ||
?qleverui_sitelink <http://schema.org/about> ?qleverui_entity . | ||
} | ||
GROUP BY ?qleverui_entity | ||
} | ||
?qleverui_entity @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname . | ||
FILTER regex(?qleverui_altname, '^""%CURRENT_WORD%') | ||
OPTIONAL { | ||
?qleverui_entity @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name . | ||
} | ||
} | ||
} | ||
# ENDIF # | ||
GROUP BY ?qleverui_entity | ||
ORDER BY DESC(?qleverui_count)","%PREFIXES% | ||
SELECT ?qleverui_entity (SAMPLE(?qleverui_name) as ?qleverui_name) (SAMPLE(?qleverui_altname) as ?qleverui_altname) (SAMPLE(?qleverui_count) as ?qleverui_count) WHERE { | ||
# IF CURRENT_WORD # | ||
{ | ||
{ | ||
# ENDIF # | ||
{ | ||
SELECT ?qleverui_entity (COUNT(?qleverui_entity) AS ?qleverui_count) WHERE { | ||
%CONNECTED_LINES% | ||
%CURRENT_SUBJECT% ql:has-predicate ?qleverui_entity . | ||
} | ||
GROUP BY ?qleverui_entity | ||
# IF CURRENT_WORD # | ||
HAVING regex(?qleverui_entity, '^%<CURRENT_WORD%') | ||
# ENDIF # | ||
} | ||
OPTIONAL { | ||
{ { { ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#claim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#statementProperty> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#qualifier> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } . | ||
} | ||
OPTIONAL { | ||
{ { { ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#claim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#statementProperty> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#qualifier> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } . | ||
} | ||
} | ||
# IF CURRENT_WORD # | ||
UNION | ||
{ | ||
{ | ||
SELECT ?qleverui_entity (COUNT(?qleverui_entity) AS ?qleverui_count) WHERE { | ||
%CONNECTED_LINES% | ||
%CURRENT_SUBJECT% ql:has-predicate ?qleverui_entity . | ||
} | ||
GROUP BY ?qleverui_entity | ||
} | ||
{ { { ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#claim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#statementProperty> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#qualifier> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } . | ||
FILTER regex(?qleverui_name, '^""%CURRENT_WORD%') | ||
} | ||
} | ||
UNION | ||
{ | ||
{ | ||
SELECT ?qleverui_entity (COUNT(?qleverui_entity) AS ?qleverui_count) WHERE { | ||
%CONNECTED_LINES% | ||
%CURRENT_SUBJECT% ql:has-predicate ?qleverui_entity . | ||
} | ||
GROUP BY ?qleverui_entity | ||
} | ||
{ { { ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#claim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#statementProperty> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#qualifier> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } . | ||
FILTER regex(?qleverui_altname, '^""%CURRENT_WORD%') | ||
OPTIONAL { | ||
{ { { ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#claim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#statementProperty> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#qualifier> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } . | ||
} | ||
} | ||
} | ||
# ENDIF # | ||
GROUP BY ?qleverui_entity | ||
ORDER BY DESC(?qleverui_count)","%PREFIXES% | ||
SELECT ?qleverui_entity (SAMPLE(?qleverui_name) as ?qleverui_name) (SAMPLE(?qleverui_altname) as ?qleverui_altname) (SAMPLE(?qleverui_count) as ?qleverui_count) WHERE { | ||
# IF CURRENT_WORD # | ||
{ | ||
{ | ||
# ENDIF # | ||
{ | ||
SELECT ?qleverui_entity (COUNT(?qleverui_entity) AS ?qleverui_count) WHERE { | ||
%CONNECTED_LINES% | ||
%CURRENT_SUBJECT% %CURRENT_PREDICATE% ?qleverui_entity . | ||
} | ||
GROUP BY ?qleverui_entity | ||
# IF CURRENT_WORD # | ||
HAVING regex(?qleverui_entity, '^%<CURRENT_WORD%') | ||
# ENDIF # | ||
} | ||
OPTIONAL { | ||
?qleverui_entity @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name . | ||
} | ||
OPTIONAL { | ||
?qleverui_entity @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname . | ||
} | ||
} | ||
# IF CURRENT_WORD # | ||
UNION | ||
{ | ||
{ | ||
SELECT ?qleverui_entity (COUNT(?qleverui_entity) AS ?qleverui_count) WHERE { | ||
%CONNECTED_LINES% | ||
%CURRENT_SUBJECT% %CURRENT_PREDICATE% ?qleverui_entity . | ||
} | ||
GROUP BY ?qleverui_entity | ||
} | ||
?qleverui_entity @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name . | ||
FILTER regex(?qleverui_name, '^""%CURRENT_WORD%') | ||
} | ||
} | ||
UNION | ||
{ | ||
{ | ||
SELECT ?qleverui_entity (COUNT(?qleverui_entity) AS ?qleverui_count) WHERE { | ||
%CONNECTED_LINES% | ||
%CURRENT_SUBJECT% %CURRENT_PREDICATE% ?qleverui_entity . | ||
} | ||
GROUP BY ?qleverui_entity | ||
} | ||
?qleverui_entity @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname . | ||
FILTER regex(?qleverui_altname, '^""%CURRENT_WORD%') | ||
OPTIONAL { | ||
?qleverui_entity @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name . | ||
} | ||
} | ||
} | ||
# ENDIF # | ||
GROUP BY ?qleverui_entity | ||
ORDER BY DESC(?qleverui_count)",?qleverui_entity @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name .,?qleverui_entity @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname .,"{ ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#claim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name } .","{ ?qleverui_claim <http://wikiba.se/ontology#directClaim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname } UNION | ||
{ ?qleverui_claim <http://wikiba.se/ontology#claim> ?qleverui_entity . | ||
?qleverui_claim @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname }",?qleverui_entity @en@<http://www.w3.org/2000/01/rdf-schema#label> ?qleverui_name .,?qleverui_entity @en@<http://www.w3.org/2004/02/skos/core#altLabel> ?qleverui_altname .,"<http://www.w3.org/2000/01/rdf-schema#label> @en@<http://www.w3.org/2000/01/rdf-schema#label> | ||
<http://schema.org/name> @en@<http://schema.org/name> | ||
<http://wikiba.se/ontology#label> @en@<http://wikiba.se/ontology#label>","prefix, select, distinct, where, order, limit, offset, optional, by, as, having, not, textlimit, contains-entity, contains-word, filter, group, union, optional, has-predicate","asc, desc, avg, values, score, text, count, sample, min, max, average, concat, group_concat, langMatches, lang, regex, sum",1,0 | ||
<http://schema.org/name> @en@<http://schema.org/name> | ||
<http://wikiba.se/ontology#label> @en@<http://wikiba.se/ontology#label>","prefix, select, distinct, where, order, limit, offset, optional, by, as, having, not, textlimit, contains-entity, contains-word, filter, group, union, optional, has-predicate","asc, desc, avg, values, score, text, count, sample, min, max, average, concat, group_concat, langMatches, lang, regex, sum",1,0 |