KHW:SPARQL examples
Wygląd
Przykłady
Wszystkie osoby w wiki
SELECT DISTINCT ?item ?item_label WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
?item wdt:P1 wd:Q2.
OPTIONAL {
{
?item rdfs:label ?item_label.
FILTER((BOUND(?item)) && ((((LANG(?item_label)) = "pl") || (((LANG(?item_label)) = "mul") && (NOT EXISTS {
?item rdfs:label ?item_label_preferred_1.
FILTER((LANG(?item_label_preferred_1)) = "pl")
}))) || ((((LANG(?item_label)) = "en") && (NOT EXISTS {
?item rdfs:label ?item_label_preferred_1.
FILTER((LANG(?item_label_preferred_1)) = "pl")
})) && (NOT EXISTS {
?item rdfs:label ?item_label_preferred_2.
FILTER((LANG(?item_label_preferred_2)) = "mul")
}))))
}
}
}
LIMIT 100Wszyscy politycy
SELECT DISTINCT ?item ?item_label WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
?item wdt:P1 wd:Q2.
FILTER(EXISTS { ?item wdt:P20 wd:Q35911. })
OPTIONAL {
{
?item rdfs:label ?item_label.
FILTER((BOUND(?item)) && ((((LANG(?item_label)) = "pl") || (((LANG(?item_label)) = "mul") && (NOT EXISTS {
?item rdfs:label ?item_label_preferred_1.
FILTER((LANG(?item_label_preferred_1)) = "pl")
}))) || ((((LANG(?item_label)) = "en") && (NOT EXISTS {
?item rdfs:label ?item_label_preferred_1.
FILTER((LANG(?item_label_preferred_1)) = "pl")
})) && (NOT EXISTS {
?item rdfs:label ?item_label_preferred_2.
FILTER((LANG(?item_label_preferred_2)) = "mul")
}))))
}
}
}
LIMIT 100Ciała zbiorowe które były aktywne w XIX wieku
SELECT DISTINCT ?item ?item_label ?Początek_działalności_rok ?Koniec_działalności_rok WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
?item wdt:P1 wd:Q13168.
FILTER(EXISTS {
?item wdt:P22 ?Początek_działalności_rok_date.
FILTER(?Początek_działalności_rok_date >= "1801-01-01T00:00:00Z"^^xsd:dateTime)
})
FILTER(EXISTS {
?item wdt:P23 ?Koniec_działalności_rok_date.
FILTER(?Koniec_działalności_rok_date < "1901-01-01T00:00:00Z"^^xsd:dateTime)
})
OPTIONAL {
{
?item rdfs:label ?item_label.
FILTER((BOUND(?item)) && ((((LANG(?item_label)) = "pl") || (((LANG(?item_label)) = "mul") && (NOT EXISTS {
?item rdfs:label ?item_label_preferred_1.
FILTER((LANG(?item_label_preferred_1)) = "pl")
}))) || ((((LANG(?item_label)) = "en") && (NOT EXISTS {
?item rdfs:label ?item_label_preferred_1.
FILTER((LANG(?item_label_preferred_1)) = "pl")
})) && (NOT EXISTS {
?item rdfs:label ?item_label_preferred_2.
FILTER((LANG(?item_label_preferred_2)) = "mul")
}))))
}
}
OPTIONAL { ?item wdt:P22 ?Początek_działalności_rok. }
OPTIONAL { ?item wdt:P23 ?Koniec_działalności_rok. }
}
LIMIT 100Obiekty dLibry w których autorem jest kobieta
SELECT DISTINCT ?dlibra_link ?title ?creator ?creator_wiki_label WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
{
?item dc:identifier ?dlibra_link.
FILTER(STRSTARTS(STR(?dlibra_link), "https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"))
}
FILTER(EXISTS {
?item dp:creator ?creator_wiki_2.
?creator_wiki_2 wdt:P15 wd:Q6.
})
OPTIONAL { ?item dp:title ?title. }
OPTIONAL {
?item dp:creator ?creator.
OPTIONAL {
{
?creator rdfs:label ?creator_wiki_label.
FILTER((BOUND(?creator)) && ((((LANG(?creator_wiki_label)) = "pl") || (((LANG(?creator_wiki_label)) = "mul") && (NOT EXISTS {
?creator rdfs:label ?creator_wiki_label_preferred_1.
FILTER((LANG(?creator_wiki_label_preferred_1)) = "pl")
}))) || ((((LANG(?creator_wiki_label)) = "en") && (NOT EXISTS {
?creator rdfs:label ?creator_wiki_label_preferred_1.
FILTER((LANG(?creator_wiki_label_preferred_1)) = "pl")
})) && (NOT EXISTS {
?creator rdfs:label ?creator_wiki_label_preferred_2.
FILTER((LANG(?creator_wiki_label_preferred_2)) = "mul")
}))))
}
}
}
}
LIMIT 100Karty ze sztambucha autorstwa mężczyzn
SELECT DISTINCT ?dlibra_link ?title ?creator ?creator_wiki_label WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
{
?item dc:identifier ?dlibra_link.
FILTER(STRSTARTS(STR(?dlibra_link), "https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"))
}
FILTER(EXISTS {
?item dp:creator ?creator_wiki.
?creator_wiki wdt:P15 wd:Q5.
})
FILTER(EXISTS {
?item dp:documenttype ?documenttype_text.
FILTER((ISLITERAL(?documenttype_text)) && ((LCASE(STR(?documenttype_text))) = (LCASE("karta ze sztambucha"))))
})
OPTIONAL { ?item dp:title ?title. }
OPTIONAL {
?item dp:creator ?creator.
OPTIONAL {
{
?creator rdfs:label ?creator_wiki_label.
FILTER((BOUND(?creator)) && ((((LANG(?creator_wiki_label)) = "pl") || (((LANG(?creator_wiki_label)) = "mul") && (NOT EXISTS {
?creator rdfs:label ?creator_wiki_label_preferred_1.
FILTER((LANG(?creator_wiki_label_preferred_1)) = "pl")
}))) || ((((LANG(?creator_wiki_label)) = "en") && (NOT EXISTS {
?creator rdfs:label ?creator_wiki_label_preferred_1.
FILTER((LANG(?creator_wiki_label_preferred_1)) = "pl")
})) && (NOT EXISTS {
?creator rdfs:label ?creator_wiki_label_preferred_2.
FILTER((LANG(?creator_wiki_label_preferred_2)) = "mul")
}))))
}
}
}
}
LIMIT 100Publikacje z miejscem powiązanym z Arcarium Index
SELECT DISTINCT ?dlibra_link ?title ?location ?location_wiki_label WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
{
?item dc:identifier ?dlibra_link.
FILTER(STRSTARTS(STR(?dlibra_link), "https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"))
}
FILTER(EXISTS {
?item dp:location ?location_wiki.
FILTER((ISIRI(?location_wiki)) && (STRSTARTS(STR(?location_wiki), "https://arcarium.index.bj.uj.edu.pl/entity/")))
})
OPTIONAL { ?item dp:title ?title. }
OPTIONAL {
?item dp:location ?location.
OPTIONAL {
{
?location rdfs:label ?location_wiki_label.
FILTER((BOUND(?location)) && ((((LANG(?location_wiki_label)) = "pl") || (((LANG(?location_wiki_label)) = "mul") && (NOT EXISTS {
?location rdfs:label ?location_wiki_label_preferred_1.
FILTER((LANG(?location_wiki_label_preferred_1)) = "pl")
}))) || ((((LANG(?location_wiki_label)) = "en") && (NOT EXISTS {
?location rdfs:label ?location_wiki_label_preferred_1.
FILTER((LANG(?location_wiki_label_preferred_1)) = "pl")
})) && (NOT EXISTS {
?location rdfs:label ?location_wiki_label_preferred_2.
FILTER((LANG(?location_wiki_label_preferred_2)) = "mul")
}))))
}
}
}
}
LIMIT 100Dokumenty autorstwa polityków napisane w Berlinie w XIX wieku
SELECT DISTINCT ?dlibra_link ?title ?creator ?date WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
{
?item dc:identifier ?dlibra_link.
FILTER(STRSTARTS(STR(?dlibra_link), "https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"))
}
FILTER(EXISTS { ?item dp:location wd:Q29180. })
OPTIONAL { ?item dp:title ?title. }
OPTIONAL { ?item dp:creator ?creator. }
OPTIONAL { ?item dp:date ?date. }
FILTER(EXISTS {
?item dp:date ?date_text.
FILTER(REGEX(STR(?date_text), "(^|[^A-Za-z0-9])XIX([^A-Za-z0-9]|$)|(^|[^0-9])(18(0[1-9]|[1-9][0-9])|1900)([^0-9]|$)"))
})
FILTER(EXISTS {
?item dp:creator ?creator_wiki.
?creator_wiki wdt:P20 wd:Q35911.
})
}
LIMIT 100Dokumenty ikonograficzne wszystkich poetek
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX wd: <https://arcarium.index.bj.uj.edu.pl/entity/>
PREFIX wdt: <https://arcarium.index.bj.uj.edu.pl/prop/direct/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT
?dlibraLink
?title
?authorLabel
?authorLink
WHERE {
# Iconographic document
?dlibraObject dp:documenttype "dokument ikonograficzny" .
# Creator is a person
?dlibraObject dp:creator ?author .
?author wdt:P1 wd:Q2 .
# Creator is a poetess
?author wdt:P20 wd:Q37031 .
# Author label
OPTIONAL {
?author rdfs:label ?authorLabel .
FILTER(LANG(?authorLabel) = "mul")
}
# Normal Wikibase page URL for author
BIND(
IRI(
REPLACE(
STR(?author),
"https://arcarium.index.bj.uj.edu.pl/entity/",
"https://arcarium.index.bj.uj.edu.pl/wiki/Item:"
)
)
AS ?authorLink
)
# Object title
OPTIONAL {
?dlibraObject dp:title ?title .
}
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(STR(?author), STR(wd:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?authorLabel ?titleDokumenty wszystkich kobiet pisane z Berlina w XVIII wieku
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX wd: <https://arcarium.index.bj.uj.edu.pl/entity/>
PREFIX wdt: <https://arcarium.index.bj.uj.edu.pl/prop/direct/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT
?dlibraLink
?title
?authorLabel
?authorLink
?date
WHERE {
# Berlin
?dlibraObject dp:location wd:Q29180 .
# Creator is a person
?dlibraObject dp:creator ?author .
?author wdt:P1 wd:Q2 .
# Creator is a woman
?author wdt:P15 wd:Q6 .
# Author label
OPTIONAL {
?author rdfs:label ?authorLabel .
FILTER(LANG(?authorLabel) = "mul")
}
# Normal Wikibase page URL for author
BIND(
IRI(
REPLACE(
STR(?author),
"https://arcarium.index.bj.uj.edu.pl/entity/",
"https://arcarium.index.bj.uj.edu.pl/wiki/Item:"
)
)
AS ?authorLink
)
# Object title
OPTIONAL {
?dlibraObject dp:title ?title .
}
# XVIII century
?dlibraObject dp:date ?date .
FILTER(
REGEX(STR(?date), "(17(0[1-9]|[1-9][0-9])|1800)")
)
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(STR(?author), STR(wd:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?date ?authorLabel ?titleUtwory wszystkich kobiet
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX wd: <https://arcarium.index.bj.uj.edu.pl/entity/>
PREFIX wdt: <https://arcarium.index.bj.uj.edu.pl/prop/direct/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT
?dlibraLink
?title
?authorLabel
?authorLink
WHERE {
# Work
?dlibraObject dp:documenttype "utwór" .
# Creator is a person
?dlibraObject dp:creator ?author .
?author wdt:P1 wd:Q2 .
# Creator is a woman
?author wdt:P15 wd:Q6 .
# Author label
OPTIONAL {
?author rdfs:label ?authorLabel .
FILTER(LANG(?authorLabel) = "mul")
}
# Normal Wikibase page URL for author
BIND(
IRI(
REPLACE(
STR(?author),
"https://arcarium.index.bj.uj.edu.pl/entity/",
"https://arcarium.index.bj.uj.edu.pl/wiki/Item:"
)
)
AS ?authorLink
)
# Object title
OPTIONAL {
?dlibraObject dp:title ?title .
}
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(STR(?author), STR(wd:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?authorLabel ?titleListy w języku hiszpański nieodnalezione w edycji
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT DISTINCT
?dlibraLink
?title
?language
?edition
WHERE {
# Letter
?dlibraObject dp:documenttype "list" .
# Spanish language
?dlibraObject dp:language ?language .
FILTER(LCASE(STR(?language)) = "hiszpański")
# Edition not found
?dlibraObject dp:edition ?edition .
FILTER(LCASE(STR(?edition)) = "nieodnalezione")
# Object title
OPTIONAL {
?dlibraObject dp:title ?title .
}
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?titleListy do kobiet pisane w XVIII wieku
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX wd: <https://arcarium.index.bj.uj.edu.pl/entity/>
PREFIX wdt: <https://arcarium.index.bj.uj.edu.pl/prop/direct/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT
?dlibraLink
?title
?recipientLabel
?recipientLink
?date
WHERE {
# Letter
?dlibraObject dp:documenttype "list" .
# Recipient is a person
?dlibraObject dp:addressed ?recipient .
?recipient wdt:P1 wd:Q2 .
# Recipient is a woman
?recipient wdt:P15 wd:Q6 .
# Recipient label
OPTIONAL {
?recipient rdfs:label ?recipientLabel .
FILTER(LANG(?recipientLabel) = "mul")
}
# Normal Wikibase page URL for recipient
BIND(
IRI(
REPLACE(
STR(?recipient),
"https://arcarium.index.bj.uj.edu.pl/entity/",
"https://arcarium.index.bj.uj.edu.pl/wiki/Item:"
)
)
AS ?recipientLink
)
# Object title
OPTIONAL {
?dlibraObject dp:title ?title .
}
# XVIII century
?dlibraObject dp:date ?date .
FILTER(
REGEX(STR(?date), "(17(0[1-9]|[1-9][0-9])|1800)")
)
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(STR(?recipient), STR(wd:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?date ?recipientLabel ?titleDokumenty po francusku z XVII wieku
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT DISTINCT
?dlibraLink
?title
?date
WHERE {
# French
?dlibraObject dp:language ?language .
FILTER(LCASE(STR(?language)) = "francuski")
# XVII century
?dlibraObject dp:date ?date .
FILTER(
REGEX(STR(?date), "(16(0[1-9]|[1-9][0-9])|1700)")
)
# Object title
OPTIONAL {
?dlibraObject dp:title ?title .
}
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?date ?titleDokumenty o proweniencji Radowitz, w których w polach: nadawca, adresat, autor, osoba pojawia się Humboldt, Alexander von
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX wd: <https://arcarium.index.bj.uj.edu.pl/entity/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT DISTINCT
?dlibraLink
?title
WHERE {
# Provenance contains "Radowitz"
?dlibraObject dp:provenance ?provenance .
FILTER(
CONTAINS(
LCASE(STR(?provenance)),
"radowitz"
)
)
# Humboldt, Alexander von may occur in any of these fields
VALUES ?field {
dp:sender
dp:addressed
dp:creator
dp:person
}
?dlibraObject ?field wd:Q39574 .
# Object title
OPTIONAL {
?dlibraObject dp:title ?title .
}
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?titleFaksymilia autografów o proweniencji Parthey
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT DISTINCT
?dlibraLink
?title
WHERE {
# Provenance contains "Parthey"
?dlibraObject dp:provenance ?provenance .
FILTER(
CONTAINS(
LCASE(STR(?provenance)),
"parthey"
)
)
# Title contains both "faksymil..." and "autograf..."
?dlibraObject dp:title ?title .
FILTER(
CONTAINS(LCASE(STR(?title)), "faksymil") &&
CONTAINS(LCASE(STR(?title)), "autograf")
)
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?titleDokumenty o proweniencji Rocca powstałe we Florencji
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX wd: <https://arcarium.index.bj.uj.edu.pl/entity/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT DISTINCT
?dlibraLink
?title
WHERE {
# Provenance contains "Rocca"
?dlibraObject dp:provenance ?provenance .
FILTER(
CONTAINS(
LCASE(STR(?provenance)),
"rocca"
)
)
# Florence
?dlibraObject dp:location wd:Q28644 .
# Object title
OPTIONAL {
?dlibraObject dp:title ?title .
}
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?titleKarty ze sztambucha z XVI w. z wpisami po łacinie
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT DISTINCT
?dlibraLink
?title
?date
WHERE {
# Album amicorum card
?dlibraObject dp:documenttype "karta ze sztambucha" .
# Latin
?dlibraObject dp:language ?language .
FILTER(LCASE(STR(?language)) = "łacina")
# XVI century
?dlibraObject dp:date ?date .
FILTER(
REGEX(STR(?date), "(15(0[1-9]|[1-9][0-9])|1600)")
)
# Object title
OPTIONAL {
?dlibraObject dp:title ?title .
}
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?date ?titleWłasnoręczne podpisy margrabiów księstwa Badenii i Brunszwiku
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX wd: <https://arcarium.index.bj.uj.edu.pl/entity/>
PREFIX wdt: <https://arcarium.index.bj.uj.edu.pl/prop/direct/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT
?dlibraLink
?objectTitle
?personLabel
?personLink
WHERE {
# Creator is a person
?dlibraObject dp:creator ?person .
?person wdt:P1 wd:Q2 .
# Person has the title "margrabia"
?person wdt:P19 ?margraveTitle .
VALUES ?margraveTitle {
wd:Q36119
wd:Q39726
}
# Baden or Brunswick
OPTIONAL {
?person rdfs:label ?personLabel .
FILTER(LANG(?personLabel) = "mul")
}
FILTER(
CONTAINS(LCASE(STR(?personLabel)), "baden") ||
CONTAINS(LCASE(STR(?personLabel)), "braunsch") ||
CONTAINS(LCASE(STR(?personLabel)), "brunszw")
)
# Document type contains both "własnoręcz..." and "podpis"
?dlibraObject dp:documenttype ?documentType .
FILTER(
CONTAINS(LCASE(STR(?documentType)), "własnoręcz") &&
CONTAINS(LCASE(STR(?documentType)), "podpis")
)
# Normal Wikibase page URL for person
BIND(
IRI(
REPLACE(
STR(?person),
"https://arcarium.index.bj.uj.edu.pl/entity/",
"https://arcarium.index.bj.uj.edu.pl/wiki/Item:"
)
)
AS ?personLink
)
OPTIONAL {
?dlibraObject dp:title ?objectTitle .
}
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(STR(?person), STR(wd:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?personLabel ?objectTitleDokumenty o informacji katalogowej "Polonica"
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT DISTINCT
?dlibraLink
?title
?catalogInformation
WHERE {
# Catalog information contains "Polonica"
?dlibraObject dp:cataloginformation ?catalogInformation .
FILTER(
CONTAINS(
LCASE(STR(?catalogInformation)),
"polonica"
)
)
# Object title
OPTIONAL {
?dlibraObject dp:title ?title .
}
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?titleDokumenty opatrzone datą w kalendarzu juliańskim lub w obu kalendarzach
PREFIX ds: <https://arcarium.manuscripta.bj.uj.edu.pl/subject/>
PREFIX dp: <https://arcarium.manuscripta.bj.uj.edu.pl/predicate/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT DISTINCT
?dlibraLink
?title
?commentsToDate
WHERE {
# Date information mentions the Julian or Gregorian calendar
?dlibraObject dp:commentstodate ?commentsToDate .
FILTER(
CONTAINS(
LCASE(STR(?commentsToDate)),
"juliańsk"
)
||
CONTAINS(
LCASE(STR(?commentsToDate)),
"gregoriańsk"
)
)
# Object title
OPTIONAL {
?dlibraObject dp:title ?title .
}
# Actual dLibra URL
?dlibraObject dc:identifier ?dlibraLink .
FILTER(
STRSTARTS(STR(?dlibraObject), STR(ds:)) &&
STRSTARTS(
STR(?dlibraLink),
"https://arcarium.manuscripta.bj.uj.edu.pl/dlibra/"
)
)
}
ORDER BY ?title