Skip to content

Commit f14789f

Browse files
Merge pull request #4 from berlin/senfin_impress
Senfin impress
2 parents ad0602c + e24e6b1 commit f14789f

6 files changed

Lines changed: 148 additions & 43 deletions

File tree

config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ prefixes:
1010
cube: https://cube.link/
1111
dct: http://purl.org/dc/terms/
1212
foaf: http://xmlns.com/foaf/0.1/
13-
hh: https://ld.example.com/bund/finanz/haushalt/
13+
hh: https://okfde.github.io/lod-budget-vocab/
1414
hhbe: https://berlin.github.io/lod-budget/
1515
lodsg: https://berlinonline.github.io/lod-sg/
1616
lor: https://berlinonline.github.io/lod-berlin-lor/

data/bezirke-be.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@prefix hhbe: <https://berlin.github.io/lod-budget/> .
2-
@prefix hh: <https://ld.example.com/bund/finanz/haushalt/> .
2+
@prefix hh: <https://okfde.github.io/lod-budget-vocab/> .
33
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
44
@prefix lor: <https://berlinonline.github.io/lod-berlin-lor/> .
55

data/haushalt-be.ttl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@prefix cube: <https://cube.link/> .
22
@prefix dcterms: <http://purl.org/dc/terms/> .
33
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
4-
@prefix hh: <https://ld.example.com/bund/finanz/haushalt/> .
4+
@prefix hh: <https://okfde.github.io/lod-budget-vocab/> .
55
@prefix hhbe: <https://berlin.github.io/lod-budget/> .
66
@prefix meta: <https://cube.link/meta/> .
77
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@@ -24,7 +24,7 @@ hh:Ausgabetitel a rdfs:Class ;
2424
schema:name "Ausgabetitel"@de .
2525

2626
hh:Bereich a rdfs:Class ;
27-
schema:description "Unterscheidung nach Berliner Landes- und Bezirksebene. Die Ziffer 30 steht für die Landesebene. Darunter fällt die Berliner Hauptverwaltung sowie die fünf weisungsfreien Verfassungsorgane (Abgeordnetenhaus, Verfassungsgerichtshof, Rechnungshof, Beauftragte/Beauftragter für Datenschutz und Informationsfreiheit, Bürger- und Polizeibeauftragte/Bürger- und Polizeibeauftragter des Landes Berlin). Die Ziffern 31 bis 42 umfassen die 12 Berliner Bezirksämter mit ihren Bezirksverwaltungen."@de ;
27+
schema:description "Im landeshaushalterischen Kontext bezeichnet der Begriff Bereich eine organisatorische Ebene oder Einheit innerhalb der Landesverwaltung, die in der Haushaltsstruktur als übergeordnete Gliederungsebene dient. Sie differenziert insbesondere zwischen der zentralen Landesebene und nachgeordneten Verwaltungseinheiten, denen eigenständige Haushaltsansätze zugeordnet werden können."@de ;
2828
schema:name "Bereich"@de .
2929

3030
hh:Einnahmetitel a rdfs:Class ;
@@ -87,7 +87,7 @@ hh:Obergruppe a rdfs:Class ;
8787
schema:name "Obergruppe"@de .
8888

8989
hh:Titel a rdfs:Class ;
90-
schema:description "Unterste Gliederungsebene des Haushaltsplans. Die Eindeutigkeit eines Titels ist jedoch nur durch Verknüpfung mit Haushaltsjahr, Kapitel und - im Falle von Berlin - dem Bezirk gegeben."@de ;
90+
schema:description "Unterste Gliederungsebene des Haushaltsplans. Die Eindeutigkeit eines Titels ist jedoch nur durch Verknüpfung mit Haushaltsjahr, Kapitel und - im Falle von Berlin - dem Bereich gegeben."@de ;
9191
schema:name "Haushaltstitel"@de,
9292
"Titel"@de .
9393

data/haushalt-be.ttl_minitestset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@prefix cube: <https://cube.link/> .
22
@prefix dcterms: <http://purl.org/dc/terms/> .
33
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
4-
@prefix hh: <https://ld.example.com/bund/finanz/haushalt/> .
4+
@prefix hh: <https://okfde.github.io/lod-budget-vocab/> .
55
@prefix hhbe: <https://berlin.github.io/lod-budget/> .
66
@prefix meta: <https://cube.link/meta/> .
77
@prefix owl: <http://www.w3.org/2002/07/owl#> .

templates/hh_titel_observation.html.jinja

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{% extends "base.html.jinja" %}
22
{% set description_text = node | description_any(languages=['de']) %}
33
{% set titelnummer_query = '''
4+
PREFIX hh: <https://ld.example.com/bund/finanz/haushalt/>
5+
46
SELECT ?nummer
57
WHERE {
68
?resourceUri hh:nummer ?nummer.
@@ -11,6 +13,9 @@ WHERE {
1113
{% set statements = node | statements_as_object(as_list=true) %}
1214

1315
{% set year_amount_query = '''
16+
PREFIX hh: <https://ld.example.com/bund/finanz/haushalt/>
17+
PREFIX sdmxdim: <http://purl.org/linked-data/sdmx/2009/dimension#>
18+
1419
SELECT ?refPeriod ?betrag ?finanzplanung
1520
WHERE {
1621
?resourceUri sdmxdim:refPeriod ?refPeriod.

templates/imprint.html.jinja

Lines changed: 137 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,66 +2,91 @@
22

33
{% set type_icon = 'file-earmark-text' %}
44

5+
{% set responsible_org_query = '''
6+
PREFIX dct: <http://purl.org/dc/terms/>
7+
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
8+
9+
SELECT ?name ?street ?postalCode ?locality
10+
WHERE {
11+
# the imprint is about something (the dataset), which has a publisher
12+
?resource_uri schema:about/dct:publisher ?org .
13+
14+
?org
15+
skos:prefLabel ?name ;
16+
org:hasSite/org:siteAddress ?address ;
17+
.
18+
19+
?address
20+
vcard:street-address ?street ;
21+
vcard:postal-code ?postalCode ;
22+
vcard:locality ?locality ;
23+
.
24+
}
25+
'''%}
26+
{% set results = node | sparql_query(responsible_org_query) %}
27+
{% set contact_data = [] %}
28+
{% if results %}
29+
{% for result in results %}
30+
{% set _ = contact_data.append({
31+
'name': result['name'],
32+
'street': result['street'],
33+
'postalCode': result['postalCode'],
34+
'locality': result['locality']
35+
}) %}
36+
{% endfor %}
37+
{% endif %}
38+
39+
40+
541
{% block content %}
642
<div class="row">
743
<div class="col-12">
844
{# Kontaktdaten #}
945
<div id="imprint_contact" class="imprint-block">
1046
<h3>Herausgeber</h3>
11-
{% set responsible_org_query = '''
12-
SELECT ?name ?street ?postalCode ?locality
13-
WHERE {
14-
# the imprint is about something (the dataset), which has a publisher
15-
?resource_uri schema:about/dct:publisher ?org .
16-
17-
?org
18-
skos:prefLabel ?name ;
19-
org:hasSite/org:siteAddress ?address ;
20-
.
21-
22-
?address
23-
vcard:street-address ?street ;
24-
vcard:postal-code ?postalCode ;
25-
vcard:locality ?locality ;
26-
.
27-
}
28-
'''%}
29-
{% set results = node | sparql_query(responsible_org_query) %}
30-
{% if results %}
31-
{% for result in results %}
32-
{{ result['name'] }}<br/>
33-
{{ result['street'] }}<br/>
34-
{{ result['postalCode'] }} {{ result['locality'] }}<br/>
47+
{% if contact_data %}
48+
{% for org in contact_data %}
49+
{{ org.name }}<br/>
50+
{{ org.street }}<br/>
51+
{{ org.postalCode }} {{ org.locality }}<br/>
3552
{% endfor %}
3653
{% endif %}
3754
</div>
3855

3956
{# Vertretungsberechtigt: #}
40-
{% set senator_query = '''
41-
SELECT ?name
42-
WHERE {
43-
?resource_uri schema:about/dct:publisher ?org .
57+
{% set abtl_zs_query = '''
58+
PREFIX dct: <http://purl.org/dc/terms/>
59+
PREFIX berorgs: <https://berlin.github.io/lod-vocabulary/berorgs/>
60+
PREFIX organigram: <https://berlin.github.io/lod-organigram/>
61+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
4462
45-
?org org:hasPost ?post .
46-
?post org:role berorgs:SenatorIn .
47-
?senator
63+
SELECT ?post ?name ?abtl ?unitLabel ?unitPurpose
64+
WHERE {
65+
BIND(organigram:organisation-aabace653a AS ?abtl)
66+
?abtl org:hasPost ?post ;
67+
skos:prefLabel ?unitLabel ;
68+
org:purpose ?unitPurpose .
69+
?post org:role berorgs:Abteilungsleitung .
70+
?abtl_zs
4871
org:holds ?post ;
49-
rdfs:label ?name ;
50-
.
72+
rdfs:label ?name .
5173
}
5274
'''%}
53-
{% set results = node | sparql_query(senator_query) %}
75+
{% set results = node | sparql_query(abtl_zs_query) %}
5476
{% if results %}
55-
<div id="imprint_senator" class="imprint-block">
77+
<div id="imprint_abtl" class="imprint-block">
5678
{% for result in results %}
5779
<h3>Vertretungsberechtigt</h3>
58-
Finanzsenator {{ result['name'] }}
80+
{{ result['name'] }}</br>
81+
Leitung {{ result['unitLabel'] }} – {{ result['unitPurpose'] }}
5982
{% endfor %}
6083
</div>
6184
{% endif %}
6285

6386
{# UStId #}
6487
{% set ustid_query = '''
88+
PREFIX dct: <http://purl.org/dc/terms/>
89+
6590
SELECT ?ustid
6691
WHERE {
6792
?resource_uri schema:about/dct:publisher ?org .
@@ -72,14 +97,89 @@
7297
'''%}
7398
{% set results = node | sparql_query(ustid_query) %}
7499
{% if results %}
75-
<div id="imprint_senator" class="imprint-block">
100+
<div id="imprint_ustid" class="imprint-block">
76101
{% for result in results %}
77102
<h3>Umsatzsteuer-Identifikationsnummer</h3>
78103
USt-IdNr.: {{ result['ustid'] }}
79104
{% endfor %}
80105
</div>
81106
{% endif %}
82107

108+
<div id="imprint_verantw" class="imprint-block">
109+
<h3>Inhaltlich verantwortlich</h3>
110+
Team Open Data<br/>
111+
Mobil: +49 151 292 769 62<br/>
112+
E-Mail: <a href="mailto:opendata@senfin.berlin.de">opendata@senfin.berlin.de</a>
113+
</div>
114+
115+
<div id="imprint_techbetr" class="imprint-block">
116+
<h3>Technischer Betrieb</h3>
117+
GitHub, Inc.<br/>
118+
github.com
119+
</div>
120+
121+
{% set ref_zs_b_query = '''
122+
PREFIX organigram: <https://berlin.github.io/lod-organigram/>
123+
124+
SELECT ?purpose ?label
125+
WHERE {
126+
organigram:organisation-0ea5a94582
127+
org:purpose ?purpose ;
128+
skos:prefLabel ?label .
129+
}
130+
'''%}
131+
{% set results = node | sparql_query(ref_zs_b_query) %}
132+
{% if results %}
133+
{% set ref_data = [] %}
134+
{% for result in results %}
135+
{% set _ = ref_data.append({
136+
'label': result['label'],
137+
'purpose': result['purpose']
138+
}) %}
139+
{% endfor %}
140+
{% endif %}
141+
142+
143+
144+
<div id="imprint_gestaltung" class="imprint-block">
145+
<h3>Gestaltung</h3>
146+
{% if contact_data %}
147+
{% for org in contact_data %}
148+
{{ org.name }}<br/>
149+
{% if ref_data %}
150+
{% for ref in ref_data %}
151+
{{ ref.label }} – {{ ref.purpose }}<br/>
152+
{% endfor %}
153+
{% endif %}
154+
{{ org.street }}<br/>
155+
{{ org.postalCode }} {{ org.locality }}<br/>
156+
{% endfor %}
157+
{% endif %}
158+
<br/>
159+
Mobil: +49 151 292 769 62<br/>
160+
E-Mail: <a href="mailto:opendata@senfin.berlin.de">opendata@senfin.berlin.de</a>
161+
</div>
162+
163+
164+
<div id="imprint_umsetzung" class="imprint-block">
165+
<h3>Technische Umsetzung</h3>
166+
{% if contact_data %}
167+
{% for org in contact_data %}
168+
{{ org.name }}<br/>
169+
{% if ref_data %}
170+
{% for ref in ref_data %}
171+
{{ ref.label }} – {{ ref.purpose }}<br/>
172+
{% endfor %}
173+
{% endif %}
174+
{{ org.street }}<br/>
175+
{{ org.postalCode }} {{ org.locality }}<br/>
176+
{% endfor %}
177+
{% endif %}
178+
<br/>
179+
Mobil: +49 151 292 769 62<br/>
180+
E-Mail: <a href="mailto:opendata@senfin.berlin.de">opendata@senfin.berlin.de</a>
181+
</div>
182+
83183
</div>
84184
</div>
85185
{% endblock content %}

0 commit comments

Comments
 (0)