Dublin Core Metadata Element Set (DCMES) 1.1
Dublin Core Metadata Element Set (DCMES) 1.1
{
"@context": {
"name": "http://xmlns.com/foaf/0.1/name",
"homepage": {
"@id": "http://xmlns.com/foaf/0.1/workplaceHomepage",
"@type": "@id"
},
"Person": "http://xmlns.com/foaf/0.1/Person"
},
"@id": "https://me.example.com",
"@type": "Person",
"name": "John Smith",
"homepage": "https://www.example.com/"
}
{
...
"publisher": "Arn. Giull. de Brocario",
"place_of_publication": "Compluti",
"language": "http://id.loc.gov/vocabulary/iso639-2/mul",
"@id": "https://open-na.hosted.exlibrisgroup.com/alma/43ACC_ONB/bibs/990028618530603338",
"title": "Biblia polyglotta",
"@context": "https://open-na.hosted.exlibrisgroup.com/alma/contexts/bib"
}
import requests
resp=requests.get("https://open-na.hosted.exlibrisgroup.com/alma/43ACC_NETWORK/bibs/990106901740203331")
resp.json()
import requests
from lxml import etree
cont=requests.get("https://obv-at-oenb.alma.exlibrisgroup.com/view/sru/43ACC_ONB?version=1.2&query=alma.barcode=%2BZ199052304&startRecord=0&maximumRecords=1&operation=searchRetrieve&recordSchema=marcxml").content
e = etree.XML(cont)
print(etree.tostring(e, encoding='unicode', pretty_print=True))
from sickle import Sickle
sickle = Sickle('https://obv-at-oenb.alma.exlibrisgroup.com/view/oai/43ACC_ONB/request')
oai_sets = sickle.ListSets()
for oai_set in oai_sets:
print('setSpec value for selective harvesting: ' + oai_set.setSpec)
print('Name of the set (setName): ' + oai_set.setName + '\n')
special thanks to Matthias Schlögl
from rdflib import Graph
import pandas as pd
#authority file Goethe: https://d-nb.info/gnd/118540238
goethe_rdf = "http://d-nb.info/gnd/118540238/about/lds.rdf"
#authority file Kreisky: https://d-nb.info/gnd/118566512
kreisky_rdf = "https://d-nb.info/gnd/118566512/about/lds.rdf"
#subject heading 'Medizin': https://d-nb.info/gnd/4038243-6
medicine_rdf = "https://d-nb.info/gnd/4038243-6/about/lds.rdf"
#list all triples in authority file Goethe
g=Graph()
g.parse(goethe_rdf)
properties = g.query('''
SELECT ?s ?p ?o
WHERE {
?s ?p ?o .
}
''')
df_goethe = pd.DataFrame(properties)
df_goethe
#list all triples in subject heading 'Medizin'
g=Graph()
g.parse(medicine_rdf)
properties = g.query('''
SELECT ?s ?p ?o
WHERE {
?s ?p ?o .
}
''')
df_medicine = pd.DataFrame(properties)
df_medicine
#list all distinct predicates in subject heading 'Medizin'
g=Graph()
g.parse(medicine_rdf)
properties = g.query('''
SELECT DISTINCT ?p
#SELECT (COUNT(DISTINCT ?p) as ?cnt)
WHERE {
?s ?p ?o .
}
''')
df_medicine = pd.DataFrame(properties)
df_medicine
#list all variantNameForTheSubjectHeading 'Medizin'
g=Graph()
g.parse(medicine_rdf)
properties = g.query('''
PREFIX gndo: <http://d-nb.info/standards/elementset/gnd#>
SELECT ?o
WHERE {
?s gndo:variantNameForTheSubjectHeading ?o .
#?s gndo:preferredNameForTheSubjectHeading ?o .
}
''')
df_medicine = pd.DataFrame(properties)
df_medicine
#count all objects in authority file Kreisky
g=Graph()
g.parse(kreisky_rdf)
properties = g.query('''
SELECT ?o (COUNT(*) AS ?cnt) {
?s ?p ?o .
} GROUP BY ?o ORDER BY DESC(?cnt)
''')
df_kreisky = pd.DataFrame(properties)
df_kreisky
#count all predicates in authority file Kreisky
g=Graph()
g.parse(kreisky_rdf)
properties = g.query('''
SELECT ?p(COUNT(*) AS ?cnt) {
?s ?p ?o .
} GROUP BY ?p ORDER BY DESC(?cnt)
''')
df_kreisky = pd.DataFrame(properties)
df_kreisky
#check 'sameAs'
g=Graph()
g.parse('https://d-nb.info/gnd/118566512/about/lds.rdf')
properties = g.query('''
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT ?o
WHERE {
?s owl:sameAs ?o .
}
''')
df_kreisky = pd.DataFrame(properties)
df_kreisky