PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX luc: <http://www.ontotext.com/owlim/lucene#> PREFIX gvp: <http://vocab.getty.edu/ontology#> PREFIX aat: <http://vocab.getty.edu/aat/> PREFIX tgn: <http://vocab.getty.edu/tgn/> SELECT ?groupId ?groupLabel ?id ?prefLabel ?matchedLabel ?sameAs ?altLabel { { SELECT ?id ?matchedLabel { BIND(CONCAT(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"*") AS ?query) ?id luc:term ?query . # CONSTRAINTS FILTER (?groupId IN (<http://vocab.getty.edu/ontology#PersonConcept>, <http://vocab.getty.edu/ontology#GroupConcept>)) ?id rdfs:label ?matchedLabel . } LIMIT <LIMIT> } UNION { BIND(CONCAT("\"",REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"\"") AS ?query) ?id luc:term ?query . # CONSTRAINTS FILTER (?groupId IN (<http://vocab.getty.edu/ontology#PersonConcept>, <http://vocab.getty.edu/ontology#GroupConcept>)) ?id rdfs:label ?matchedLabel . FILTER (LCASE(?matchedLabel)=LCASE(<QUERY>)) } ?id skos:inScheme ulan: . FILTER (REGEX(LCASE(?matchedLabel),CONCAT("\\b",LCASE(<QUERY>)))) ?id a ?groupId . ?groupId rdfs:label ?groupLabel . { ?id gvp:prefLabelGVP [xl:literalForm ?prefLabel] . } UNION { ?id skos:exactMatch|skos:closeMatch ?sameAs . } }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?class ?classLabel ?classDescription ?classType ?superClass ?subClass { # STARTGRAPH { ?classType rdfs:subClassOf* rdfs:Class . ?class a ?classType . ?class sf:preferredLanguageLiteral (skos:prefLabel rdfs:label <PREFLANG> 'en' '' ?classLabel) . OPTIONAL { ?property sf:preferredLanguageLiteral (rdfs:comment dc:description <PREFLANG> 'en' '' ?classDescription) . } } UNION { ?class rdfs:subClassOf ?superClass . } UNION { ?subClass rdfs:subClassOf ?class . } # ENDGRAPH }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT (?groupId AS ?class) ?classLabel ?instances { { SELECT ?groupId (COUNT(*) AS ?instances) { ?id a ?groupId . # CONSTRAINTS FILTER (?groupId IN (<http://vocab.getty.edu/ontology#PersonConcept>, <http://vocab.getty.edu/ontology#GroupConcept>)) } GROUP BY ?groupId } ?groupId rdfs:label ?classLabel . }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX gvp: <http://vocab.getty.edu/ontology#> SELECT ?property ?propertyLabel ?object ?objectLabel { VALUES (?id ?oid) { <IDPAIRS> } ?oid ?property ?object . ?property rdfs:label ?propertyLabel . ?object gvp:prefLabelGVP [xl:literalForm ?objectLabel] . }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?property ?domain ?range ?propertyLabel ?propertyDescription ?propertyType ?inverseProperty { # STARTGRAPH { ?propertyType rdfs:subPropertyOf* rdf:Property . ?property a ?propertyType . ?property sf:preferredLanguageLiteral (skos:prefLabel rdfs:label <PREFLANG> 'en' '' ?propertyLabel) . OPTIONAL { ?property sf:preferredLanguageLiteral (rdfs:comment dc:description <PREFLANG> 'en' '' ?propertyDescription) . } } UNION { ?property owl:inverseOf ?inverseProperty . } UNION { ?property rdfs:domain ?domain . } UNION { ?property rdfs:range ?range . } # ENDGRAPH }
Getty Union List of Artist Names
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX text: <http://jena.apache.org/text#> PREFIX pf: <http://jena.hpl.hp.com/ARQ/property#> PREFIX sf: <http://ldf.fi/functions#> PREFIX simf: <http://ldf.fi/similarity-functions#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> PREFIX emlos: <http://emlo.bodleian.ox.ac.uk/schema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX ps: <http://ldf.fi/procope-schema#> SELECT ?groupId ?id ?prefLabel ?matchedLabel ?sameAs ?ifpWikipediaPage { { SELECT ?id (SAMPLE(?matchedLabels) AS ?matchedLabel) ?score { { SELECT ?id ?matchedLabels (SUM(?s)/COUNT(?s) AS ?sc) ?score { { SELECT ?id (MAX(?sc) AS ?maxsc) ?score { SELECT ?id (SUM(?s)/COUNT(?s) AS ?sc) ?score { { SELECT ?id (MAX(?sc) AS ?score) { BIND(REPLACE(REPLACE(REPLACE(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\/\\^\\\"\\~\\*\\?\\:\\\\])","\\\\$1"),"^ +| +$", ""),", *"," "),"\\. ","* ") AS ?escapedQuery) BIND(CONCAT("(",?escapedQuery,") OR (",REPLACE(?escapedQuery,"([^*]) +","$1~ "),"~)") AS ?queryTerm) (?id ?sc) text:query ?queryTerm . } GROUP BY ?id ORDER BY DESC(?score) LIMIT 30 } ?id skos:prefLabel|skos:altLabel ?matchedLabel . ?str pf:strSplit (<QUERY> " ") BIND(sf:levenshteinSubstring(?str,STR(?matchedLabel)) AS ?s) } GROUP BY ?id ?matchedLabel ?score } GROUP BY ?id ?score } ?id skos:prefLabel|skos:altLabel ?matchedLabels . ?str pf:strSplit (<QUERY> " ") BIND(sf:levenshteinSubstring(?str,STR(?matchedLabels)) AS ?s) } GROUP BY ?id ?matchedLabels ?maxsc ?score HAVING (?sc=?maxsc) } } GROUP BY ?id ?score ORDER BY DESC(?score) } ?id sf:preferredLanguageLiteral (skos:prefLabel '<PREFLANG>' '' ?prefLabel) . ?id a ?groupId . OPTIONAL { ?id owl:sameAs|ps:viafId ?sameAs . } OPTIONAL { ?id ps:wikipediaUrl ?ifpWikipediaPage . } }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?id ?types ?labels ?descriptions ?superClasses ?subClasses { GRAPH <http://ldf.fi/fibra/schemas/crm-viaf-ext/> { { VALUES ?metaClass { owl:Class rdfs:Class } ?types rdfs:subClassOf* ?metaClass . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id rdfs:subClassOf ?superClasses . } UNION { ?subClasses rdfs:subClassOf ?id . } } }
SELECT ?id ?instances { { SELECT ?id (COUNT(*) AS ?instances) { ?s a ?id . } GROUP BY ?id } FILTER (!STRSTARTS(STR(?id),"http://www.w3.org/")) }
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> SELECT ?id ?property ?propertyLabel ?object ?objectLabel { VALUES (?id ?oid) { <IDPAIRS> } ?oid ?property ?object . OPTIONAL { ?property sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?propertyLabelP) } BIND(COALESCE(?propertyLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?property),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")) AS ?propertyLabel) OPTIONAL { ?object sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?objectLabelP) . } BIND (IF(ISIRI(?object),COALESCE(?objectLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?object),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")),?object) AS ?objectLabel) }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?id ?domains ?ranges ?labels ?descriptions ?types ?inverseProperty ?superProperties ?subProperties { GRAPH <http://ldf.fi/fibra/schemas/crm-viaf-ext/> { { VALUES ?metaClass { rdf:Property owl:DatatypeProperty owl:ObjectProperty } ?types rdfs:subClassOf* ?metaClass . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id owl:inverseOf ?inverseProperty . } UNION { ?id rdfs:domain ?domains . } UNION { ?id rdfs:range ?ranges . } UNION { ?id rdfs:subPropertyOf ?superProperties . } UNION { ?subProperties rdfs:subPropertyOf ?id . } } }
SELECT ?classId ?propertyId (COUNT(*) AS ?values) (COUNT(DISTINCT ?s) AS ?subjects) (MIN(?value) AS ?min) (MAX(?value) AS ?max) { ?s a ?classId . # CONSTRAINTS ?s ?propertyId ?value . } GROUP BY ?classId ?propertyId
Virtual International Authority File
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX luc: <http://www.ontotext.com/owlim/lucene#> PREFIX gvp: <http://vocab.getty.edu/ontology#> PREFIX aat: <http://vocab.getty.edu/aat/> PREFIX tgn: <http://vocab.getty.edu/tgn/> SELECT ?groupId ?groupLabel ?id ?prefLabel ?matchedLabel ?sameAs ?altLabel { { SELECT ?id ?matchedLabel { BIND(CONCAT(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"*") AS ?query) ?id luc:term ?query . # CONSTRAINTS FILTER (?groupId IN (<http://vocab.getty.edu/ontology#AdminPlaceConcept>, <http://vocab.getty.edu/ontology#PhysAdminPlaceConcept>)) ?id rdfs:label ?matchedLabel . } LIMIT <LIMIT> } UNION { BIND(CONCAT("\"",REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"\"") AS ?query) ?id luc:term ?query . # CONSTRAINTS FILTER (?groupId IN (<http://vocab.getty.edu/ontology#AdminPlaceConcept>, <http://vocab.getty.edu/ontology#PhysAdminPlaceConcept>)) ?id rdfs:label ?matchedLabel . FILTER (LCASE(?matchedLabel)=LCASE(<QUERY>)) } ?id skos:inScheme tgn: . FILTER (REGEX(LCASE(?matchedLabel),CONCAT("\\b",LCASE(<QUERY>)))) ?id a ?groupId . ?groupId rdfs:label ?groupLabel . { ?id gvp:prefLabelGVP [xl:literalForm ?prefLabel] . } UNION { ?id skos:exactMatch|skos:closeMatch ?sameAs . } }
Getty Thesaurus of Geographic Names
PREFIX text: <http://jena.apache.org/text#> PREFIX go: <http://www.geonames.org/ontology#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> PREFIX gn: <http://www.geonames.org/ontology#> SELECT (crm:E53_Place AS ?groupId) ("Place"@en AS ?groupLabel) ?id ?prefLabel ?matchedLabel { { SELECT ?id (SUM(?sc) AS ?score) { { SELECT ?id ?sc { BIND(CONCAT("\"",REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"\"") AS ?query) (?id ?sc) text:query ?query . ?id go:name|go:alternateName ?matchedLabel FILTER (LCASE(?matchedLabel)=LCASE(<QUERY>)) } LIMIT <LIMIT> } UNION { SELECT ?id ?sc { BIND(CONCAT(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"*") AS ?query) (?id ?sc) text:query ?query . } LIMIT <LIMIT> } } GROUP BY ?id HAVING(BOUND(?id)) LIMIT <LIMIT> } ?id go:nanme|go:alternateName ?matchedLabel FILTER (REGEX(LCASE(?matchedLabel),CONCAT("\\b",LCASE(<QUERY>)))) ?id sf:preferredLanguageLiteral (go:name go:alternateName '' ?label) . OPTIONAL { ?id gn:parentADM3 ?pa3 . FILTER (?pa3!=?id) ?pa3 gn:name ?parent3 . FILTER (?parent3 != ?label) } OPTIONAL { ?id gn:parentADM2 ?pa2 . FILTER (?pa2!=?id) ?pa2 gn:name ?parent2 . FILTER (?parent2 != ?label) } OPTIONAL { ?id gn:parentADM1 ?pa1 . FILTER (?pa1!=?id) ?pa1 gn:name ?parent1 . FILTER (?parent1 != ?label) } OPTIONAL { ?id gn:parentCountry/gn:name ?parentCountry } BIND(CONCAT(?label, COALESCE(CONCAT(", ", ?parent3),""), COALESCE(CONCAT(", ", ?parent2),""), COALESCE(CONCAT(", ", ?parent1),""), ", ", ?parentCountry) AS ?prefLabel) OPTIONAL { ?id gn:population ?population } # ?id go:alternateName ?altLabel . } ORDER BY DESC(?population)
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> PREFIX gn: <http://www.geonames.org/ontology#> SELECT ?id ?types ?labels ?descriptions ?superClasses ?subClasses { GRAPH <http://ldf.fi/fibra/schemas/geonames/> { { VALUES ?metaClass { owl:Class rdfs:Class } ?types rdfs:subClassOf* ?metaClass . ?oid a ?types . FILTER (!ISBLANK(?oid)) BIND(IF(?oid=gn:Feature, crm:E53_Place, ?oid) AS ?id) } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id rdfs:subClassOf ?superClasses . FILTER (!ISBLANK(?superClasses)) } UNION { ?subClasses rdfs:subClassOf ?id . } } }
PREFIX go: <http://www.geonames.org/ontology#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> SELECT (crm:E53_Place as ?id) (COUNT(*) AS ?instances) { ?s go:name ?o . }
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX go: <http://www.geonames.org/ontology#> PREFIX sf: <http://ldf.fi/functions#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> SELECT ?id ?property ?propertyLabel ?object ?objectLabel { { VALUES (?id ?oid) { <IDPAIRS> } ?oid ?lproperty ?object . OPTIONAL { ?lproperty sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?propertyLabelP) } BIND(COALESCE(?propertyLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?property),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")) AS ?propertyLabel) BIND(IF(?lproperty=go:name,skos:prefLabel,IF(?lproperty=go:alternateName,skos:altLabel,?lproperty)) AS ?property) OPTIONAL { ?object sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?objectLabelP) . } BIND (IF(ISIRI(?object),COALESCE(?objectLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?object),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")),?object) AS ?objectLabel) } UNION { VALUES (?id ?oid) { <IDPAIRS> } FILTER EXISTS { ?oid ?p ?o } BIND(rdf:type AS ?property) BIND(crm:E53_Place as ?object) } }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> PREFIX gn: <http://www.geonames.org/ontology#> SELECT ?id ?domains ?ranges ?labels ?descriptions ?types ?inverseProperty ?superProperties ?subProperties { GRAPH <http://ldf.fi/fibra/schemas/geonames/> { { VALUES ?metaClass { rdf:Property owl:DatatypeProperty owl:ObjectProperty } ?types rdfs:subClassOf* ?metaClass . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id owl:inverseOf ?inverseProperty . } UNION { ?id rdfs:domain ?odomains . FILTER (!ISBLANK(?odomains)) BIND(IF(?odomains=gn:Feature, crm:E53_Place, ?odomains) AS ?domains) } UNION { ?id rdfs:range ?oranges . FILTER (!ISBLANK(?oranges)) BIND(IF(?oranges=gn:Feature, crm:E53_Place, ?oranges) AS ?ranges) } UNION { ?id rdfs:subPropertyOf ?superProperties . } UNION { ?subProperties rdfs:subPropertyOf ?id . } } }
PREFIX go: <http://www.geonames.org/ontology#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> SELECT (crm:E53_Place as ?classId) (IF(?lpropertyId=go:name,skos:prefLabel,IF(?lpropertyId=go:alternateName,skos:altLabel,?lpropertyId)) AS ?propertyId) (COUNT(*) AS ?values) (COUNT(DISTINCT ?s) AS ?subjects) (MIN(?value) AS ?min) (MAX(?value) AS ?max) { ?s ?lpropertyId ?value . } GROUP BY ?lpropertyId
GeoNames
PREFIX text: <http://jena.apache.org/text#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX fibra: <http://ldf.fi/fibra/schema#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?groupId ?id ?prefLabel ?matchedLabel ?sameAs ?altLabel ?ifpWikipediaPage ?ifpODBNId { # ADDITIONALVARIABLES # STARTGRAPH { SELECT ?groupId ?id (SUM(?sc) AS ?score) { { SELECT ?groupId ?id ?sc { BIND(CONCAT("\"",REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"\"") AS ?query) (?id ?sc) text:query ?query . ?id skos:prefLabel|skos:altLabel ?matchedLabel FILTER (LCASE(?matchedLabel)=LCASE(<QUERY>)) ?id a ?groupId . # CONSTRAINTS FILTER (?groupId IN (<http://www.cidoc-crm.org/cidoc-crm/E21_Person>, <http://www.cidoc-crm.org/cidoc-crm/E53_Place>, <http://www.cidoc-crm.org/cidoc-crm/E74_Group>)) } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } UNION { SELECT ?groupId ?id ?sc { BIND(CONCAT(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"*") AS ?query) (?id ?sc) text:query ?query . ?id a ?groupId . # CONSTRAINTS FILTER (?groupId IN (<http://www.cidoc-crm.org/cidoc-crm/E21_Person>, <http://www.cidoc-crm.org/cidoc-crm/E53_Place>, <http://www.cidoc-crm.org/cidoc-crm/E74_Group>)) } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } } GROUP BY ?groupId ?id HAVING(BOUND(?id)) LIMIT <LIMIT> } ?id skos:prefLabel|skos:altLabel ?matchedLabel FILTER (REGEX(LCASE(?matchedLabel),CONCAT("\\b",LCASE(<QUERY>)))) { ?id sf:preferredLanguageLiteral (skos:prefLabel skos:altLabel '<PREFLANG>' '' ?prefLabel) . } UNION { ?id owl:sameAs ?sameAs . } UNION { ?id skos:altLabel|mads:variantLabel ?altLabel . } UNION { ?id <http://emlo.bodleian.ox.ac.uk/schema#cofk_union_relationship_type-is_related_to> ?ref . FILTER(REGEX(STR(?ref),'http://..\\.wikipedia\\.org/wiki/')) BIND(?ref AS ?ifpWikipediaPage) } UNION { ?id <http://emlo.bodleian.ox.ac.uk/schema#cofk_union_relationship_type-is_related_to> ?ref . FILTER(STRSTARTS(STR(?ref),'http://www.oxforddnb.com/view/article/')) BIND(REPLACE(STR(?ref),'http://www.oxforddnb.com/view/article/([^?]*).*','$1') AS ?ifpODBNId) } # ENDGRAPH }
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sf: <http://ldf.fi/functions#> SELECT ?subClass ?superClass ?class ?classLabel ?instances { # STARTGRAPH { ?groupId rdfs:subClassOf ?class . FILTER EXISTS { ?id a ?groupId . # CONSTRAINTS FILTER (?groupId IN (<http://www.cidoc-crm.org/cidoc-crm/E21_Person>, <http://www.cidoc-crm.org/cidoc-crm/E53_Place>, <http://www.cidoc-crm.org/cidoc-crm/E74_Group>)) } BIND(?groupId AS ?subClass) } UNION { { SELECT ?groupId (COUNT(*) AS ?instances) { ?id a ?groupId . } GROUP BY ?groupId } # CONSTRAINTS FILTER (?groupId IN (<http://www.cidoc-crm.org/cidoc-crm/E21_Person>, <http://www.cidoc-crm.org/cidoc-crm/E53_Place>, <http://www.cidoc-crm.org/cidoc-crm/E74_Group>)) BIND (?groupId AS ?class) } OPTIONAL { ?class sf:preferredLanguageLiteral (skos:prefLabel rdfs:label skos:altLabel 'en' '' ?classLabelP) . } FILTER(ISIRI(?class)) BIND(COALESCE(?classLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?class),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")) AS ?classLabel) # ENDGRAPH }
SELECT ?id ?min ?max ?values { # STARTGRAPH { SELECT ?id (COUNT(*) AS ?values) (MIN(?value) AS ?min) (MAX(?value) AS ?max) { ?s ?id ?value . # CONSTRAINTS } GROUP BY ?id } # ENDGRAPH }
Early Modern Letters Online
PREFIX text: <http://jena.apache.org/text#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX fibra: <http://ldf.fi/fibra/schema#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?groupId ?id ?prefLabel ?matchedLabel ?sameAs ?altLabel ?ifpODBNId { # ADDITIONALVARIABLES # STARTGRAPH { SELECT ?groupId ?id (SUM(?sc) AS ?score) { { SELECT ?groupId ?id ?sc { BIND(CONCAT("\"",REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"\"") AS ?query) (?id ?sc) text:query ?query . ?id skos:prefLabel|skos:altLabel ?matchedLabel FILTER (LCASE(?matchedLabel)=LCASE(<QUERY>)) ?id a ?groupId . # CONSTRAINTS FILTER (?groupId IN (<http://www.cidoc-crm.org/cidoc-crm/E21_Person>, <http://www.cidoc-crm.org/cidoc-crm/E53_Place>, <http://www.cidoc-crm.org/cidoc-crm/E74_Group>)) } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } UNION { SELECT ?groupId ?id ?sc { BIND(CONCAT(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"*") AS ?query) (?id ?sc) text:query ?query . ?id a ?groupId . # CONSTRAINTS FILTER (?groupId IN (<http://www.cidoc-crm.org/cidoc-crm/E21_Person>, <http://www.cidoc-crm.org/cidoc-crm/E53_Place>, <http://www.cidoc-crm.org/cidoc-crm/E74_Group>)) } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } } GROUP BY ?groupId ?id HAVING(BOUND(?id)) LIMIT <LIMIT> } ?id skos:prefLabel|skos:altLabel ?matchedLabel FILTER (REGEX(LCASE(?matchedLabel),CONCAT("\\b",LCASE(<QUERY>)))) ?id sf:preferredLanguageLiteral (skos:prefLabel skos:altLabel '<PREFLANG>' '' ?prefLabel) { ?id owl:sameAs ?sameAs . } UNION { ?id skos:altLabel|mads:variantLabel ?altLabel . } UNION { ?id <http://ldf.fi/sdfb/schema#odbnId> ?ifpODBNId . } # ENDGRAPH }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?id ?types ?labels ?descriptions ?superClasses ?subClasses { { ?types rdfs:subClassOf* rdfs:Class . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id rdfs:subClassOf ?superClasses . } UNION { ?subClasses rdfs:subClassOf ?id . } }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?id ?domains ?ranges ?labels ?descriptions ?types ?inverseProperty ?superProperties ?subProperties { { VALUES ?metaClass { owl:DatatypeProperty owl:ObjectProperty } ?types rdfs:subClassOf* ?metaClass . ?id a ?types . BIND(crm:E21_Person AS ?domains) BIND(IF(?metaClass=owl:ObjectProperty,crm:E21_Person,xsd:Literal) AS ?ranges) } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id owl:inverseOf ?inverseProperty . } UNION { ?id rdfs:subPropertyOf ?superProperties . } UNION { ?subProperties rdfs:subPropertyOf ?id . } }
SELECT ?classId ?propertyId ?subjects ?values ?min ?max { # STARTGRAPH { SELECT ?classId ?propertyId (COUNT(*) AS ?values) (COUNT(DISTINCT ?s) AS ?subjects) (MIN(?value) AS ?min) (MAX(?value) AS ?max) { ?s ?propertyId ?value . # CONSTRAINTS OPTIONAL { ?s a ?classId . } } GROUP BY ?classId ?propertyId } # ENDGRAPH }
Six Degrees of Francis Bacon: Reassembling the Early Modern Social Network
PREFIX text: <http://jena.apache.org/text#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX fibra: <http://ldf.fi/fibra/schema#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?groupId ?id ?prefLabel ?matchedLabel ?sameAs ?altLabel { # ADDITIONALVARIABLES # STARTGRAPH { SELECT ?groupId ?id (SUM(?sc) AS ?score) { { SELECT ?groupId ?id ?sc { BIND(CONCAT("\"",REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"\"") AS ?query) (?id ?sc) text:query ?query . ?id skos:prefLabel|rdfs:label|skos:altLabel|mads:authoritativeLabel|mads:variantLabel ?matchedLabel FILTER (LCASE(?matchedLabel)=LCASE(<QUERY>)) ?id a ?groupIdLocal . BIND(?groupIdLocal AS ?groupId) # CONSTRAINTS FILTER (?groupId IN (<http://geovocab.org/spatial#Feature>)) } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } UNION { SELECT ?groupId ?id ?sc { BIND(CONCAT(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"*") AS ?query) (?id ?sc) text:query ?query . ?id a ?groupIdLocal . BIND(?groupIdLocal AS ?groupId) # CONSTRAINTS FILTER (?groupId IN (<http://geovocab.org/spatial#Feature>)) } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } } GROUP BY ?groupId ?id HAVING(BOUND(?id)) LIMIT <LIMIT> } ?id skos:prefLabel|rdfs:label|skos:altLabel|mads:authoritativeLabel|mads:variantLabel ?matchedLabel FILTER (REGEX(LCASE(?matchedLabel),CONCAT("\\b",LCASE(<QUERY>)))) { ?id sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?prefLabel) . } UNION { ?id owl:sameAs ?sameAs . } UNION { ?id skos:altLabel|mads:variantLabel ?altLabel . } # ADDITIONALSELECT # ENDGRAPH }
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sf: <http://ldf.fi/functions#> SELECT ?subClass ?superClass ?class ?classLabel ?instances { # STARTGRAPH { ?groupId rdfs:subClassOf ?class . FILTER EXISTS { ?id a ?groupId . # CONSTRAINTS FILTER (?groupId IN (<http://geovocab.org/spatial#Feature>)) } BIND(?groupId AS ?subClass) } UNION { { SELECT ?groupId (COUNT(*) AS ?instances) { ?id a ?groupId . } GROUP BY ?groupId } # CONSTRAINTS FILTER (?groupId IN (<http://geovocab.org/spatial#Feature>)) BIND (?groupId AS ?class) } OPTIONAL { ?class sf:preferredLanguageLiteral (skos:prefLabel rdfs:label skos:altLabel 'en' '' ?classLabelP) . } FILTER(ISIRI(?class)) BIND(COALESCE(?classLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?class),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")) AS ?classLabel) # ENDGRAPH }
The Pleiades Gazetteer
PREFIX text: <http://jena.apache.org/text#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX fibra: <http://ldf.fi/fibra/schema#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?groupId ?id ?prefLabel ?matchedLabel ?sameAs ?altLabel { # ADDITIONALVARIABLES # STARTGRAPH { SELECT ?groupId ?id (SUM(?sc) AS ?score) { { SELECT ?groupId ?id ?sc { BIND(CONCAT("\"",REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"\"") AS ?query) (?id ?sc) text:query ?query . ?id skos:prefLabel|rdfs:label|skos:altLabel|mads:authoritativeLabel|mads:variantLabel ?matchedLabel FILTER (LCASE(?matchedLabel)=LCASE(<QUERY>)) ?id a ?groupIdLocal . BIND(?groupIdLocal AS ?groupId) # CONSTRAINTS } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } UNION { SELECT ?groupId ?id ?sc { BIND(CONCAT(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"*") AS ?query) (?id ?sc) text:query ?query . ?id a ?groupIdLocal . BIND(?groupIdLocal AS ?groupId) # CONSTRAINTS } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } } GROUP BY ?groupId ?id HAVING(BOUND(?id)) LIMIT <LIMIT> } ?id skos:prefLabel|rdfs:label|skos:altLabel|mads:authoritativeLabel|mads:variantLabel ?matchedLabel FILTER (REGEX(LCASE(?matchedLabel),CONCAT("\\b",LCASE(<QUERY>)))) { ?id sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?prefLabel) . } UNION { ?id owl:sameAs ?sameAs . } UNION { ?id skos:altLabel|mads:variantLabel ?altLabel . } # ADDITIONALSELECT # ENDGRAPH }
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sf: <http://ldf.fi/functions#> SELECT ?subClass ?superClass ?class ?classLabel ?instances { # STARTGRAPH { ?groupId rdfs:subClassOf ?class . FILTER EXISTS { ?id a ?groupId . # CONSTRAINTS } BIND(?groupId AS ?subClass) } UNION { { SELECT ?groupId (COUNT(*) AS ?instances) { ?id a ?groupId . } GROUP BY ?groupId } # CONSTRAINTS BIND (?groupId AS ?class) } OPTIONAL { ?class sf:preferredLanguageLiteral (skos:prefLabel rdfs:label skos:altLabel 'en' '' ?classLabelP) . } FILTER(ISIRI(?class)) BIND(COALESCE(?classLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?class),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")) AS ?classLabel) # ENDGRAPH }
Latin DBpedia
The Getty Research Institute
PREFIX text: <http://jena.apache.org/text#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX fibra: <http://ldf.fi/fibra/schema#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> SELECT ?groupId ?id ?prefLabel ?matchedLabel ?sameAs ?altLabel { # ADDITIONALVARIABLES # STARTGRAPH { SELECT ?groupId ?id (SUM(?sc) AS ?score) { { SELECT ?groupId ?id ?sc { BIND(CONCAT("\"",REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"\"") AS ?query) (?id ?sc) text:query ?query . ?id mads:authoritativeLabel|mads:variantLabel ?matchedLabel FILTER (LCASE(?matchedLabel)=LCASE(<QUERY>)) ?id a ?groupIdL . # CONSTRAINTS FILTER (?groupIdL IN (<http://www.loc.gov/mads/rdf/v1#CorporateName>, <http://www.loc.gov/mads/rdf/v1#PersonalName>, <http://www.loc.gov/mads/rdf/v1#Geographic>)) BIND( IF(?groupIdL=<http://www.loc.gov/mads/rdf/v1#CorporateName>,crm:E74_Group, IF(?groupIdL=<http://www.loc.gov/mads/rdf/v1#PersonalName>,crm:E21_Person, crm:E53_Place)) AS ?groupId) } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } UNION { SELECT ?groupId ?id ?sc { BIND(CONCAT(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"*") AS ?query) (?id ?sc) text:query ?query . ?id a ?groupIdL . # CONSTRAINTS FILTER (?groupIdL IN (<http://www.loc.gov/mads/rdf/v1#CorporateName>, <http://www.loc.gov/mads/rdf/v1#PersonalName>, <http://www.loc.gov/mads/rdf/v1#Geographic>)) BIND( IF(?groupIdL=<http://www.loc.gov/mads/rdf/v1#CorporateName>,crm:E74_Group, IF(?groupIdL=<http://www.loc.gov/mads/rdf/v1#PersonalName>,crm:E21_Person, crm:E53_Place)) AS ?groupId) } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } } GROUP BY ?groupId ?id HAVING(BOUND(?id)) LIMIT <LIMIT> } ?id mads:authoritativeLabel|mads:variantLabel ?matchedLabel FILTER (REGEX(LCASE(?matchedLabel),CONCAT("\\b",LCASE(<QUERY>)))) { ?id sf:preferredLanguageLiteral (mads:authoritativeLabel mads:variantLabel '<PREFLANG>' '' ?prefLabel) . } UNION { ?id owl:sameAs ?sameAs . } UNION { ?id mads:variantLabel ?altLabel . } # ENDGRAPH }
Library of Congress Name Authority
DBpedia Association
The Pleiades Community
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?id ?types ?labels ?descriptions ?superClasses ?subClasses { GRAPH <http://ldf.fi/fibra/schemas/cidoc-crm/> { { ?types rdfs:subClassOf* rdfs:Class . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id rdfs:subClassOf ?superClasses . } UNION { ?subClasses rdfs:subClassOf ?id . } } }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?id ?domains ?ranges ?labels ?descriptions ?types ?inverseProperty ?superProperties ?subProperties { GRAPH <http://ldf.fi/fibra/schemas/cidoc-crm/> { { ?types rdfs:subClassOf* rdf:Property . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id owl:inverseOf ?inverseProperty . } UNION { ?id rdfs:domain ?domains . } UNION { ?id rdfs:range ?ranges . } UNION { ?id rdfs:subPropertyOf ?superProperties . } UNION { ?subProperties rdfs:subPropertyOf ?id . } } }
People, places and times connected through events
CIDOC CRM
PREFIX text: <http://jena.apache.org/text#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX fibra: <http://ldf.fi/fibra/schema#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?groupId ?id ?prefLabel ?matchedLabel ?sameAs ?altLabel { # ADDITIONALVARIABLES # STARTGRAPH { SELECT ?groupId ?id (SUM(?sc) AS ?score) { { SELECT ?groupId ?id ?sc { BIND(CONCAT("\"",REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"\"") AS ?query) (?id ?sc) text:query ?query . ?id skos:prefLabel|skos:altLabel ?matchedLabel FILTER (LCASE(?matchedLabel)=LCASE(<QUERY>)) ?id a ?groupId . # CONSTRAINTS FILTER (?groupId IN (<http://www.cidoc-crm.org/cidoc-crm/E21_Person>, <http://www.cidoc-crm.org/cidoc-crm/E53_Place>, <http://www.cidoc-crm.org/cidoc-crm/E74_Group>)) } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } UNION { SELECT ?groupId ?id ?sc { BIND(CONCAT(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"*") AS ?query) (?id ?sc) text:query ?query . ?id a ?groupId . # CONSTRAINTS FILTER (?groupId IN (<http://www.cidoc-crm.org/cidoc-crm/E21_Person>, <http://www.cidoc-crm.org/cidoc-crm/E53_Place>, <http://www.cidoc-crm.org/cidoc-crm/E74_Group>)) } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } } GROUP BY ?groupId ?id HAVING(BOUND(?id)) LIMIT <LIMIT> } ?id skos:prefLabel|skos:altLabel ?matchedLabel FILTER (REGEX(LCASE(?matchedLabel),CONCAT("\\b",LCASE(<QUERY>)))) { ?id sf:preferredLanguageLiteral (skos:prefLabel skos:altLabel '<PREFLANG>' '' ?prefLabel) . } UNION { ?id owl:sameAs ?sameAs . } UNION { ?id skos:altLabel|mads:variantLabel ?altLabel . } # ENDGRAPH }
The French Book Trade in Enlightenment Europe
The Schoenberg Database of Manuscripts
PREFIX text: <http://jena.apache.org/text#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX fibra: <http://ldf.fi/fibra/schema#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?groupId ?id ?prefLabel ?matchedLabel ?sameAs ?altLabel ?ifpWikipediaPage { # ADDITIONALVARIABLES # STARTGRAPH { SELECT ?groupId ?id (SUM(?sc) AS ?score) { { SELECT ?groupId ?id ?sc { BIND(CONCAT("\"",REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"\"") AS ?query) (?id ?sc) text:query ?query . ?id skos:prefLabel|skos:altLabel ?matchedLabel FILTER (LCASE(?matchedLabel)=LCASE(<QUERY>)) ?id a ?groupId . # CONSTRAINTS FILTER (?groupId IN (<http://www.cidoc-crm.org/cidoc-crm/E21_Person>, <http://www.cidoc-crm.org/cidoc-crm/E53_Place>, <http://www.cidoc-crm.org/cidoc-crm/E74_Group>)) } GROUP BY ?groupId ?id ?sc ORDER BY DESC(?sc) LIMIT <LIMIT> } UNION { SELECT ?groupId ?id ?sc { BIND(CONCAT(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"*") AS ?query) (?id ?sc) text:query ?query . ?id a ?groupId . # CONSTRAINTS FILTER (?groupId IN (<http://www.cidoc-crm.org/cidoc-crm/E21_Person>, <http://www.cidoc-crm.org/cidoc-crm/E53_Place>, <http://www.cidoc-crm.org/cidoc-crm/E74_Group>)) } GROUP BY ?groupId ?id ?sc ORDER BY DESC(?sc) LIMIT <LIMIT> } } GROUP BY ?groupId ?id HAVING(BOUND(?id)) LIMIT <LIMIT> } ?id skos:prefLabel|skos:altLabel ?matchedLabel FILTER (REGEX(LCASE(?matchedLabel),CONCAT("\\b",LCASE(<QUERY>)))) { ?id sf:preferredLanguageLiteral (skos:prefLabel skos:altLabel '<PREFLANG>' '' ?prefLabel) . } UNION { ?id owl:sameAs ?sameAs . } UNION { ?id skos:altLabel|mads:variantLabel ?altLabel . } UNION { ?id <http://ldf.fi/procope-schema#wikipediaUrl> ?ref . BIND(IRI(?ref) AS ?ifpWikipediaPage) } # ENDGRAPH }
CIDOC CRM Special Interest Group
PREFIX text: <http://jena.apache.org/text#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX fibra: <http://ldf.fi/fibra/schema#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?groupId ?id ?prefLabel ?matchedLabel ?sameAs ?altLabel { # ADDITIONALVARIABLES # STARTGRAPH { SELECT ?groupId ?id (SUM(?sc) AS ?score) { { SELECT ?groupId ?id ?sc { BIND(CONCAT("\"",REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"\"") AS ?query) (?id ?sc) text:query ?query . ?id skos:prefLabel|rdfs:label|skos:altLabel|mads:authoritativeLabel|mads:variantLabel ?matchedLabel FILTER (LCASE(?matchedLabel)=LCASE(<QUERY>)) ?id a ?groupIdLocal . BIND(?groupIdLocal AS ?groupId) # CONSTRAINTS } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } UNION { SELECT ?groupId ?id ?sc { BIND(CONCAT(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\/\\\\])","\\$1"),"*") AS ?query) (?id ?sc) text:query ?query . ?id a ?groupIdLocal . BIND(?groupIdLocal AS ?groupId) # CONSTRAINTS } GROUP BY ?groupId ?id ?sc LIMIT <LIMIT> } } GROUP BY ?groupId ?id HAVING(BOUND(?id)) LIMIT <LIMIT> } ?id sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?prefLabel) . { ?id skos:prefLabel|rdfs:label|skos:altLabel|mads:authoritativeLabel|mads:variantLabel ?matchedLabel FILTER (REGEX(LCASE(?matchedLabel),CONCAT("\\b",LCASE(<QUERY>)))) } UNION { ?id owl:sameAs ?sameAs . } UNION { ?id skos:altLabel|mads:variantLabel ?altLabel . } # ADDITIONALSELECT # ENDGRAPH }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?id ?type ?labels ?descriptions ?superClasses ?subClasses { # STARTGRAPH { ?type rdfs:subClassOf* rdfs:Class . ?id a ?type . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id rdfs:subClassOf ?superClasses . } UNION { ?subClasses rdfs:subClassOf ?id . } # ENDGRAPH }
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sf: <http://ldf.fi/functions#> PREFIX owl: <http://www.w3.org/2002/07/owl#> SELECT ?subClass ?superClass ?class ?classLabel ?instances { # STARTGRAPH { ?class a/rdfs:subClassOf* rdfs:Class . } UNION { ?groupId rdfs:subClassOf ?class . BIND(?groupId AS ?subClass) } UNION { { SELECT ?groupId (COUNT(*) AS ?instances) { ?id a ?groupId . } GROUP BY ?groupId } # CONSTRAINTS BIND (?groupId AS ?class) } OPTIONAL { ?class sf:preferredLanguageLiteral (skos:prefLabel rdfs:label skos:altLabel 'en' '' ?classLabelP) . } FILTER(ISIRI(?class)) BIND(COALESCE(?classLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?class),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")) AS ?classLabel) # ENDGRAPH }
PREFIX owl: <http://www.w3.org/2002/07/owl#> SELECT ?id ?id2 { # STARTGRAPH VALUES (?id ?oid) { <IDPAIRS> } ?oid owl:sameAs ?id2 # ENDGRAPH }
DELETE { # STARTGRAPH <ID> ?p ?o . ?s ?p <ID> . # ENDGRAPH } WHERE { # STARTGRAPH { <ID> ?p ?o } UNION { ?s ?p <ID> } # ENDGRAPH }
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> SELECT ?id ?itemLabel ?property ?propertyLabel ?object ?objectLabel { # STARTGRAPH VALUES (?id ?oid) { <IDPAIRS> } ?oid ?property ?object . OPTIONAL { ?oid sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?itemLabel) . } OPTIONAL { ?property sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?propertyLabelP) } BIND(COALESCE(?propertyLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?property),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")) AS ?propertyLabel) OPTIONAL { ?object sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?objectLabelP) . } BIND (IF(ISIRI(?object),COALESCE(?objectLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?object),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")),?object) AS ?objectLabel) # ENDGRAPH }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?id ?domains ?ranges ?labels ?descriptions ?types ?inverseProperty ?superProperties ?subProperties { # STARTGRAPH { ?types rdfs:subClassOf* rdf:Property . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id owl:inverseOf ?inverseProperty . } UNION { ?id rdfs:domain ?domains . } UNION { ?id rdfs:range ?ranges . } UNION { ?id rdfs:subPropertyOf ?superProperties . } UNION { ?subProperties rdfs:subPropertyOf ?id . } # ENDGRAPH }
LDF.fi default template
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX text: <http://jena.apache.org/text#> PREFIX pf: <http://jena.hpl.hp.com/ARQ/property#> PREFIX sf: <http://ldf.fi/functions#> PREFIX simf: <http://ldf.fi/similarity-functions#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> PREFIX emlos: <http://emlo.bodleian.ox.ac.uk/schema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX ps: <http://ldf.fi/procope-schema#> SELECT ?groupId ?id ?prefLabel ?matchedLabel ?sameAs ?ifpWikipediaPage { { SELECT ?id (SAMPLE(?matchedLabels) AS ?matchedLabel) ?score { { SELECT ?id ?matchedLabels (SUM(?s)/COUNT(?s) AS ?sc) ?score { { SELECT ?id (MAX(?sc) AS ?maxsc) ?score { SELECT ?id (SUM(?s)/COUNT(?s) AS ?sc) ?score { { SELECT ?id (MAX(?sc) AS ?score) { BIND(REPLACE(REPLACE(REPLACE(REPLACE(<QUERY>,"([\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\/\\^\\\"\\~\\*\\?\\:\\\\])","\\\\$1"),"^ +| +$", ""),", *"," "),"\\. ","* ") AS ?escapedQuery) BIND(CONCAT("(",?escapedQuery,") OR (",REPLACE(?escapedQuery,"([^*]) +","$1~ "),"~)") AS ?queryTerm) GRAPH <http://ldf.fi/procope/ee/> { (?id ?sc) text:query ?queryTerm . } } GROUP BY ?id ORDER BY DESC(?score) LIMIT 30 } ?id skos:prefLabel|skos:altLabel ?matchedLabel . ?str pf:strSplit (<QUERY> " ") BIND(sf:levenshteinSubstring(?str,STR(?matchedLabel)) AS ?s) } GROUP BY ?id ?matchedLabel ?score } GROUP BY ?id ?score } ?id skos:prefLabel|skos:altLabel ?matchedLabels . ?str pf:strSplit (<QUERY> " ") BIND(sf:levenshteinSubstring(?str,STR(?matchedLabels)) AS ?s) } GROUP BY ?id ?matchedLabels ?maxsc ?score HAVING (?sc=?maxsc) } } GROUP BY ?id ?score ORDER BY DESC(?score) } ?id sf:preferredLanguageLiteral (skos:prefLabel '<PREFLANG>' '' ?prefLabel) . ?id a ?groupId . OPTIONAL { ?id owl:sameAs ?sameAs . } OPTIONAL { ?id ps:wikipediaUrl ?ifpWikipediaPage . } }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?id ?types ?labels ?descriptions ?superClasses ?subClasses { { ?types rdfs:subClassOf* owl:Class . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id rdfs:subClassOf ?superClasses . } UNION { ?subClasses rdfs:subClassOf ?id . } }
SELECT ?id ?instances { GRAPH <http://ldf.fi/procope/ee/> { { SELECT ?id (COUNT(*) AS ?instances) { ?s a ?id . } GROUP BY ?id } FILTER (!STRSTARTS(STR(?id),"http://www.w3.org/")) } }
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX mads: <http://www.loc.gov/mads/rdf/v1#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> SELECT ?id ?property ?propertyLabel ?object ?objectLabel { VALUES (?id ?oid) { <IDPAIRS> } { { ?oid ?property ?object } UNION { ?object ?property ?oid } OPTIONAL { ?property sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?propertyLabelP) } BIND(COALESCE(?propertyLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?property),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")) AS ?propertyLabel) } UNION { { ?oid ^<http://ldf.fi/ee-schema#author>/<http://ldf.fi/ee-schema#recipient> ?object } UNION { ?object ^<http://ldf.fi/ee-schema#author>/<http://ldf.fi/ee-schema#recipient> ?oid } UNION { ?oid ^<http://ldf.fi/ee-schema#recipient>/<http://ldf.fi/ee-schema#author> ?object } UNION { ?object ^<http://ldf.fi/ee-schema#recipient>/<http://ldf.fi/ee-schema#author> ?oid } BIND(<http://ldf.fi/ee-schema#correspondedWith> AS ?property) BIND("corresponded with"@en AS ?propertyLabel) } OPTIONAL { ?object sf:preferredLanguageLiteral (skos:prefLabel mads:authoritativeLabel rdfs:label skos:altLabel mads:variantLabel '<PREFLANG>' '' ?objectLabelP) . } BIND (IF(ISIRI(?object),COALESCE(?objectLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?object),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")),?object) AS ?objectLabel) }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?id ?domains ?ranges ?labels ?descriptions ?types ?inverseProperty ?superProperties ?subProperties { { VALUES ?metaClass { owl:DatatypeProperty owl:ObjectProperty } ?types rdfs:subClassOf* ?metaClass . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id owl:inverseOf ?inverseProperty . } UNION { ?id rdfs:domain ?domains . } UNION { ?id rdfs:range ?ranges . } UNION { ?id rdfs:subPropertyOf ?superProperties . } UNION { ?subProperties rdfs:subPropertyOf ?id . } }
SELECT ?classId ?propertyId ?subjects ?values ?min ?max { GRAPH <http://ldf.fi/procope/ee/> { { SELECT ?classId ?propertyId (COUNT(*) AS ?values) (COUNT(DISTINCT ?s) AS ?subjects) (MIN(?value) AS ?min) (MAX(?value) AS ?max) { ?s ?propertyId ?value . # CONSTRAINTS OPTIONAL { ?s a ?classId . } } GROUP BY ?classId ?propertyId } } }
Electronic Enlightenment
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX schema: <http://schema.org/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> SELECT (?pref AS ?id) ?prefLabel (<QUERY> as ?matchedLabel) ?groupId ?groupLabel ?sameAs ?ifpODBNId ?ifpWikipediaPage { ?pref rdfs:label <QUERY>@en . ?pref wdt:P31 ?group . BIND(IF(?group=wd:Q5,crm:E21_Person,IF(?group=wd:Q2221906,crm:E53_Place,IF(?group=wd:Q16334295,crm:E74_Group,?group))) AS ?groupId) { ?pref wdt:P214 ?viafId . BIND(IRI(CONCAT("http://viaf.org/viaf/",?viafId)) AS ?sameAs) } UNION { ?pref wdt:P1415 ?ifpODBNId . } UNION { ?ifpWikipediaPage schema:about ?pref . } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?id ?types ?labels ?descriptions ?superClasses ?subClasses { GRAPH <http://ldf.fi/fibra/schemas/crm-wikidata-ext/> { { ?types rdfs:subClassOf* rdfs:Class . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id rdfs:subClassOf ?superClasses . } UNION { ?subClasses rdfs:subClassOf ?id . } } }
PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?id ?instances { { { SELECT (COUNT(*) AS ?instances) { ?s wdt:P31/wdt:P279* wd:Q5 } } BIND(crm:E21_Person AS ?id) } UNION { { SELECT (COUNT(*) AS ?instances) { ?s wdt:P31/wdt:P279* wd:Q2221906 } } BIND(crm:E53_Place AS ?id) } UNION { { SELECT (COUNT(*) AS ?instances) { ?s wdt:P31/wdt:P279* wd:Q16334295 } } BIND(crm:E74_Group AS ?id) } }
PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> SELECT ?id ?property ?object ?propertyLabel ?objectLabel { { VALUES (?id ?oid) { <IDPAIRS> } ?oid ?lproperty ?lobject } UNION { SELECT ?id ?lobject ?lproperty { VALUES (?id ?oid) { <IDPAIRS> } ?lobject ?lproperty ?oid } LIMIT 5000 } BIND(IF(?lproperty=rdfs:label,skos:prefLabel,?lproperty) AS ?property) BIND(IF(?lobject=wd:Q5,crm:E21_Person,IF(?lobject=wd:Q2221906,crm:E53_Place,IF(?lobject=wd:Q16334295,crm:E74_Group,?lobject))) AS ?object) OPTIONAL { ?propertyAsEntity wikibase:directClaim ?lproperty . ?propertyAsEntity rdfs:label ?propertyLabelP . FILTER (LANGMATCHES(LANG(?propertyLabelP),'en')) } BIND(COALESCE(?propertyLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?property),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")) AS ?propertyLabel) OPTIONAL { ?lobject rdfs:label ?objectLabel . FILTER (LANGMATCHES(LANG(?objectLabel),'en')) } }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?id ?domains ?ranges ?labels ?descriptions ?types ?inverseProperty ?superProperties ?subProperties { GRAPH <http://ldf.fi/fibra/schemas/crm-wikidata-ext/> { { VALUES ?metaClass { rdf:Property owl:DatatypeProperty owl:ObjectProperty } ?types rdfs:subClassOf* ?metaClass . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id owl:inverseOf ?inverseProperty . } UNION { ?id rdfs:domain ?domains . } UNION { ?id rdfs:range ?ranges . } UNION { ?id rdfs:subPropertyOf ?superProperties . } UNION { ?subProperties rdfs:subPropertyOf ?id . } } }
SELECT ?classId ?propertyId ?subjects ?values ?min ?max { } LIMIT 0
Wikidata
PREFIX bif: <bif:> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> SELECT ?groupId ?id ?prefLabel (?prefLabel AS ?matchedLabel) ?sameAs { { SELECT ?groupId ?id ?prefLabel { ?id2 skos:prefLabel ?prefLabel . ?prefLabel bif:contains <QUERY> . ?id2 foaf:focus ?id . { ?id a foaf:Person BIND(crm:E21_Person AS ?groupId) } UNION { ?id a foaf:Organization BIND(crm:E74_Group AS ?groupId) } } LIMIT <LIMIT> } OPTIONAL { ?id owl:sameAs ?sameAs } }
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?id ?types ?labels ?descriptions ?superClasses ?subClasses { GRAPH <http://ldf.fi/fibra/schemas/crm-bnf-ext/> { { ?types rdfs:subClassOf* rdfs:Class . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id rdfs:subClassOf ?superClasses . } UNION { ?subClasses rdfs:subClassOf ?id . } } }
PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> SELECT ?id ?instances { # STARTGRAPH { SELECT ?lid (COUNT(*) AS ?instances) { ?s a ?lid . # CONSTRAINTS } GROUP BY ?lid } # ENDGRAPH BIND(IF(?lid=foaf:Person,crm:E21_Person,IF(?lid=foaf:Organization,crm:E74_Group,?lid)) AS ?id) }
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?id ?property ?propertyLabel ?object (COALESCE(?objectLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?object),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")) AS ?objectLabel) { VALUES (?id ?oid) { <IDPAIRS> } { ?oid ?property ?object } UNION { ?object ?property ?oid } OPTIONAL { ?property rdfs:label|skos:prefLabel|foaf:name|dcterms:title ?propertyLabelP . } BIND(COALESCE(?propertyLabelP,REPLACE(REPLACE(REPLACE(REPLACE(STR(?property),".*/",""),".*#",""),"_"," "),"([A-ZÅÄÖ])"," $1")) AS ?propertyLabel) OPTIONAL { ?object skos:prefLabel|foaf:name|dcterms:title ?objectLabelP . } } LIMIT 5000
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sf: <http://ldf.fi/functions#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?id ?domains ?ranges ?labels ?descriptions ?types ?inverseProperty ?superProperties ?subProperties { GRAPH <http://ldf.fi/fibra/schemas/crm-bnf-ext/> { { VALUES ?metaClass { rdf:Property owl:DatatypeProperty owl:ObjectProperty } ?types rdfs:subClassOf* ?metaClass . ?id a ?types . } { ?id skos:prefLabel|rdfs:label ?labels . } UNION { ?id rdfs:comment|dcterms:description ?descriptions . } UNION { ?id owl:inverseOf ?inverseProperty . } UNION { ?id rdfs:domain ?domains . } UNION { ?id rdfs:range ?ranges . } UNION { ?id rdfs:subPropertyOf ?superProperties . } UNION { ?subProperties rdfs:subPropertyOf ?id . } } }
BNF