Skip to content

Commit

Permalink
use all adjustmens from lod-vocab repo
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshack committed Feb 14, 2024
1 parent 2dc02d5 commit 487da36
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 93 deletions.
31 changes: 26 additions & 5 deletions _data/prefixes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
- prefix: geo
url: http://www.opengis.net/ont/geosparql#

- prefix: lodsg
url: https://berlinonline.github.io/lod-sg/

- prefix: schema
url: https://schema.org/

Expand All @@ -28,5 +25,29 @@
- prefix: prov
url: http://www.w3.org/ns/prov#

- prefix: lodbo
url: https://berlinonline.github.io/lod-berlin-bo/
- prefix: organigram
url: https://berlin.github.io/lod-organigram/

- prefix: org
url: http://www.w3.org/ns/org#

- prefix: vcard
url: http://www.w3.org/2006/vcard/ns#

- prefix: owl
url: http://www.w3.org/2002/07/owl#

- prefix: lodvocab
url: https://berlin.github.io/lod-vocabulary/

- prefix: berorgs
url: https://berlin.github.io/lod-vocabulary/berorgs/

- prefix: dcterms
url: http://purl.org/dc/terms#

- prefix: skos
url: http://www.w3.org/2004/02/skos/core#

- prefix: rdfs
url: http://www.w3.org/2000/01/rdf-schema#
10 changes: 9 additions & 1 deletion assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ footer {

.marker {
min-height: 10px;
background-color: orange;
background-color: skyblue;
}

body .container {
Expand All @@ -46,6 +46,14 @@ body .container {
padding-top: 15px;
}

/* #local_graph_content .tab-pane {
margin-top: 15px;
}
#local_graph_content .tab-pane .card {
margin-bottom: 15px;
} */

@media (max-width: 768px) {
.map {
padding-left: 0px;
Expand Down
26 changes: 9 additions & 17 deletions bin/compute_cbds.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import json
from pathlib import Path
from rdflib import Graph, BNode
from rdflib.namespace import split_uri

parser = argparse.ArgumentParser(
description="Compute the concise bounded description for each subject in the input file.")
Expand All @@ -25,22 +24,15 @@
cbds = {}

for subject in all.subjects():
try:
namespace = str(subject)
if subject == args.base:
namespace = split_uri(subject)[0]
if args.base in namespace:
cbd = all.cbd(subject)
name = subject.removeprefix(args.base)
name = name.replace("/", "_")
name = f"_{name}"
cbd_dict = json.loads(cbd.serialize(format="json-ld"))
out_path = args.output / name
outpath = f"{out_path}.json"
with open(outpath, 'w') as cbd_file:
json.dump(cbd_dict, cbd_file, indent=2)
except ValueError:
next
if not isinstance(subject, BNode):
cbd = all.cbd(subject)
name = subject.removeprefix(args.base)
name = name.replace("/", "_")
cbd_dict = json.loads(cbd.serialize(format="json-ld"))
out_path = args.output / name
outpath = f"{out_path}.json"
with open(outpath, 'w') as cbd_file:
json.dump(cbd_dict, cbd_file, indent=2)



Expand Down
4 changes: 4 additions & 0 deletions conf/prefixes.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ PREFIX dct: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX schema: <https://schema.org/>
PREFIX void: <http://rdfs.org/ns/void#>
Expand All @@ -11,3 +12,6 @@ PREFIX format: <http://www.w3.org/ns/formats/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX lodsg: <https://berlinonline.github.io/lod-sg/>
PREFIX lodbo: <https://berlinonline.github.io/lod-berlin-bo/>
PREFIX berorgs: <https://berlin.github.io/lod-vocabulary/berorgs/>
PREFIX lodvocab: <https://berlin.github.io/lod-vocabulary/>
PREFIX organigram: <https://berlin.github.io/lod-organigram/>
42 changes: 0 additions & 42 deletions data/static/vocab.ttl

This file was deleted.

54 changes: 26 additions & 28 deletions void.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,41 @@
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix lodsg: <https://berlinonline.github.io/lod-sg/> .
@prefix lodbo: <https://berlinonline.github.io/lod-berlin-bo/> .
@prefix schema: <https://schema.org/> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix datenregister: <https://datenregister.berlin.de/dataset/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix organigram: <https://berlin.github.io/lod-organigram/> .
@prefix org: <http://www.w3.org/ns/org#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix lodvocab: <https://berlin.github.io/lod-vocabulary/> .
@prefix berorgs: <https://berlin.github.io/lod-vocabulary/berorgs/> .
@prefix dcterms: <http://purl.org/dc/terms#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

lodsg:
lodvocab:
a void:Dataset ;
dct:title "LOD-Organigramme"@de ;
dct:title "LOD-Organizational Charts"@en ;
dct:description """Organigramme zur Beschreibung der öffentlichen Verwaltung Berlins als RDF / Linked Open Data."""@de ;
dct:description """Organizational charts (organogram) describing Berlins public administration as RDF / Linked Open Data."""@en ;
dct:created "2024-02-14"^^xsd:date ;
dct:modified "2024-02-14"^^xsd:date ;
dct:publisher lodbo:berlin ;
dct:title "Berliner LOD-Vokabulare"@de ;
dct:title "Berlin LOD vocabularies"@en ;
dct:description "Verschiedene Vokabulare für Linked Open Data der Berliner Verwaltungen."@de ;
dct:description "Various vocabularies for linked open data published by the public administration of Berlin."@en ;
dct:created "2023-09-25"^^xsd:date ;
dct:modified "2024-02-06"^^xsd:date ;
# dct:publisher lodvocab:berlinonline ;
dct:license <https://creativecommons.org/publicdomain/zero/1.0/> ;
foaf:homepage <https://github.com/berlin/lod-organigram> ;
foaf:homepage <https://github.com/berlin/lod-vocabulary> ;
# void:dataDump <https://raw.githubusercontent.com/berlinonline/lod-vocabulary/main/data/static/lodvocab.ttl> ;
void:feature <http://www.w3.org/ns/formats/Turtle> ;
void:dataDump <https://raw.githubusercontent.com/berlin/lod-organigramg/main/data/static/vocab.ttl> ;
# void:rootResource <...> ;
# void:exampleResource <...> ;
# prov:wasGeneratedBy lodsg:triplification ;
# void:rootResource lodvocab:berlinonline ;
void:vocabulary berorgs: ;
.

# lodsg:triplification
# a prov:Activity ;
# rdfs:label "Triplifizierung"@de ;
# rdfs:comment "Die Konvertierung des Quelldatensatzes in RDF"@de ;
# prov:used datenregister:source_id ;
# lodbo:impressum
# a lodsg:ImprintPage ;
# schema:name "Impressum"@de ;
# schema:name "Imprint"@en ;
# schema:about lodbo: ;
# .

lodsg:impressum
a lodsg:ImprintPage ;
schema:name "Impressum"@de ;
schema:name "Imprint"@en ;
schema:about lodsg: ;
.

0 comments on commit 487da36

Please sign in to comment.