Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lmb 420/entity to add email to bestuursorgaan #133

Merged
merged 10 commits into from
May 13, 2024
Merged
1 change: 1 addition & 0 deletions config/authorization/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ defmodule Acl.UserGroups.Config do
"http://data.vlaanderen.be/ns/persoon#Geboorte",
"http://www.w3.org/ns/org#Membership",
"http://data.vlaanderen.be/ns/besluit#Bestuursorgaan",
"http://mu.semte.ch/vocabularies/ext/BestuurseenheidContact",
"http://data.vlaanderen.be/ns/mandaat#Mandataris",
"http://data.vlaanderen.be/ns/mandaat#Mandaat",
"http://mu.semte.ch/vocabularies/ext/BeleidsdomeinCode",
Expand Down
5 changes: 3 additions & 2 deletions config/cl-authorization/config.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@
("mandaat:Kandidatenlijst" -> _)
("ext:KandidatenlijstLijsttype" -> _)
("mandaat:Verkiezingsresultaat" -> _)
("ext:VerkiezingsresultaatGevolgCode" -> _)
("ext:SystemNotification" -> _)
("astreams:Tombstone" -> _))
("astreams:Tombstone" -> _)
("ext:BestuurseenheidContact" -> _)
("ext:VerkiezingsresultaatGevolgCode" -> _))

(define-graph organization-leidinggevende ("http://mu.semte.ch/graphs/organizations/")
("contacthub:AgentInPositie" -> _)
Expand Down
4 changes: 4 additions & 0 deletions config/dispatcher/dispatcher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ defmodule Dispatcher do
forward(conn, path, "http://cache/bestuurseenheid-classificatie-codes/")
end

match "/bestuurseenheid-contacten/*path", %{layer: :resources, accept: %{json: true}} do
forward(conn, path, "http://cache/bestuurseenheid-contacten/")
end

match "/bestuursorganen/*path", %{layer: :resources, accept: %{json: true}} do
forward(conn, path, "http://cache/bestuursorganen/")
end
Expand Down
48 changes: 48 additions & 0 deletions config/form-content/bestuurseenheid-contact/form.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@prefix form: <http://lblod.data.gift/vocabularies/forms/>.
@prefix sh: <http://www.w3.org/ns/shacl#>.
@prefix mu: <http://mu.semte.ch/vocabularies/core/>.
@prefix displayTypes: <http://lblod.data.gift/display-types/>.
@prefix schema: <http://schema.org/>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix ext: <http://mu.semte.ch/vocabularies/ext/>.
@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.

<http://data.lblod.info/id/lmb/forms/BestuurseenheidContact>
a form:Form, form:TopLevelForm;
form:includes ext:emailF;
sh:group ext:contactPG;
form:initGenerator ext:contactG;
form:targetType ext:BestuurseenheidContact;
form:targetLabel schema:email;
ext:prefix <http://data.lblod.info/id/BestuurseenheidContact/>;
mu:uuid "6293bfe1-40a3-4228-8f33-1f74dc45e2b9".

ext:contactPG
a form:PropertyGroup;
sh:name "Contact";
sh:order 1.

ext:emailF
a form:Field;
form:displayType displayTypes:defaultInput;
sh:group ext:contactPG;
sh:name "Email";
sh:order 2;
form:validatedBy
[ a form:ValidEmail;
form:grouping form:MatchEvery;
sh:order 1;
sh:resultMessage "Geef een geldig e-mailadres op."@nl;
sh:path schema:email
];
sh:path schema:email.

ext:contactG a form:Generator;
form:prototype [
form:shape [
a ext:BestuurseenheidContact
]
];
form:dataGenerator form:addMuUuid.
16 changes: 12 additions & 4 deletions config/resources/external-besluit.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
(werkingsgebied :via ,(s-prefix "ext:inProvincie")
:as "provincie")
(bestuurseenheid-classificatie-code :via ,(s-prefix "besluit:classificatie")
:as "classificatie"))
:has-many `((contact-punt :via ,(s-prefix "schema:contactPoint")
:as "contactinfo")
(bestuursorgaan :via ,(s-prefix "besluit:bestuurt")
:as "classificatie")
(bestuurseenheid-contact :via ,(s-prefix "ext:contactVoor")
:inverse t
:as "contact"))
:has-many `((bestuursorgaan :via ,(s-prefix "besluit:bestuurt")
:inverse t
:as "bestuursorganen"))
:resource-base (s-url "http://data.lblod.info/id/bestuurseenheden/")
Expand All @@ -45,6 +46,13 @@
:features '(include-uri)
:on-path "bestuurseenheid-classificatie-codes")

(define-resource bestuurseenheid-contact ()
:class (s-prefix "ext:BestuurseenheidContact")
:properties `((:email :string ,(s-prefix "schema:email")))
:resource-base (s-url "http://data.lblod.info/id/BestuurseenheidContact/")
:features '(include-uri)
:on-path "bestuurseenheid-contacten")

(define-resource bestuursorgaan ()
:class (s-prefix "besluit:Bestuursorgaan")
:properties `((:naam :string ,(s-prefix "skos:prefLabel"))
Expand Down