Compare commits
75 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b3a7b548c | ||
|
|
bdf7802a31 | ||
|
|
76cb2ef547 | ||
|
|
c41175cbb1 | ||
|
|
9818c0e38e | ||
|
|
9c5ee85080 | ||
|
|
07c762d845 | ||
|
|
e9dfdbbcf2 | ||
|
|
cd5bc1d0e7 | ||
|
|
462d30dbc4 | ||
|
|
a336ff05fd | ||
|
|
ede4e60907 | ||
|
|
0f3bfbc6c4 | ||
|
|
546a5d7815 | ||
|
|
f95b285ff8 | ||
|
|
2139f11878 | ||
|
|
55c8b45cc7 | ||
|
|
d1c9650c4d | ||
|
|
1e9958f540 | ||
|
|
cd3fbf7d67 | ||
|
|
56c0eb61cd | ||
|
|
23c985ff94 | ||
|
|
8824400cc9 | ||
|
|
5d9b33d685 | ||
|
|
856cf6e122 | ||
|
|
bdf93458fa | ||
|
|
95263b41e3 | ||
|
|
c9fba61ae7 | ||
|
|
8713e635ad | ||
|
|
1241a31cd2 | ||
|
|
7b8e944bb3 | ||
|
|
20b1498322 | ||
|
|
6cbca9c3fb | ||
|
|
075e56b1f2 | ||
|
|
bf8a5989ff | ||
|
|
8e6f6067db | ||
|
|
fd89b9cbf4 | ||
|
|
c4c8f2332b | ||
|
|
d89064d167 | ||
|
|
94fc9ac78e | ||
|
|
20d87aaf20 | ||
|
|
2576f86068 | ||
|
|
37f49f5495 | ||
|
|
8e5d33f8fb | ||
|
|
71e024c007 | ||
|
|
fef430002b | ||
|
|
607384293d | ||
|
|
d61b7c6c45 | ||
|
|
0e64b2589c | ||
|
|
dbb9c06dd7 | ||
|
|
e61f606def | ||
|
|
d32cb11cea | ||
|
|
bd282e7335 | ||
|
|
13e27de65c | ||
|
|
753c855164 | ||
|
|
bd06e4483b | ||
|
|
040ba2f17a | ||
|
|
f4c938ef96 | ||
|
|
2a49ad7f71 | ||
|
|
f6e7f92573 | ||
|
|
fee54793e3 | ||
|
|
ca8a6f4a65 | ||
|
|
f38794236d | ||
|
|
64149634fd | ||
|
|
6516b3cb28 | ||
|
|
6591a5eaad | ||
|
|
368513c0f3 | ||
|
|
109583b791 | ||
|
|
563817c5e6 | ||
|
|
e37df13876 | ||
|
|
e1fdde7010 | ||
|
|
a4e326a751 | ||
|
|
18efa236dc | ||
|
|
d2f49fef61 | ||
|
|
a127ea8060 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@
|
||||
!/data/db/toLoad
|
||||
!/data/db/toLoad/*
|
||||
/data/files/*
|
||||
/data/temp/*
|
||||
docker-compose.override.yml
|
||||
.idea
|
||||
*.iml
|
||||
|
||||
@@ -18,6 +18,7 @@ defmodule Acl.UserGroups.Config do
|
||||
"https://data.vlaanderen.be/ns/besluitvorming#Beslissingsactiviteit",
|
||||
"http://data.vlaanderen.be/ns/besluit#Bestuurseenheid",
|
||||
"http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst",
|
||||
"http://data.lblod.info/vocabularies/erediensten/EredienstBestuurseenheid",
|
||||
"http://data.vlaanderen.be/ns/besluit#Bestuursorgaan",
|
||||
"http://data.lblod.info/vocabularies/erediensten/RolBedienaar",
|
||||
"http://data.lblod.info/vocabularies/erediensten/VoorwaardenBedienaar",
|
||||
|
||||
@@ -1,38 +1,66 @@
|
||||
{
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/administrative-units" : {
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/administrative-units": {
|
||||
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/AdministrativeUnitsCacheGraphDump",
|
||||
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/administrative-units",
|
||||
"fileBaseName": "dump-administrative-units",
|
||||
"compression": true
|
||||
"targetDcatGraph": "http://mu.semte.ch/graphs/public",
|
||||
"targetFilesGraph": "http://mu.semte.ch/graphs/public",
|
||||
"cleanupOldDumps": true
|
||||
},
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/administrative-units" : {
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/administrative-units": {
|
||||
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/AdministrativeUnitsCacheGraphDump",
|
||||
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/administrative-units",
|
||||
"fileBaseName": "dump-administrative-units",
|
||||
"compression": true
|
||||
"targetDcatGraph": "http://mu.semte.ch/graphs/public",
|
||||
"targetFilesGraph": "http://mu.semte.ch/graphs/public",
|
||||
"cleanupOldDumps": true
|
||||
},
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/organizations" : {
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/organizations": {
|
||||
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/OrganizationsCacheGraphDump",
|
||||
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/organizations",
|
||||
"fileBaseName": "dump-organizations",
|
||||
"compression": true
|
||||
"targetDcatGraph": "http://redpencil.data.gift/id/deltas/producer/organizations-deltas",
|
||||
"targetFilesGraph": "http://redpencil.data.gift/id/deltas/producer/organizations-deltas",
|
||||
"cleanupOldDumps": true
|
||||
},
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations" : {
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations": {
|
||||
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/OrganizationsCacheGraphDump",
|
||||
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/organizations",
|
||||
"fileBaseName": "dump-organizations",
|
||||
"compression": true
|
||||
"targetDcatGraph": "http://redpencil.data.gift/id/deltas/producer/organizations-deltas",
|
||||
"targetFilesGraph": "http://redpencil.data.gift/id/deltas/producer/organizations-deltas",
|
||||
"cleanupOldDumps": true
|
||||
},
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/public" : {
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/public": {
|
||||
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/PublicCacheGraphDump",
|
||||
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/public",
|
||||
"fileBaseName": "dump-public",
|
||||
"compression": false
|
||||
"targetDcatGraph": "http://mu.semte.ch/graphs/public",
|
||||
"targetFilesGraph": "http://mu.semte.ch/graphs/public",
|
||||
"cleanupOldDumps": true
|
||||
},
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/public" : {
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/public": {
|
||||
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/PublicCacheGraphDump",
|
||||
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/public",
|
||||
"fileBaseName": "dump-public",
|
||||
"compression": false
|
||||
"targetDcatGraph": "http://mu.semte.ch/graphs/public",
|
||||
"targetFilesGraph": "http://mu.semte.ch/graphs/public",
|
||||
"cleanupOldDumps": true
|
||||
},
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/worship-posts" : {
|
||||
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/WorshipPostsCacheGraphDump",
|
||||
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/worship-posts",
|
||||
"fileBaseName": "dump-worship-posts",
|
||||
"targetDcatGraph": "http://mu.semte.ch/graphs/public",
|
||||
"targetFilesGraph": "http://mu.semte.ch/graphs/public",
|
||||
"cleanupOldDumps": true
|
||||
},
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/worship-posts" : {
|
||||
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/WorshipPostsCacheGraphDump",
|
||||
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/worship-posts",
|
||||
"fileBaseName": "dump-worship-posts",
|
||||
"targetDcatGraph": "http://mu.semte.ch/graphs/public",
|
||||
"targetFilesGraph": "http://mu.semte.ch/graphs/public",
|
||||
"cleanupOldDumps": true
|
||||
}
|
||||
}
|
||||
|
||||
47
config/delta-producer/worship-posts/export.json
Normal file
47
config/delta-producer/worship-posts/export.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"export": [
|
||||
{
|
||||
"type": "http://data.vlaanderen.be/ns/mandaat#Mandaat",
|
||||
"graphsFilter": [
|
||||
"http://mu.semte.ch/graphs/organisatieportaal"
|
||||
],
|
||||
"properties": [
|
||||
"http://mu.semte.ch/vocabularies/core/uuid",
|
||||
"http://www.w3.org/ns/org#role"
|
||||
],
|
||||
"additionalFilter": "?orgaan <http://www.w3.org/ns/org#hasPost> ?subject ; <https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan>/<http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuurseenheid . ?bestuurseenheid a ?type. FILTER (?type IN (<http://data.lblod.info/vocabularies/erediensten/CentraalBestuurVanDeEredienst>, <http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst>))"
|
||||
},
|
||||
{
|
||||
"type": "http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst",
|
||||
"strictTypeExport": "true",
|
||||
"graphsFilter": [
|
||||
"http://mu.semte.ch/graphs/organisatieportaal"
|
||||
],
|
||||
"properties": [
|
||||
"http://data.lblod.info/vocabularies/erediensten/wordtBediendDoor"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "http://data.vlaanderen.be/ns/besluit#Bestuursorgaan",
|
||||
"strictTypeExport": "true",
|
||||
"graphsFilter": [
|
||||
"http://mu.semte.ch/graphs/organisatieportaal"
|
||||
],
|
||||
"properties": [
|
||||
"http://www.w3.org/ns/org#hasPost"
|
||||
],
|
||||
"additionalFilter": "?subject <https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan>/<http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuurseenheid . ?bestuurseenheid a ?type. FILTER (?type IN (<http://data.lblod.info/vocabularies/erediensten/CentraalBestuurVanDeEredienst>, <http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst>))"
|
||||
},
|
||||
{
|
||||
"type": "http://data.lblod.info/vocabularies/erediensten/PositieBedienaar",
|
||||
"graphsFilter": [
|
||||
"http://mu.semte.ch/graphs/organisatieportaal"
|
||||
],
|
||||
"properties": [
|
||||
"http://mu.semte.ch/vocabularies/core/uuid",
|
||||
"http://www.w3.org/ns/org#role",
|
||||
"http://data.lblod.info/vocabularies/erediensten/functie"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -156,6 +156,24 @@ export default [
|
||||
optOutMuScopeIds: [ "http://redpencil.data.gift/id/concept/muScope/deltas/initialSync" ]
|
||||
}
|
||||
},
|
||||
{
|
||||
match: {
|
||||
// anything
|
||||
},
|
||||
callback: {
|
||||
url: 'http://delta-producer-pub-graph-maintainer-worship-posts/delta',
|
||||
method: 'POST'
|
||||
},
|
||||
options: {
|
||||
resourceFormat: 'v0.0.1',
|
||||
gracePeriod: 1000,
|
||||
ignoreFromSelf: true,
|
||||
optOutMuScopeIds: [
|
||||
"http://redpencil.data.gift/id/concept/muScope/deltas/initialSync",
|
||||
"http://redpencil.data.gift/id/concept/muScope/deltas/publicationGraphMaintenance"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
match: {
|
||||
predicate: {
|
||||
|
||||
@@ -97,7 +97,7 @@ defmodule Dispatcher do
|
||||
end
|
||||
|
||||
match "/central-worship-services/*path", %{ accept: [:json], layer: :api} do
|
||||
Proxy.forward conn, path, "http://cache/central-worship-services/"
|
||||
Proxy.forward conn, path, "http://resource/central-worship-services/"
|
||||
end
|
||||
|
||||
match "/representative-bodies/*path", %{ accept: [:json], layer: :api} do
|
||||
@@ -113,7 +113,7 @@ defmodule Dispatcher do
|
||||
end
|
||||
|
||||
match "/local-involvements/*path", %{ accept: [:json], layer: :api} do
|
||||
Proxy.forward conn, path, "http://cache/local-involvements/"
|
||||
Proxy.forward conn, path, "http://resource/local-involvements/"
|
||||
end
|
||||
|
||||
match "/identifiers/*path", %{ accept: [:json], layer: :api} do
|
||||
@@ -335,6 +335,14 @@ defmodule Dispatcher do
|
||||
Proxy.forward conn, path, "http://delta-producer-json-diff-file-publisher-organizations/files/"
|
||||
end
|
||||
|
||||
#################################################################
|
||||
# DELTA: posts
|
||||
#################################################################
|
||||
|
||||
get "/sync/worship-posts/files/*path" do
|
||||
Proxy.forward conn, path, "http://delta-producer-pub-graph-maintainer-worship-posts/files/"
|
||||
end
|
||||
|
||||
###############################################################
|
||||
# frontend layer
|
||||
###############################################################
|
||||
|
||||
@@ -94,5 +94,37 @@
|
||||
"nextIndex": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/worship-posts": {
|
||||
"tasksConfiguration": [
|
||||
{
|
||||
"currentOperation": null,
|
||||
"nextOperation": "http://redpencil.data.gift/id/jobs/concept/TaskOperation/deltas/initialPublicationGraphSyncing",
|
||||
"nextIndex": "0"
|
||||
},
|
||||
{
|
||||
"currentOperation": "http://redpencil.data.gift/id/jobs/concept/TaskOperation/deltas/initialPublicationGraphSyncing",
|
||||
"nextOperation": "http://redpencil.data.gift/id/jobs/concept/TaskOperation/deltas/deltaDumpFileCreation",
|
||||
"nextIndex": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/worship-posts": {
|
||||
"tasksConfiguration": [
|
||||
{
|
||||
"currentOperation": null,
|
||||
"nextOperation": "http://redpencil.data.gift/id/jobs/concept/TaskOperation/deltas/healing/patchPublicationGraph",
|
||||
"nextIndex": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/worship-posts": {
|
||||
"tasksConfiguration": [
|
||||
{
|
||||
"currentOperation": null,
|
||||
"nextOperation": "http://redpencil.data.gift/id/jobs/concept/TaskOperation/deltas/deltaDumpFileCreation",
|
||||
"nextIndex": "0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
29
config/loket-consumer/leidinggevenden-dispatching/config.js
Normal file
29
config/loket-consumer/leidinggevenden-dispatching/config.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const BATCH_SIZE = parseInt(process.env.BATCH_SIZE) || 100;
|
||||
const MU_CALL_SCOPE_ID_INITIAL_SYNC = process.env.MU_CALL_SCOPE_ID_INITIAL_SYNC || 'http://redpencil.data.gift/id/concept/muScope/deltas/consumer/initialSync';
|
||||
const BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES = process.env.BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES == 'true' ? true : false;
|
||||
const DIRECT_DATABASE_ENDPOINT = process.env.DIRECT_DATABASE_ENDPOINT || 'http://virtuoso:8890/sparql';
|
||||
const MAX_DB_RETRY_ATTEMPTS = parseInt(process.env.MAX_DB_RETRY_ATTEMPTS || 5);
|
||||
const MAX_REASONING_RETRY_ATTEMPTS = parseInt(process.env.MAX_REASONING_RETRY_ATTEMPTS || 5);
|
||||
const SLEEP_BETWEEN_BATCHES = parseInt(process.env.SLEEP_BETWEEN_BATCHES || 1000);
|
||||
const SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION || 10000);
|
||||
const SLEEP_TIME_AFTER_FAILED_DB_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_DB_OPERATION || 60000);
|
||||
const INGEST_GRAPH = process.env.INGEST_GRAPH || `http://mu.semte.ch/graphs/organisatieportaal`;
|
||||
|
||||
|
||||
if (!process.env.FILE_SYNC_GRAPH)
|
||||
throw `Expected 'FILE_SYNC_GRAPH' to be provided.`;
|
||||
const FILE_SYNC_GRAPH = process.env.FILE_SYNC_GRAPH;
|
||||
|
||||
module.exports = {
|
||||
BATCH_SIZE,
|
||||
MU_CALL_SCOPE_ID_INITIAL_SYNC,
|
||||
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
|
||||
DIRECT_DATABASE_ENDPOINT,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
MAX_REASONING_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION,
|
||||
INGEST_GRAPH,
|
||||
FILE_SYNC_GRAPH
|
||||
};
|
||||
@@ -0,0 +1,76 @@
|
||||
const { transformStatements, batchedDbUpdate, partition, deleteFromAllGraphs } = require('./util');
|
||||
const { BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
|
||||
DIRECT_DATABASE_ENDPOINT,
|
||||
MU_CALL_SCOPE_ID_INITIAL_SYNC,
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
INGEST_GRAPH,
|
||||
FILE_SYNC_GRAPH
|
||||
} = require('./config');
|
||||
|
||||
/**
|
||||
* Dispatch the fetched information to a target graph.
|
||||
* Note: <share://file/data> will be ADDED to it's own graph.
|
||||
* We take only care of adding them, not updating triples, this is a TODO
|
||||
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
|
||||
* @param { termObjectChangeSets: { deletes, inserts } } data - The fetched changes sets, which objects of serialized Terms
|
||||
* [ {
|
||||
* graph: "<http://foo>",
|
||||
* subject: "<http://bar>",
|
||||
* predicate: "<http://baz>",
|
||||
* object: "<http://boom>^^<http://datatype>"
|
||||
* }
|
||||
* ]
|
||||
* @return {void} Nothing
|
||||
*/
|
||||
async function dispatch(lib, data) {
|
||||
const { mu, muAuthSudo, fetch } = lib;
|
||||
const { termObjectChangeSets } = data;
|
||||
|
||||
for (let { deletes, inserts } of termObjectChangeSets) {
|
||||
const deleteStatements = deletes.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
|
||||
const insertStatements = inserts.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
|
||||
|
||||
if (deleteStatements.length) {
|
||||
await transformStatements(fetch, deleteStatements).then(
|
||||
transformedStatements => {
|
||||
deleteFromAllGraphs(
|
||||
muAuthSudo.updateSudo,
|
||||
transformedStatements,
|
||||
{ 'mu-call-scope-id': 'http://redpencil.data.gift/id/concept/muScope/deltas/write-for-dispatch' },
|
||||
process.env.MU_SPARQL_ENDPOINT, //Note: this is the default endpoint through auth
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
);
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
if (insertStatements.length) {
|
||||
await transformStatements(fetch, insertStatements).then(
|
||||
transformedStatements => {
|
||||
batchedDbUpdate(
|
||||
muAuthSudo.updateSudo,
|
||||
INGEST_GRAPH,
|
||||
transformedStatements,
|
||||
{ 'mu-call-scope-id': 'http://redpencil.data.gift/id/concept/muScope/deltas/write-for-dispatch' },
|
||||
process.env.MU_SPARQL_ENDPOINT, //Note: this is the default endpoint through auth
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
"INSERT"
|
||||
);
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
dispatch
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
const { transformStatements, batchedDbUpdate, partition } = require('./util');
|
||||
const { BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
|
||||
DIRECT_DATABASE_ENDPOINT,
|
||||
MU_CALL_SCOPE_ID_INITIAL_SYNC,
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
INGEST_GRAPH,
|
||||
FILE_SYNC_GRAPH
|
||||
} = require('./config');
|
||||
const endpoint = BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES ? DIRECT_DATABASE_ENDPOINT : process.env.MU_SPARQL_ENDPOINT;
|
||||
|
||||
/**
|
||||
* Dispatch the fetched information to a target graph.
|
||||
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
|
||||
* @param { termObjects } data - The fetched quad information, which objects of serialized Terms
|
||||
* [ {
|
||||
* graph: "<http://foo>",
|
||||
* subject: "<http://bar>",
|
||||
* predicate: "<http://baz>",
|
||||
* object: "<http://boom>^^<http://datatype>"
|
||||
* }
|
||||
* ]
|
||||
* @return {void} Nothing
|
||||
*/
|
||||
async function dispatch(lib, data) {
|
||||
const { mu, muAuthSudo, fetch } = lib;
|
||||
const { termObjects } = data;
|
||||
|
||||
if (BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES) {
|
||||
console.warn(`Service configured to skip MU_AUTH!`);
|
||||
}
|
||||
console.log(`Using ${endpoint} to insert triples`);
|
||||
|
||||
if (termObjects.length) {
|
||||
originalInsertTriples = termObjects.map(o => `${o.subject} ${o.predicate} ${o.object}.`)
|
||||
|
||||
await transformStatements(fetch, originalInsertTriples).then(
|
||||
transformedInsertTriples => {
|
||||
batchedDbUpdate(
|
||||
muAuthSudo.updateSudo,
|
||||
INGEST_GRAPH,
|
||||
transformedInsertTriples,
|
||||
{ 'mu-call-scope-id': MU_CALL_SCOPE_ID_INITIAL_SYNC },
|
||||
endpoint,
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
dispatch
|
||||
};
|
||||
153
config/loket-consumer/leidinggevenden-dispatching/util.js
Normal file
153
config/loket-consumer/leidinggevenden-dispatching/util.js
Normal file
@@ -0,0 +1,153 @@
|
||||
const {
|
||||
MAX_REASONING_RETRY_ATTEMPTS,
|
||||
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION
|
||||
} = require('./config');
|
||||
|
||||
async function batchedDbUpdate(muUpdate,
|
||||
graph,
|
||||
triples,
|
||||
extraHeaders,
|
||||
endpoint,
|
||||
batchSize,
|
||||
maxAttempts,
|
||||
sleepBetweenBatches = 1000,
|
||||
sleepTimeOnFail = 1000,
|
||||
operation = 'INSERT'
|
||||
) {
|
||||
|
||||
for (let i = 0; i < triples.length; i += batchSize) {
|
||||
console.log(`Inserting triples in batch: ${i}-${i + batchSize}`);
|
||||
|
||||
const batch = triples.slice(i, i + batchSize).join('\n');
|
||||
|
||||
const insertCall = async () => {
|
||||
await muUpdate(`
|
||||
${operation} DATA {
|
||||
GRAPH <${graph}> {
|
||||
${batch}
|
||||
}
|
||||
}
|
||||
`, extraHeaders, endpoint);
|
||||
};
|
||||
|
||||
await operationWithRetry(insertCall, 0, maxAttempts, sleepTimeOnFail);
|
||||
|
||||
console.log(`Sleeping before next query execution: ${sleepBetweenBatches}`);
|
||||
await new Promise(r => setTimeout(r, sleepBetweenBatches));
|
||||
}
|
||||
}
|
||||
|
||||
async function deleteFromAllGraphs(muUpdate,
|
||||
triples,
|
||||
extraHeaders,
|
||||
endpoint,
|
||||
maxAttempts,
|
||||
sleepBetweenBatches = 1000,
|
||||
sleepTimeOnFail = 1000,
|
||||
) {
|
||||
|
||||
for (const triple of triples) {
|
||||
|
||||
console.log(`Deleting a triple from all graphs in triplestore`);
|
||||
|
||||
const deleteCall = async () => {
|
||||
await muUpdate(`
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
${triple}
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
${triple}
|
||||
}
|
||||
}
|
||||
`, extraHeaders, endpoint);
|
||||
};
|
||||
|
||||
await operationWithRetry(deleteCall, 0, maxAttempts, sleepTimeOnFail);
|
||||
console.log(`Sleeping before next query execution: ${sleepBetweenBatches}`);
|
||||
await new Promise(r => setTimeout(r, sleepBetweenBatches));
|
||||
}
|
||||
}
|
||||
|
||||
async function operationWithRetry(callback,
|
||||
attempt,
|
||||
maxAttempts,
|
||||
sleepTimeOnFail) {
|
||||
try {
|
||||
if (typeof callback === "function")
|
||||
return await callback();
|
||||
else // Catch error from promise - not how I would do it normally, but allows re use of existing code.
|
||||
return await callback;
|
||||
}
|
||||
catch (e) {
|
||||
console.log(`Operation failed for ${callback.toString()}, attempt: ${attempt} of ${maxAttempts}`);
|
||||
console.log(`Error: ${e}`);
|
||||
console.log(`Sleeping ${sleepTimeOnFail} ms`);
|
||||
|
||||
if (attempt >= maxAttempts) {
|
||||
console.log(`Max attempts reached for ${callback.toString()}, giving up`);
|
||||
throw e;
|
||||
}
|
||||
|
||||
await new Promise(r => setTimeout(r, sleepTimeOnFail));
|
||||
return operationWithRetry(callback, ++attempt, maxAttempts, sleepTimeOnFail);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits an array into two parts, a part that passes and a part that fails a predicate function.
|
||||
* Credits: https://github.com/benjay10
|
||||
* @public
|
||||
* @function partition
|
||||
* @param {Array} arr - Array to be partitioned
|
||||
* @param {Function} fn - Function that accepts single argument: an element of the array, and should return a truthy or falsy value.
|
||||
* @returns {Object} Object that contains keys passes and fails, each representing an array with elemets that pass or fail the predicate respectively
|
||||
*/
|
||||
function partition(arr, fn) {
|
||||
let passes = [], fails = [];
|
||||
arr.forEach((item) => (fn(item) ? passes : fails).push(item));
|
||||
return { passes, fails };
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send triples to reasoning service for conversion
|
||||
*
|
||||
*/
|
||||
function transformTriples(fetch, triples) {
|
||||
return operationWithRetry(mainConversion(fetch, triples), 0,
|
||||
MAX_REASONING_RETRY_ATTEMPTS, SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION);
|
||||
}
|
||||
|
||||
|
||||
function mainConversion(fetch, triples) {
|
||||
let formdata = new URLSearchParams();
|
||||
formdata.append("data", triples);
|
||||
|
||||
let requestOptions = {
|
||||
method: 'POST',
|
||||
body: formdata,
|
||||
redirect: 'follow'
|
||||
};
|
||||
|
||||
return fetch("http://reasoner/reason/dl2op/main", requestOptions)
|
||||
.then(response => response.text());
|
||||
}
|
||||
|
||||
function transformStatements(fetch, triples) {
|
||||
return transformTriples(fetch, triples.join('\n')).then(
|
||||
graph => {
|
||||
statements = graph.replace(/\n{2,}/g, '').split('\n')
|
||||
console.log(`CONVERSION: FROM ${triples.length} triples to ${statements.length}`)
|
||||
return statements
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
batchedDbUpdate,
|
||||
deleteFromAllGraphs,
|
||||
partition,
|
||||
transformStatements
|
||||
};
|
||||
29
config/loket-consumer/mandate-dispatching/config.js
Normal file
29
config/loket-consumer/mandate-dispatching/config.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const BATCH_SIZE = parseInt(process.env.BATCH_SIZE) || 100;
|
||||
const MU_CALL_SCOPE_ID_INITIAL_SYNC = process.env.MU_CALL_SCOPE_ID_INITIAL_SYNC || 'http://redpencil.data.gift/id/concept/muScope/deltas/consumer/initialSync';
|
||||
const BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES = process.env.BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES == 'true' ? true : false;
|
||||
const DIRECT_DATABASE_ENDPOINT = process.env.DIRECT_DATABASE_ENDPOINT || 'http://virtuoso:8890/sparql';
|
||||
const MAX_DB_RETRY_ATTEMPTS = parseInt(process.env.MAX_DB_RETRY_ATTEMPTS || 5);
|
||||
const MAX_REASONING_RETRY_ATTEMPTS = parseInt(process.env.MAX_REASONING_RETRY_ATTEMPTS || 5);
|
||||
const SLEEP_BETWEEN_BATCHES = parseInt(process.env.SLEEP_BETWEEN_BATCHES || 1000);
|
||||
const SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION || 10000);
|
||||
const SLEEP_TIME_AFTER_FAILED_DB_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_DB_OPERATION || 60000);
|
||||
const INGEST_GRAPH = process.env.INGEST_GRAPH || `http://mu.semte.ch/graphs/organisatieportaal`;
|
||||
|
||||
|
||||
if (!process.env.FILE_SYNC_GRAPH)
|
||||
throw `Expected 'FILE_SYNC_GRAPH' to be provided.`;
|
||||
const FILE_SYNC_GRAPH = process.env.FILE_SYNC_GRAPH;
|
||||
|
||||
module.exports = {
|
||||
BATCH_SIZE,
|
||||
MU_CALL_SCOPE_ID_INITIAL_SYNC,
|
||||
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
|
||||
DIRECT_DATABASE_ENDPOINT,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
MAX_REASONING_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION,
|
||||
INGEST_GRAPH,
|
||||
FILE_SYNC_GRAPH
|
||||
};
|
||||
@@ -0,0 +1,76 @@
|
||||
const { transformStatements, batchedDbUpdate, partition, deleteFromAllGraphs } = require('./util');
|
||||
const { BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
|
||||
DIRECT_DATABASE_ENDPOINT,
|
||||
MU_CALL_SCOPE_ID_INITIAL_SYNC,
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
INGEST_GRAPH,
|
||||
FILE_SYNC_GRAPH
|
||||
} = require('./config');
|
||||
|
||||
/**
|
||||
* Dispatch the fetched information to a target graph.
|
||||
* Note: <share://file/data> will be ADDED to it's own graph.
|
||||
* We take only care of adding them, not updating triples, this is a TODO
|
||||
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
|
||||
* @param { termObjectChangeSets: { deletes, inserts } } data - The fetched changes sets, which objects of serialized Terms
|
||||
* [ {
|
||||
* graph: "<http://foo>",
|
||||
* subject: "<http://bar>",
|
||||
* predicate: "<http://baz>",
|
||||
* object: "<http://boom>^^<http://datatype>"
|
||||
* }
|
||||
* ]
|
||||
* @return {void} Nothing
|
||||
*/
|
||||
async function dispatch(lib, data) {
|
||||
const { mu, muAuthSudo, fetch } = lib;
|
||||
const { termObjectChangeSets } = data;
|
||||
|
||||
for (let { deletes, inserts } of termObjectChangeSets) {
|
||||
const deleteStatements = deletes.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
|
||||
const insertStatements = inserts.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
|
||||
|
||||
if (deleteStatements.length) {
|
||||
await transformStatements(fetch, deleteStatements).then(
|
||||
transformedStatements => {
|
||||
deleteFromAllGraphs(
|
||||
muAuthSudo.updateSudo,
|
||||
transformedStatements,
|
||||
{ 'mu-call-scope-id': 'http://redpencil.data.gift/id/concept/muScope/deltas/write-for-dispatch' },
|
||||
process.env.MU_SPARQL_ENDPOINT, //Note: this is the default endpoint through auth
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
);
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
if (insertStatements.length) {
|
||||
await transformStatements(fetch, insertStatements).then(
|
||||
transformedStatements => {
|
||||
batchedDbUpdate(
|
||||
muAuthSudo.updateSudo,
|
||||
INGEST_GRAPH,
|
||||
transformedStatements,
|
||||
{ 'mu-call-scope-id': 'http://redpencil.data.gift/id/concept/muScope/deltas/write-for-dispatch' },
|
||||
process.env.MU_SPARQL_ENDPOINT, //Note: this is the default endpoint through auth
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
"INSERT"
|
||||
);
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
dispatch
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
const { transformStatements, batchedDbUpdate, partition } = require('./util');
|
||||
const { BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
|
||||
DIRECT_DATABASE_ENDPOINT,
|
||||
MU_CALL_SCOPE_ID_INITIAL_SYNC,
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
INGEST_GRAPH,
|
||||
FILE_SYNC_GRAPH
|
||||
} = require('./config');
|
||||
const endpoint = BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES ? DIRECT_DATABASE_ENDPOINT : process.env.MU_SPARQL_ENDPOINT;
|
||||
|
||||
/**
|
||||
* Dispatch the fetched information to a target graph.
|
||||
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
|
||||
* @param { termObjects } data - The fetched quad information, which objects of serialized Terms
|
||||
* [ {
|
||||
* graph: "<http://foo>",
|
||||
* subject: "<http://bar>",
|
||||
* predicate: "<http://baz>",
|
||||
* object: "<http://boom>^^<http://datatype>"
|
||||
* }
|
||||
* ]
|
||||
* @return {void} Nothing
|
||||
*/
|
||||
async function dispatch(lib, data) {
|
||||
const { mu, muAuthSudo, fetch } = lib;
|
||||
const { termObjects } = data;
|
||||
|
||||
if (BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES) {
|
||||
console.warn(`Service configured to skip MU_AUTH!`);
|
||||
}
|
||||
console.log(`Using ${endpoint} to insert triples`);
|
||||
|
||||
if (termObjects.length) {
|
||||
originalInsertTriples = termObjects.map(o => `${o.subject} ${o.predicate} ${o.object}.`)
|
||||
|
||||
await transformStatements(fetch, originalInsertTriples).then(
|
||||
transformedInsertTriples => {
|
||||
batchedDbUpdate(
|
||||
muAuthSudo.updateSudo,
|
||||
INGEST_GRAPH,
|
||||
transformedInsertTriples,
|
||||
{ 'mu-call-scope-id': MU_CALL_SCOPE_ID_INITIAL_SYNC },
|
||||
endpoint,
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
dispatch
|
||||
};
|
||||
153
config/loket-consumer/mandate-dispatching/util.js
Normal file
153
config/loket-consumer/mandate-dispatching/util.js
Normal file
@@ -0,0 +1,153 @@
|
||||
const {
|
||||
MAX_REASONING_RETRY_ATTEMPTS,
|
||||
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION
|
||||
} = require('./config');
|
||||
|
||||
async function batchedDbUpdate(muUpdate,
|
||||
graph,
|
||||
triples,
|
||||
extraHeaders,
|
||||
endpoint,
|
||||
batchSize,
|
||||
maxAttempts,
|
||||
sleepBetweenBatches = 1000,
|
||||
sleepTimeOnFail = 1000,
|
||||
operation = 'INSERT'
|
||||
) {
|
||||
|
||||
for (let i = 0; i < triples.length; i += batchSize) {
|
||||
console.log(`Inserting triples in batch: ${i}-${i + batchSize}`);
|
||||
|
||||
const batch = triples.slice(i, i + batchSize).join('\n');
|
||||
|
||||
const insertCall = async () => {
|
||||
await muUpdate(`
|
||||
${operation} DATA {
|
||||
GRAPH <${graph}> {
|
||||
${batch}
|
||||
}
|
||||
}
|
||||
`, extraHeaders, endpoint);
|
||||
};
|
||||
|
||||
await operationWithRetry(insertCall, 0, maxAttempts, sleepTimeOnFail);
|
||||
|
||||
console.log(`Sleeping before next query execution: ${sleepBetweenBatches}`);
|
||||
await new Promise(r => setTimeout(r, sleepBetweenBatches));
|
||||
}
|
||||
}
|
||||
|
||||
async function deleteFromAllGraphs(muUpdate,
|
||||
triples,
|
||||
extraHeaders,
|
||||
endpoint,
|
||||
maxAttempts,
|
||||
sleepBetweenBatches = 1000,
|
||||
sleepTimeOnFail = 1000,
|
||||
) {
|
||||
|
||||
for (const triple of triples) {
|
||||
|
||||
console.log(`Deleting a triple from all graphs in triplestore`);
|
||||
|
||||
const deleteCall = async () => {
|
||||
await muUpdate(`
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
${triple}
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
${triple}
|
||||
}
|
||||
}
|
||||
`, extraHeaders, endpoint);
|
||||
};
|
||||
|
||||
await operationWithRetry(deleteCall, 0, maxAttempts, sleepTimeOnFail);
|
||||
console.log(`Sleeping before next query execution: ${sleepBetweenBatches}`);
|
||||
await new Promise(r => setTimeout(r, sleepBetweenBatches));
|
||||
}
|
||||
}
|
||||
|
||||
async function operationWithRetry(callback,
|
||||
attempt,
|
||||
maxAttempts,
|
||||
sleepTimeOnFail) {
|
||||
try {
|
||||
if (typeof callback === "function")
|
||||
return await callback();
|
||||
else // Catch error from promise - not how I would do it normally, but allows re use of existing code.
|
||||
return await callback;
|
||||
}
|
||||
catch (e) {
|
||||
console.log(`Operation failed for ${callback.toString()}, attempt: ${attempt} of ${maxAttempts}`);
|
||||
console.log(`Error: ${e}`);
|
||||
console.log(`Sleeping ${sleepTimeOnFail} ms`);
|
||||
|
||||
if (attempt >= maxAttempts) {
|
||||
console.log(`Max attempts reached for ${callback.toString()}, giving up`);
|
||||
throw e;
|
||||
}
|
||||
|
||||
await new Promise(r => setTimeout(r, sleepTimeOnFail));
|
||||
return operationWithRetry(callback, ++attempt, maxAttempts, sleepTimeOnFail);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits an array into two parts, a part that passes and a part that fails a predicate function.
|
||||
* Credits: https://github.com/benjay10
|
||||
* @public
|
||||
* @function partition
|
||||
* @param {Array} arr - Array to be partitioned
|
||||
* @param {Function} fn - Function that accepts single argument: an element of the array, and should return a truthy or falsy value.
|
||||
* @returns {Object} Object that contains keys passes and fails, each representing an array with elemets that pass or fail the predicate respectively
|
||||
*/
|
||||
function partition(arr, fn) {
|
||||
let passes = [], fails = [];
|
||||
arr.forEach((item) => (fn(item) ? passes : fails).push(item));
|
||||
return { passes, fails };
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send triples to reasoning service for conversion
|
||||
*
|
||||
*/
|
||||
function transformTriples(fetch, triples) {
|
||||
return operationWithRetry(mainConversion(fetch, triples), 0,
|
||||
MAX_REASONING_RETRY_ATTEMPTS, SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION);
|
||||
}
|
||||
|
||||
|
||||
function mainConversion(fetch, triples) {
|
||||
let formdata = new URLSearchParams();
|
||||
formdata.append("data", triples);
|
||||
|
||||
let requestOptions = {
|
||||
method: 'POST',
|
||||
body: formdata,
|
||||
redirect: 'follow'
|
||||
};
|
||||
|
||||
return fetch("http://reasoner/reason/dl2op/main", requestOptions)
|
||||
.then(response => response.text());
|
||||
}
|
||||
|
||||
function transformStatements(fetch, triples) {
|
||||
return transformTriples(fetch, triples.join('\n')).then(
|
||||
graph => {
|
||||
statements = graph.replace(/\n{2,}/g, '').split('\n')
|
||||
console.log(`CONVERSION: FROM ${triples.length} triples to ${statements.length}`)
|
||||
return statements
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
batchedDbUpdate,
|
||||
deleteFromAllGraphs,
|
||||
partition,
|
||||
transformStatements
|
||||
};
|
||||
36
config/loket-consumer/positions-dispatching/config.js
Normal file
36
config/loket-consumer/positions-dispatching/config.js
Normal file
@@ -0,0 +1,36 @@
|
||||
const BATCH_SIZE = parseInt(process.env.BATCH_SIZE) || 100;
|
||||
const MU_CALL_SCOPE_ID_INITIAL_SYNC = process.env.MU_CALL_SCOPE_ID_INITIAL_SYNC || 'http://redpencil.data.gift/id/concept/muScope/deltas/consumer/initialSync';
|
||||
const BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES = process.env.BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES == 'true' ? true : false;
|
||||
const DIRECT_DATABASE_ENDPOINT = process.env.DIRECT_DATABASE_ENDPOINT || 'http://virtuoso:8890/sparql';
|
||||
const MAX_DB_RETRY_ATTEMPTS = parseInt(process.env.MAX_DB_RETRY_ATTEMPTS || 5);
|
||||
const MAX_REASONING_RETRY_ATTEMPTS = parseInt(process.env.MAX_REASONING_RETRY_ATTEMPTS || 5);
|
||||
const SLEEP_BETWEEN_BATCHES = parseInt(process.env.SLEEP_BETWEEN_BATCHES || 1000);
|
||||
const SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION || 10000);
|
||||
const SLEEP_TIME_AFTER_FAILED_DB_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_DB_OPERATION || 60000);
|
||||
const INGEST_GRAPH = process.env.INGEST_GRAPH || `http://mu.semte.ch/graphs/organisatieportaal`;
|
||||
const PRIVACY_SENSITIVE_GRAPH = process.env.PRIVACY_SENSITIVE_GRAPH || `http://mu.semte.ch/graphs/privacy-centric-graph`;
|
||||
const UNFILTERED_MAPPING = 'main';
|
||||
const MAIN_INFO_MAPPING = 'main-info';
|
||||
const PRIVATE_INFO_MAPPING = 'private-info';
|
||||
|
||||
|
||||
if (!process.env.FILE_SYNC_GRAPH)
|
||||
throw `Expected 'FILE_SYNC_GRAPH' to be provided.`;
|
||||
const FILE_SYNC_GRAPH = process.env.FILE_SYNC_GRAPH;
|
||||
|
||||
module.exports = {
|
||||
BATCH_SIZE,
|
||||
MU_CALL_SCOPE_ID_INITIAL_SYNC,
|
||||
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
|
||||
DIRECT_DATABASE_ENDPOINT,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
MAX_REASONING_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION,
|
||||
INGEST_GRAPH,
|
||||
PRIVACY_SENSITIVE_GRAPH,
|
||||
UNFILTERED_MAPPING,
|
||||
MAIN_INFO_MAPPING,
|
||||
PRIVATE_INFO_MAPPING,
|
||||
};
|
||||
@@ -0,0 +1,88 @@
|
||||
const { transformStatements, batchedDbUpdate, partition, deleteFromAllGraphs } = require('./util');
|
||||
const {
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
INGEST_GRAPH,
|
||||
PRIVACY_SENSITIVE_GRAPH,
|
||||
UNFILTERED_MAPPING,
|
||||
MAIN_INFO_MAPPING,
|
||||
PRIVATE_INFO_MAPPING,
|
||||
} = require('./config');
|
||||
|
||||
/**
|
||||
* Dispatch the fetched information to a target graph.
|
||||
* Note: <share://file/data> will be ADDED to it's own graph.
|
||||
* We take only care of adding them, not updating triples, this is a TODO
|
||||
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
|
||||
* @param { termObjectChangeSets: { deletes, inserts } } data - The fetched changes sets, which objects of serialized Terms
|
||||
* [ {
|
||||
* graph: "<http://foo>",
|
||||
* subject: "<http://bar>",
|
||||
* predicate: "<http://baz>",
|
||||
* object: "<http://boom>^^<http://datatype>"
|
||||
* }
|
||||
* ]
|
||||
* @return {void} Nothing
|
||||
*/
|
||||
async function dispatch(lib, data) {
|
||||
const { mu, muAuthSudo, fetch } = lib;
|
||||
const { termObjectChangeSets } = data;
|
||||
|
||||
for (let { deletes, inserts } of termObjectChangeSets) {
|
||||
const deleteStatements = deletes.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
|
||||
const insertStatements = inserts.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
|
||||
|
||||
if (deleteStatements.length) {
|
||||
const transformedStatementsToDelete = await transformStatements(fetch, deleteStatements, UNFILTERED_MAPPING);
|
||||
if (transformedStatementsToDelete.length) {
|
||||
await deleteFromAllGraphs(
|
||||
muAuthSudo.updateSudo,
|
||||
transformedStatementsToDelete,
|
||||
{ 'mu-call-scope-id': 'http://redpencil.data.gift/id/concept/muScope/deltas/write-for-dispatch' },
|
||||
process.env.MU_SPARQL_ENDPOINT, //Note: this is the default endpoint through auth
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (insertStatements.length) {
|
||||
const transformedStatementsToInsert = await transformStatements(fetch, insertStatements, MAIN_INFO_MAPPING);
|
||||
if (transformedStatementsToInsert.length) {
|
||||
await batchedDbUpdate(
|
||||
muAuthSudo.updateSudo,
|
||||
INGEST_GRAPH,
|
||||
transformedStatementsToInsert,
|
||||
{ 'mu-call-scope-id': 'http://redpencil.data.gift/id/concept/muScope/deltas/write-for-dispatch' },
|
||||
process.env.MU_SPARQL_ENDPOINT, //Note: this is the default endpoint through auth
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
|
||||
);
|
||||
}
|
||||
|
||||
const transformedStatementsToInsertPrivate = await transformStatements(fetch, insertStatements, PRIVATE_INFO_MAPPING);
|
||||
if (transformedStatementsToInsertPrivate.length) {
|
||||
await batchedDbUpdate(
|
||||
muAuthSudo.updateSudo,
|
||||
PRIVACY_SENSITIVE_GRAPH,
|
||||
transformedStatementsToInsertPrivate,
|
||||
{ 'mu-call-scope-id': 'http://redpencil.data.gift/id/concept/muScope/deltas/write-for-dispatch' },
|
||||
process.env.MU_SPARQL_ENDPOINT, //Note: this is the default endpoint through auth
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
dispatch
|
||||
};
|
||||
@@ -0,0 +1,80 @@
|
||||
const { transformStatements, batchedDbUpdate, } = require('./util');
|
||||
const { BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
|
||||
DIRECT_DATABASE_ENDPOINT,
|
||||
MU_CALL_SCOPE_ID_INITIAL_SYNC,
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
|
||||
INGEST_GRAPH,
|
||||
PRIVACY_SENSITIVE_GRAPH,
|
||||
MAIN_INFO_MAPPING,
|
||||
PRIVATE_INFO_MAPPING
|
||||
} = require('./config');
|
||||
const endpoint = BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES ? DIRECT_DATABASE_ENDPOINT : process.env.MU_SPARQL_ENDPOINT;
|
||||
|
||||
/**
|
||||
* Dispatch the fetched information to a target graph.
|
||||
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
|
||||
* @param { termObjects } data - The fetched quad information, which objects of serialized Terms
|
||||
* [ {
|
||||
* graph: "<http://foo>",
|
||||
* subject: "<http://bar>",
|
||||
* predicate: "<http://baz>",
|
||||
* object: "<http://boom>^^<http://datatype>"
|
||||
* }
|
||||
* ]
|
||||
* @return {void} Nothing
|
||||
*/
|
||||
async function dispatch(lib, data) {
|
||||
const { mu, muAuthSudo, fetch } = lib;
|
||||
const { termObjects } = data;
|
||||
|
||||
if (BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES) {
|
||||
console.warn(`Service configured to skip MU_AUTH!`);
|
||||
}
|
||||
console.log(`Using ${endpoint} to insert triples`);
|
||||
|
||||
if (termObjects.length) {
|
||||
originalInsertTriples = termObjects.map(o => `${o.subject} ${o.predicate} ${o.object}.`)
|
||||
|
||||
await transformStatements(fetch, originalInsertTriples, MAIN_INFO_MAPPING).then(
|
||||
transformedInsertTriples => {
|
||||
if (transformedInsertTriples.length) {
|
||||
batchedDbUpdate(
|
||||
muAuthSudo.updateSudo,
|
||||
INGEST_GRAPH,
|
||||
transformedInsertTriples,
|
||||
{ 'mu-call-scope-id': MU_CALL_SCOPE_ID_INITIAL_SYNC },
|
||||
endpoint,
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
|
||||
)
|
||||
}
|
||||
}
|
||||
);
|
||||
await transformStatements(fetch, originalInsertTriples, PRIVATE_INFO_MAPPING).then(
|
||||
transformedInsertTriples => {
|
||||
if (transformedInsertTriples.length) {
|
||||
batchedDbUpdate(
|
||||
muAuthSudo.updateSudo,
|
||||
PRIVACY_SENSITIVE_GRAPH,
|
||||
transformedInsertTriples,
|
||||
{ 'mu-call-scope-id': MU_CALL_SCOPE_ID_INITIAL_SYNC },
|
||||
endpoint,
|
||||
BATCH_SIZE,
|
||||
MAX_DB_RETRY_ATTEMPTS,
|
||||
SLEEP_BETWEEN_BATCHES,
|
||||
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
|
||||
)
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
dispatch
|
||||
};
|
||||
154
config/loket-consumer/positions-dispatching/util.js
Normal file
154
config/loket-consumer/positions-dispatching/util.js
Normal file
@@ -0,0 +1,154 @@
|
||||
const {
|
||||
MAX_REASONING_RETRY_ATTEMPTS,
|
||||
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION
|
||||
} = require('./config');
|
||||
|
||||
async function batchedDbUpdate(muUpdate,
|
||||
graph,
|
||||
triples,
|
||||
extraHeaders,
|
||||
endpoint,
|
||||
batchSize,
|
||||
maxAttempts,
|
||||
sleepBetweenBatches = 1000,
|
||||
sleepTimeOnFail = 1000,
|
||||
operation = 'INSERT'
|
||||
) {
|
||||
|
||||
for (let i = 0; i < triples.length; i += batchSize) {
|
||||
console.log(`Inserting triples in batch: ${i}-${i + batchSize}`);
|
||||
|
||||
const batch = triples.slice(i, i + batchSize).join('\n');
|
||||
|
||||
const insertCall = async () => {
|
||||
await muUpdate(`
|
||||
${operation} DATA {
|
||||
GRAPH <${graph}> {
|
||||
${batch}
|
||||
}
|
||||
}
|
||||
`, extraHeaders, endpoint);
|
||||
};
|
||||
|
||||
await operationWithRetry(insertCall, 0, maxAttempts, sleepTimeOnFail);
|
||||
|
||||
console.log(`Sleeping before next query execution: ${sleepBetweenBatches}`);
|
||||
await new Promise(r => setTimeout(r, sleepBetweenBatches));
|
||||
}
|
||||
}
|
||||
|
||||
async function deleteFromAllGraphs(muUpdate,
|
||||
triples,
|
||||
extraHeaders,
|
||||
endpoint,
|
||||
maxAttempts,
|
||||
sleepBetweenBatches = 1000,
|
||||
sleepTimeOnFail = 1000,
|
||||
) {
|
||||
|
||||
for (const triple of triples) {
|
||||
|
||||
console.log(`Deleting a triple from all graphs in triplestore`);
|
||||
|
||||
const deleteCall = async () => {
|
||||
await muUpdate(`
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
${triple}
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
${triple}
|
||||
}
|
||||
}
|
||||
`, extraHeaders, endpoint);
|
||||
};
|
||||
|
||||
await operationWithRetry(deleteCall, 0, maxAttempts, sleepTimeOnFail);
|
||||
console.log(`Sleeping before next query execution: ${sleepBetweenBatches}`);
|
||||
await new Promise(r => setTimeout(r, sleepBetweenBatches));
|
||||
}
|
||||
}
|
||||
|
||||
async function operationWithRetry(callback,
|
||||
attempt,
|
||||
maxAttempts,
|
||||
sleepTimeOnFail) {
|
||||
try {
|
||||
if (typeof callback === "function")
|
||||
return await callback();
|
||||
else // Catch error from promise - not how I would do it normally, but allows re use of existing code.
|
||||
return await callback;
|
||||
}
|
||||
catch (e) {
|
||||
console.log(`Operation failed for ${callback.toString()}, attempt: ${attempt} of ${maxAttempts}`);
|
||||
console.log(`Error: ${e}`);
|
||||
console.log(`Sleeping ${sleepTimeOnFail} ms`);
|
||||
|
||||
if (attempt >= maxAttempts) {
|
||||
console.log(`Max attempts reached for ${callback.toString()}, giving up`);
|
||||
throw e;
|
||||
}
|
||||
|
||||
await new Promise(r => setTimeout(r, sleepTimeOnFail));
|
||||
return operationWithRetry(callback, ++attempt, maxAttempts, sleepTimeOnFail);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits an array into two parts, a part that passes and a part that fails a predicate function.
|
||||
* Credits: https://github.com/benjay10
|
||||
* @public
|
||||
* @function partition
|
||||
* @param {Array} arr - Array to be partitioned
|
||||
* @param {Function} fn - Function that accepts single argument: an element of the array, and should return a truthy or falsy value.
|
||||
* @returns {Object} Object that contains keys passes and fails, each representing an array with elemets that pass or fail the predicate respectively
|
||||
*/
|
||||
function partition(arr, fn) {
|
||||
let passes = [], fails = [];
|
||||
arr.forEach((item) => (fn(item) ? passes : fails).push(item));
|
||||
return { passes, fails };
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send triples to reasoning service for conversion
|
||||
*
|
||||
*/
|
||||
function transformTriples(fetch, triples, mapping) {
|
||||
return operationWithRetry(mainConversion(fetch, triples, mapping), 0,
|
||||
MAX_REASONING_RETRY_ATTEMPTS, SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION);
|
||||
}
|
||||
|
||||
|
||||
function mainConversion(fetch, triples, mapping) {
|
||||
let formdata = new URLSearchParams();
|
||||
formdata.append("data", triples);
|
||||
|
||||
let requestOptions = {
|
||||
method: 'POST',
|
||||
body: formdata,
|
||||
redirect: 'follow'
|
||||
};
|
||||
|
||||
return fetch(`http://reasoner/reason/dl2op/${mapping}`, requestOptions)
|
||||
.then(response => response.text());
|
||||
}
|
||||
|
||||
|
||||
function transformStatements(fetch, triples, mapping) {
|
||||
return transformTriples(fetch, triples.join('\n'), mapping).then(
|
||||
graph => {
|
||||
statements = graph ? graph.split('\n') : [];
|
||||
console.log(`CONVERSION ${mapping}: FROM ${triples.length} triples to ${statements.length}`)
|
||||
return statements
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
batchedDbUpdate,
|
||||
deleteFromAllGraphs,
|
||||
partition,
|
||||
transformStatements
|
||||
};
|
||||
@@ -0,0 +1,83 @@
|
||||
# OP-1928 : Remove worship members in "Kerkfabriek St.-Franciscus van Glabbeek"
|
||||
|
||||
# Delete duplicate persons
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
<http://data.lblod.info/id/personen/635BD6EC8DE5818A7C9F4310> ?pm ?om .
|
||||
<http://data.lblod.info/id/personen/635BD7518DE5818A7C9F4313> ?pj ?oj .
|
||||
<http://data.lblod.info/id/mandatarissen/635BD7148DE5818A7C9F4312> ?pd ?od .
|
||||
<http://data.lblod.info/id/mandatarissen/635BD76D8DE5818A7C9F4314> ?pt ?ot .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
<http://data.lblod.info/id/personen/635BD6EC8DE5818A7C9F4310> ?pm ?om .
|
||||
<http://data.lblod.info/id/personen/635BD7518DE5818A7C9F4313> ?pj ?oj .
|
||||
<http://data.lblod.info/id/mandatarissen/635BD7148DE5818A7C9F4312> ?pd ?od .
|
||||
<http://data.lblod.info/id/mandatarissen/635BD76D8DE5818A7C9F4314> ?pt ?ot .
|
||||
}
|
||||
}
|
||||
;
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/privacy-centric-graph> {
|
||||
<http://data.lblod.info/id/personen/635BD6EC8DE5818A7C9F4310> ?pm ?om .
|
||||
<http://data.lblod.info/id/personen/635BD7518DE5818A7C9F4313> ?pj ?oj .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/privacy-centric-graph> {
|
||||
<http://data.lblod.info/id/personen/635BD6EC8DE5818A7C9F4310> ?pm ?om .
|
||||
<http://data.lblod.info/id/personen/635BD7518DE5818A7C9F4313> ?pj ?oj .
|
||||
}
|
||||
}
|
||||
;
|
||||
# Change Start Date
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/mandatarissen/6368DBCB8DE5818A7C9F441F> <http://data.vlaanderen.be/ns/mandaat#start> "2022-05-04"^^xsd:date .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/mandatarissen/6368DBCB8DE5818A7C9F441F> <http://data.vlaanderen.be/ns/mandaat#start> "2022-01-28"^^xsd:date .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/mandatarissen/6368DBCB8DE5818A7C9F441F> <http://data.vlaanderen.be/ns/mandaat#start> "2022-05-04"^^xsd:date .
|
||||
}
|
||||
}
|
||||
;
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/mandatarissen/6368DB2F8DE5818A7C9F441A> <http://data.vlaanderen.be/ns/mandaat#start> "2022-05-04"^^xsd:date .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/mandatarissen/6368DB2F8DE5818A7C9F441A> <http://data.vlaanderen.be/ns/mandaat#start> "2022-01-28"^^xsd:date .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/mandatarissen/6368DB2F8DE5818A7C9F441A> <http://data.vlaanderen.be/ns/mandaat#start> "2022-05-04"^^xsd:date .
|
||||
}
|
||||
}
|
||||
|
||||
# The associated call to trigger a reindex is :
|
||||
|
||||
# curl --location --request POST '172.19.0.23/update' \
|
||||
# --header 'Content-Type: application/vnd.api+json' \
|
||||
# --data-raw ' [
|
||||
# {
|
||||
# "deletes": [
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/635BD6EC8DE5818A7C9F4310" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "635BD6EC8DE5818A7C9F4310" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/635BD7518DE5818A7C9F4313" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "635BD7518DE5818A7C9F4313" }
|
||||
# }
|
||||
# ],
|
||||
# "inserts": []
|
||||
# }
|
||||
# ]'
|
||||
@@ -0,0 +1,79 @@
|
||||
# OP-1929 : Delete duplicated members from worship service
|
||||
|
||||
# Delete wrong peson and mandatarissen
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> { ?s ?p ?o . }
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
VALUES ?s {
|
||||
<http://data.lblod.info/id/personen/74c5800e8489c825f318acc9dcb031d0>
|
||||
<http://data.lblod.info/id/mandatarissen/6380A02F4B5FEAF28DEDE975>
|
||||
<http://data.lblod.info/id/mandatarissen/6380BBB04B5FEAF28DEDE97E>
|
||||
<http://data.lblod.info/id/mandatarissen/63809FC24B5FEAF28DEDE974>
|
||||
<http://data.lblod.info/id/mandatarissen/63809F414B5FEAF28DEDE972>
|
||||
<http://data.lblod.info/id/mandatarissen/63809F804B5FEAF28DEDE973>
|
||||
<http://data.lblod.info/id/mandatarissen/6380D0854B5FEAF28DEDE97F>
|
||||
}
|
||||
?s ?p ?o .
|
||||
}
|
||||
}
|
||||
;
|
||||
# Delete sensitive data
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/privacy-centric-graph> {
|
||||
<http://data.lblod.info/id/personen/74c5800e8489c825f318acc9dcb031d0> ?pp ?op .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/privacy-centric-graph> {
|
||||
<http://data.lblod.info/id/personen/74c5800e8489c825f318acc9dcb031d0> ?pp ?op .
|
||||
}
|
||||
}
|
||||
|
||||
# The associated call to trigger a reindex is :
|
||||
|
||||
# curl --location --request POST '172.20.0.26/update' \
|
||||
# --header 'Content-Type: application/vnd.api+json' \
|
||||
# --data-raw ' [
|
||||
# {
|
||||
# "deletes": [
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/74c5800e8489c825f318acc9dcb031d0" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "74c5800e8489c825f318acc9dcb031d0" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/mandatarissen/6380A02F4B5FEAF28DEDE975" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/EredienstMandataris" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/mandatarissen/6380BBB04B5FEAF28DEDE97E" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/EredienstMandataris" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/mandatarissen/63809FC24B5FEAF28DEDE974" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/EredienstMandataris" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/mandatarissen/63809F414B5FEAF28DEDE972" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/EredienstMandataris" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/mandatarissen/63809F804B5FEAF28DEDE973" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/EredienstMandataris" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/mandatarissen/6380D0854B5FEAF28DEDE97F" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/EredienstMandataris" }
|
||||
# }
|
||||
# ],
|
||||
# "inserts": []
|
||||
# }
|
||||
# ]'
|
||||
@@ -0,0 +1 @@
|
||||
http://mu.semte.ch/graphs/organisatieportaal
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,17 @@
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
|
||||
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2> . # Priester
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/04d3b5325f2ebc5eaf96849519af4254> . # Rector
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/rollenBedienaar/6332B4D3036B579F0A26FF1D> org:holds ?role .
|
||||
?role ere:functie <http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2> .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
|
||||
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2> . # Priester
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/04d3b5325f2ebc5eaf96849519af4254> . # Rector
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/rollenBedienaar/6371F9448DE5818A7C9F44AC> org:holds ?role .
|
||||
?role ere:functie <http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2> .
|
||||
}
|
||||
}
|
||||
80
config/migrations/2022/20221222160000-fix-kbo-uris.sparql
Normal file
80
config/migrations/2022/20221222160000-fix-kbo-uris.sparql
Normal file
@@ -0,0 +1,80 @@
|
||||
# http://data.lblod.info/id/centraleBesturenVanDeEredienst/c5908a253d1aa2fccb75e6fff439c93a CKB Kruisem --> Stays
|
||||
# http://data.lblod.info/id/centraleBesturenVanDeEredienst/64dcf0eaafd13dea75717d9014982106 CKB Kruishoutem --> DELETE KBO +
|
||||
# http://data.lblod.info/id/centraleBesturenVanDeEredienst/6d4226a920cc47e4d4bbfddb451f4883 CKB Aalter NIET actief --> Change to "0535.589.755" +
|
||||
# http://data.lblod.info/id/centraleBesturenVanDeEredienst/e08a8bc5828bd44e735724a79b588b13 CKB Aalter actief --> Stays
|
||||
# http://data.lblod.info/id/centraleBesturenVanDeEredienst/9e0e8f060ca954da6263243642433f44 CKB De Pinte --> Stays
|
||||
# http://data.lblod.info/id/centraleBesturenVanDeEredienst/fa51c0cd4530f0db4caea031f75305d3 CKB Sint-Martens-Latem --> DELETE KBO +
|
||||
# http://data.lblod.info/id/besturenVanDeEredienst/619a5721094b28807dca8d04de69e3e0 Islamitische geloofsgemeenschap Yunus Emre van Genk --> Stays
|
||||
# http://data.lblod.info/id/centraleBesturenVanDeEredienst/e17dabfaf8f562ad181f422006c42e97 CB van de Islamitische gemeenschappen in Limburg --> Delete KBO +
|
||||
|
||||
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
|
||||
PREFIX code: <http://lblod.data.gift/vocabularies/organisatie/>
|
||||
PREFIX dbpedia: <http://dbpedia.org/ontology/>
|
||||
PREFIX dc_terms: <http://purl.org/dc/terms/>
|
||||
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
|
||||
PREFIX euro: <http://data.europa.eu/m8g/>
|
||||
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX lblodlg: <https://data.lblod.info/vocabularies/leidinggevenden/>
|
||||
PREFIX locn: <http://www.w3.org/ns/locn#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX organisatie: <https://data.vlaanderen.be/ns/organisatie#>
|
||||
PREFIX person: <http://www.w3.org/ns/person#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX prov: <http://www.w3.org/ns/prov#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX regorg: <http://www.w3.org/ns/regorg#>
|
||||
PREFIX schema: <http://schema.org/>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?bestuur
|
||||
adms:identifier
|
||||
?identifier_kbo.
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/6d4226a920cc47e4d4bbfddb451f4883>
|
||||
adms:identifier
|
||||
<http://data.lblod.info/id/identificatoren/d029ebdf899249f2b3d1ae88be0ebf65>.
|
||||
<http://data.lblod.info/id/identificatoren/d029ebdf899249f2b3d1ae88be0ebf65>
|
||||
a adms:Identifier;
|
||||
mu:uuid "d029ebdf899249f2b3d1ae88be0ebf65";
|
||||
skos:notation
|
||||
"KBO nummer";
|
||||
generiek:gestructureerdeIdentificator
|
||||
<http://data.lblod.info/id/gestructureerdeIdentificatoren/6a197d71a59d41ca900009ef84c72002>.
|
||||
<http://data.lblod.info/id/gestructureerdeIdentificatoren/6a197d71a59d41ca900009ef84c72002>
|
||||
a generiek:GestructureerdeIdentificator;
|
||||
mu:uuid "6a197d71a59d41ca900009ef84c72002";
|
||||
generiek:lokaleIdentificator
|
||||
"0535589755".
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
VALUES ?bestuur {
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/64dcf0eaafd13dea75717d9014982106>
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/fa51c0cd4530f0db4caea031f75305d3>
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/e17dabfaf8f562ad181f422006c42e97>
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/6d4226a920cc47e4d4bbfddb451f4883>
|
||||
}
|
||||
|
||||
?bestuur
|
||||
adms:identifier
|
||||
?identifier_kbo.
|
||||
?identifier_kbo
|
||||
skos:notation
|
||||
"KBO nummer".
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
PREFIX dct: <http://purl.org/dc/terms/>
|
||||
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/veranderingsgebeurtenissen/63A1BE5026577078270F82DA> dct:date "2022-12-21"^^xsd:date .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/veranderingsgebeurtenissen/63A1BE5026577078270F82DA> dct:date "2022-12-20"^^xsd:date .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/veranderingsgebeurtenissen/63A1BE5026577078270F82DA> dct:date "2022-12-21"^^xsd:date .
|
||||
}
|
||||
}
|
||||
|
||||
# OP-1981
|
||||
@@ -0,0 +1,65 @@
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
PREFIX person: <http://www.w3.org/ns/person#>
|
||||
PREFIX session: <http://mu.semte.ch/vocabularies/session/>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/privacy-centric-graph> {
|
||||
?person ?ppPerson ?ooPerson.
|
||||
?heeftGeboorte ?p ?o.
|
||||
?registration <https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator> ?identificator.
|
||||
?identificator ?x ?y.
|
||||
?registration ?t ?j.
|
||||
}
|
||||
}
|
||||
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?person a <http://www.w3.org/ns/person#Person>.
|
||||
FILTER((NOT EXISTS { ?mandatories <http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan> ?person. })
|
||||
&& (NOT EXISTS { ?ministers <http://www.w3.org/ns/org#heldBy> ?person. }))
|
||||
}
|
||||
|
||||
GRAPH <http://mu.semte.ch/graphs/privacy-centric-graph> {
|
||||
optional {?person ?ppPerson ?ooPerson.}
|
||||
optional {
|
||||
?person persoon:heeftGeboorte ?heeftGeboorte.
|
||||
?heeftGeboorte ?p ?o.
|
||||
}
|
||||
|
||||
optional {
|
||||
?person persoon:registratie ?registration.
|
||||
?registration ?t ?j.
|
||||
}
|
||||
optional {
|
||||
|
||||
?registration <https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator> ?identificator.
|
||||
?identificator ?x ?y.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?person ?pPerson ?oPerson.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?person a <http://www.w3.org/ns/person#Person>;
|
||||
?pPerson ?oPerson.
|
||||
FILTER((NOT EXISTS { ?mandatories <http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan> ?person. }) && (NOT EXISTS { ?ministers <http://www.w3.org/ns/org#heldBy> ?person. }))
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||
PREFIX rdfs: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX regorg: <http://www.w3.org/ns/regorg#>
|
||||
PREFIX person: <http://www.w3.org/ns/person#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX organisatie: <https://data.vlaanderen.be/ns/organisatie#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?representatieveOrgaan <http://www.w3.org/ns/org#linkedTo> ?bestuur .
|
||||
?bestuur ?pbestuur ?obestuur .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
VALUES ?bestuur {
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/999b011fe6b90b3b546612c25db4b607> # OP-1980
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/da2184c3dca9eb7c4828a50c0e9f5af4> # OP-1978
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/a6b5c5db3a261ca024a42fe9489496a9> # OP-1979
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/260312c07d8e00358064a362dee3506f> # OP-1977
|
||||
}
|
||||
|
||||
OPTIONAL { ?representatieveOrgaan <http://www.w3.org/ns/org#linkedTo> ?bestuur }
|
||||
|
||||
?bestuur ?pbestuur ?obestuur .
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?primarySite ?pprimarySite ?oprimarySite .
|
||||
?address ?paddress ?oaddress .
|
||||
?contactPoint ?pcontactPoint ?ocontactPoint .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
VALUES ?bestuur {
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/999b011fe6b90b3b546612c25db4b607> # OP-1980
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/da2184c3dca9eb7c4828a50c0e9f5af4> # OP-1978
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/a6b5c5db3a261ca024a42fe9489496a9> # OP-1979
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/260312c07d8e00358064a362dee3506f> # OP-1977
|
||||
}
|
||||
|
||||
OPTIONAL {
|
||||
?bestuur <http://www.w3.org/ns/org#hasPrimarySite> ?primarySite.
|
||||
?primarySite ?pprimarySite ?oprimarySite .
|
||||
|
||||
OPTIONAL {
|
||||
?primarySite <https://data.vlaanderen.be/ns/organisatie#bestaatUit> ?address.
|
||||
?address ?paddress ?oaddress .
|
||||
}
|
||||
|
||||
OPTIONAL {
|
||||
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contactPoint .
|
||||
?contactPoint ?pcontactPoint ?ocontactPoint .
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?identifier ?pidentifier ?oidentifier .
|
||||
?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
VALUES ?bestuur {
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/999b011fe6b90b3b546612c25db4b607> # OP-1980
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/da2184c3dca9eb7c4828a50c0e9f5af4> # OP-1978
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/a6b5c5db3a261ca024a42fe9489496a9> # OP-1979
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/260312c07d8e00358064a362dee3506f> # OP-1977
|
||||
}
|
||||
|
||||
OPTIONAL {
|
||||
?bestuur <http://www.w3.org/ns/adms#identifier> ?identifier .
|
||||
?identifier ?pidentifier ?oidentifier .
|
||||
|
||||
OPTIONAL {
|
||||
?identifier <https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator> ?structuredIdentifier.
|
||||
?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier .
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
# Clean reminiscences
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?s ?p ?o .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
VALUES ?o {
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/999b011fe6b90b3b546612c25db4b607> # OP-1980
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/da2184c3dca9eb7c4828a50c0e9f5af4> # OP-1978
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/a6b5c5db3a261ca024a42fe9489496a9> # OP-1979
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/260312c07d8e00358064a362dee3506f> # OP-1977
|
||||
}
|
||||
|
||||
OPTIONAL{ ?s ?p ?o }
|
||||
}
|
||||
}
|
||||
|
||||
# The associated call to trigger a reindex is :
|
||||
|
||||
# curl --location --request POST '172.20.0.15/update' \
|
||||
# --header 'Content-Type: application/vnd.api+json' \
|
||||
# --data-raw ' [
|
||||
# {
|
||||
# "deletes": [
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/besturenVanDeEredienst/999b011fe6b90b3b546612c25db4b607" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "999b011fe6b90b3b546612c25db4b607" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/besturenVanDeEredienst/da2184c3dca9eb7c4828a50c0e9f5af4" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "da2184c3dca9eb7c4828a50c0e9f5af4" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/besturenVanDeEredienst/a6b5c5db3a261ca024a42fe9489496a9" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "a6b5c5db3a261ca024a42fe9489496a9" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/besturenVanDeEredienst/260312c07d8e00358064a362dee3506f" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "260312c07d8e00358064a362dee3506f" }
|
||||
# }
|
||||
# ],
|
||||
# "inserts": []
|
||||
# }
|
||||
# ]'
|
||||
@@ -0,0 +1,34 @@
|
||||
PREFIX nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#>
|
||||
PREFIX dct: <http://purl.org/dc/terms/>
|
||||
PREFIX dcat: <http://www.w3.org/ns/dcat#>
|
||||
PREFIX prov: <http://www.w3.org/ns/prov#>
|
||||
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?sub
|
||||
dct:subject <http://data.lblod.info/datasets/delta-producer/dumps/OrganizationsCacheGraphDump> ;
|
||||
dcat:distribution ?distribution.
|
||||
?distribution
|
||||
dct:subject ?file ;
|
||||
dct:created ?created .
|
||||
?phyiscalFile
|
||||
nie:dataSource ?file
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?sub
|
||||
dct:subject <http://data.lblod.info/datasets/delta-producer/dumps/OrganizationsCacheGraphDump> ;
|
||||
dcat:distribution ?distribution.
|
||||
FILTER NOT EXISTS {
|
||||
?revision
|
||||
prov:wasRevisionOf ?sub
|
||||
}
|
||||
?distribution
|
||||
dct:subject ?file ;
|
||||
dct:created ?created .
|
||||
?phyiscalFile
|
||||
nie:dataSource ?file
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
INSERT DATA {
|
||||
GRAPH <http://mu.semte.ch/graphs/accounts/deltas> {
|
||||
<http://data.lblod.info/foaf/account/id/8df6f1e4-869f-4223-9834-961b01a7bd48>
|
||||
a foaf:OnlineAccount.
|
||||
|
||||
<http://data.lblod.info/foaf/agent/id/3d204ad9-3f20-407a-ab40-81a3268d5594>
|
||||
a foaf:Agent;
|
||||
foaf:account <http://data.lblod.info/foaf/account/id/8df6f1e4-869f-4223-9834-961b01a7bd48>.
|
||||
|
||||
<http://data.lblod.info/foaf/group/id/44a6640d-b24d-43e2-a23d-7462f77e0adc>
|
||||
a foaf:Group;
|
||||
foaf:member <http://data.lblod.info/foaf/agent/id/3d204ad9-3f20-407a-ab40-81a3268d5594>;
|
||||
foaf:name "organizations".
|
||||
}
|
||||
}
|
||||
92
config/migrations/2023/20230118093645-fix-non-utf8.sparql
Normal file
92
config/migrations/2023/20230118093645-fix-non-utf8.sparql
Normal file
@@ -0,0 +1,92 @@
|
||||
delete {
|
||||
graph <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?s <http://xmlns.com/foaf/0.1/givenName> ?givenName.
|
||||
}
|
||||
}
|
||||
|
||||
insert {
|
||||
graph <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?s <http://xmlns.com/foaf/0.1/givenName> "André".
|
||||
}
|
||||
}
|
||||
|
||||
where {
|
||||
graph <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?s <http://xmlns.com/foaf/0.1/givenName> ?givenName.
|
||||
|
||||
FILTER (?s in(
|
||||
<http://data.lblod.info/id/personen/6246DD30D5CA8D65E42B3030>,
|
||||
<http://data.lblod.info/id/personen/635BD7518DE5818A7C9F4313>,
|
||||
<http://data.lblod.info/id/personen/6246DDA3D5CA8D65E42B3031>,
|
||||
<http://data.lblod.info/id/personen/62384F97B72F9F4B33508056>,
|
||||
<http://data.lblod.info/id/personen/623993F1B72F9F4B3350808E>
|
||||
))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# The associated call to trigger a reindex is :
|
||||
|
||||
# curl --location --request POST '172.19.0.23/update' \
|
||||
# --header 'Content-Type: application/vnd.api+json' \
|
||||
# --data-raw ' [
|
||||
# {
|
||||
# "deletes": [
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/6246DD30D5CA8D65E42B3030" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "6246DD30D5CA8D65E42B3030" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/635BD7518DE5818A7C9F4313" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "635BD7518DE5818A7C9F4313" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/6246DDA3D5CA8D65E42B3031" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "6246DDA3D5CA8D65E42B3031" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/62384F97B72F9F4B33508056" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "62384F97B72F9F4B33508056" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/623993F1B72F9F4B3350808E" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "623993F1B72F9F4B3350808E" }
|
||||
# }
|
||||
#
|
||||
# ],
|
||||
# "inserts": [
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/6246DD30D5CA8D65E42B3030" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "6246DD30D5CA8D65E42B3030" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/635BD7518DE5818A7C9F4313" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "635BD7518DE5818A7C9F4313" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/6246DDA3D5CA8D65E42B3031" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "6246DDA3D5CA8D65E42B3031" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/62384F97B72F9F4B33508056" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "62384F97B72F9F4B33508056" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/personen/623993F1B72F9F4B3350808E" },
|
||||
# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" },
|
||||
# "object": { "type": "string", "value": "623993F1B72F9F4B3350808E" }
|
||||
# }
|
||||
#
|
||||
#
|
||||
# ]
|
||||
# }
|
||||
# ]'
|
||||
@@ -0,0 +1,10 @@
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?s ?p "".
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH ?g {
|
||||
?s ?p "".
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
|
||||
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/e357bc8f4cc3a694fde2239748768a22> . # Eerste Imam in rang
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/5ebb798bd59c3b48c25116032caa02b7> . # Derde Imam in rang
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
VALUES ?rolBedienaar {
|
||||
<http://data.lblod.info/id/rollenBedienaar/6332F95A036B579F0A26FF39> # OP-2045
|
||||
<http://data.lblod.info/id/rollenBedienaar/63515D0E8DE5818A7C9F41B6> # OP-2046
|
||||
}
|
||||
?rolBedienaar org:holds ?role .
|
||||
?role ere:functie <http://lblod.data.gift/concepts/e357bc8f4cc3a694fde2239748768a22> .
|
||||
}
|
||||
}
|
||||
;
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/c4a3fd586211b17b06f574885e23f355> . # Tweede Imam in rang
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/5ebb798bd59c3b48c25116032caa02b7> . # Derde Imam in rang
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/rollenBedienaar/63515DDE8DE5818A7C9F41BB> org:holds ?role . # OP-2046
|
||||
?role ere:functie <http://lblod.data.gift/concepts/c4a3fd586211b17b06f574885e23f355> .
|
||||
}
|
||||
}
|
||||
;
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2> . # Priester
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/04d3b5325f2ebc5eaf96849519af4254> . # Rector
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
VALUES ?rolBedienaar {
|
||||
<http://data.lblod.info/id/rollenBedienaar/633309B8036B579F0A26FF4D> # OP-2056
|
||||
<http://data.lblod.info/id/rollenBedienaar/6308BA29BB4106FB970C4D15> # OP-2057
|
||||
<http://data.lblod.info/id/rollenBedienaar/633308FD036B579F0A26FF48> # OP-2060
|
||||
}
|
||||
?rolBedienaar org:holds ?role .
|
||||
?role ere:functie <http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2> .
|
||||
}
|
||||
}
|
||||
|
||||
# The associated call to trigger a reindex is :
|
||||
|
||||
# curl --location --request POST '172.26.0.28/update' \
|
||||
# --header 'Content-Type: application/vnd.api+json' \
|
||||
# --data-raw ' [
|
||||
# {
|
||||
# "deletes": [
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/63515D0E8DE5818A7C9F41B5" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/e357bc8f4cc3a694fde2239748768a22" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/6332F959036B579F0A26FF38" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/e357bc8f4cc3a694fde2239748768a22" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/63515DDE8DE5818A7C9F41BA" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/c4a3fd586211b17b06f574885e23f355" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/6308BA29BB4106FB970C4D14" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/633308FC036B579F0A26FF47" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/633309B8036B579F0A26FF4C" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2" }
|
||||
# }
|
||||
# ],
|
||||
# "inserts": [
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/63515D0E8DE5818A7C9F41B5" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/5ebb798bd59c3b48c25116032caa02b7" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/6332F959036B579F0A26FF38" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/5ebb798bd59c3b48c25116032caa02b7" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/63515DDE8DE5818A7C9F41BA" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/5ebb798bd59c3b48c25116032caa02b7" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/6308BA29BB4106FB970C4D14" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/04d3b5325f2ebc5eaf96849519af4254" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/633308FC036B579F0A26FF47" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/04d3b5325f2ebc5eaf96849519af4254" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/633309B8036B579F0A26FF4C" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" },
|
||||
# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/04d3b5325f2ebc5eaf96849519af4254" }
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
# ]'
|
||||
@@ -0,0 +1,19 @@
|
||||
# We already had betrokken lokale besturen entered for some CB.
|
||||
# Too keep data aligned with the other applications (Loket, CVP etc), we first flush them
|
||||
# before re-adding only the necessary ones
|
||||
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?localInvolvement ?plocalInvolvement ?olocalInvolvement .
|
||||
?bestuur <http://data.lblod.info/vocabularies/erediensten/betrokkenBestuur> ?localInvolvement .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
?centraalBestuur a <http://data.lblod.info/vocabularies/erediensten/CentraalBestuurVanDeEredienst> .
|
||||
|
||||
?localInvolvement <http://www.w3.org/ns/org#organization> ?centraalBestuur ;
|
||||
?plocalInvolvement ?olocalInvolvement .
|
||||
|
||||
?bestuur <http://data.lblod.info/vocabularies/erediensten/betrokkenBestuur> ?localInvolvement .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
http://mu.semte.ch/graphs/organisatieportaal
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
# MOVE SILENT <http://redpencil.data.gift/id/deltas/producer/organizationsdeltas> <http://redpencil.data.gift/id/deltas/producer/organizations-deltas>
|
||||
DELETE { GRAPH <http://redpencil.data.gift/id/deltas/producer/organizationsdeltas> { ?s ?p ?o } }
|
||||
INSERT { GRAPH <http://redpencil.data.gift/id/deltas/producer/organizations-deltas> { ?s ?p ?o } }
|
||||
WHERE { GRAPH <http://redpencil.data.gift/id/deltas/producer/organizationsdeltas> { ?s ?p ?o } }
|
||||
@@ -0,0 +1,67 @@
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX locn: <http://www.w3.org/ns/locn#>
|
||||
PREFIX schema: <http://schema.org/>
|
||||
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
|
||||
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?rolBedienaar ?pRolBedienaar ?oRolBedienaar .
|
||||
?contactPoint ?pContactPoint ?ocontactPoint .
|
||||
?address ?pAddress ?oAddress .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
VALUES ?rolBedienaar {
|
||||
<http://data.lblod.info/id/rollenBedienaar/6332F770036B579F0A26FF2F> # OP-2043
|
||||
<http://data.lblod.info/id/rollenBedienaar/6332F6C9036B579F0A26FF2A> # OP-2043
|
||||
<http://data.lblod.info/id/rollenBedienaar/6332F7FB036B579F0A26FF34> # OP-2043
|
||||
<http://data.lblod.info/id/rollenBedienaar/638F083FA742F4FD4AB55907> # OP-2047
|
||||
}
|
||||
|
||||
?rolBedienaar rdf:type ere:RolBedienaar ;
|
||||
schema:contactPoint ?contactPoint ;
|
||||
?pRolBedienaar ?oRolBedienaar .
|
||||
|
||||
?contactPoint locn:address ?address ;
|
||||
?pContactPoint ?ocontactPoint .
|
||||
|
||||
?address ?pAddress ?oAddress .
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
# The associated call to trigger a reindex is :
|
||||
|
||||
# curl --location --request POST '172.22.0.30/update' \
|
||||
# --header 'Content-Type: application/vnd.api+json' \
|
||||
# --data-raw ' [
|
||||
# {
|
||||
# "deletes": [
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/rollenBedienaar/6332F770036B579F0A26FF2F" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/ns/org#heldBy" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/6332F6FD036B579F0A26FF2B" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/rollenBedienaar/6332F6C9036B579F0A26FF2A" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/ns/org#heldBy" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/6332F648036B579F0A26FF26" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/rollenBedienaar/6332F7FB036B579F0A26FF34" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/ns/org#heldBy" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/6332F7AF036B579F0A26FF30" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/rollenBedienaar/638F083FA742F4FD4AB55907" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/ns/org#heldBy" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/638F07A6A742F4FD4AB55903" }
|
||||
# }
|
||||
# ],
|
||||
# "inserts": []
|
||||
# }
|
||||
# ]'
|
||||
@@ -0,0 +1,59 @@
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX schema: <http://schema.org/>
|
||||
PREFIX locn: <http://www.w3.org/ns/locn#>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?mandatarissen ?pMandatarissen ?oMandatarissen .
|
||||
?mandaat ?pMandaat ?oMandaat .
|
||||
?person ?pPerson ?oPerson .
|
||||
?contactPoint ?pContactPoint ?oContactPoint .
|
||||
?address ?pAddress ?oAddress .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
VALUES ?mandatarissen {
|
||||
<http://data.lblod.info/id/mandatarissen/807a3e07c95fe40962d64695069af946> #1
|
||||
<http://data.lblod.info/id/mandatarissen/40ed3cb19f9fa33e47b39016780dce1d> #2
|
||||
}
|
||||
|
||||
?mandatarissen org:holds ?mandaat ;
|
||||
mandaat:isBestuurlijkeAliasVan ?person ;
|
||||
?pMandatarissen ?oMandatarissen .
|
||||
|
||||
OPTIONAL {
|
||||
?mandatarissen schema:contactPoint ?contactPoint .
|
||||
OPTIONAL {
|
||||
?contactPoint locn:address ?address ;
|
||||
?pContactPoint ?oContactPoint .
|
||||
?address ?pAddress ?oAddress .
|
||||
}
|
||||
}
|
||||
|
||||
?person ?pPerson ?oPerson .
|
||||
?mandaat ?pMandaat ?oMandaat .
|
||||
}
|
||||
}
|
||||
|
||||
# An associated call to trigger a reindex is:
|
||||
|
||||
# curl --location --request POST '172.32.0.21/update' \
|
||||
# --header 'Content-Type: application/vnd.api+json' \
|
||||
# --data-raw ' [
|
||||
# {
|
||||
# "deletes": [
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/mandatarissen/807a3e07c95fe40962d64695069af946" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/620523C451BFC225E4ECFA97" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/mandatarissen/40ed3cb19f9fa33e47b39016780dce1d" },
|
||||
# "predicate": { "type": "uri", "value": "http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/620523C451BFC225E4ECFA97" }
|
||||
# }
|
||||
# ],
|
||||
# "inserts": []
|
||||
# }
|
||||
# ]'
|
||||
@@ -0,0 +1,35 @@
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
|
||||
# OP-2070
|
||||
INSERT DATA {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
<http://data.lblod.info/id/bestuursorganen/56c71a29-bff0-4b67-804d-2c98fd4bd10f> a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan>;
|
||||
mu:uuid "56c71a29-bff0-4b67-804d-2c98fd4bd10f";
|
||||
besluit:bestuurt <http://data.lblod.info/id/besturenVanDeEredienst/6232329df9377210c3576b17e116de8b>;
|
||||
org:classification <http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/b475fa47e17a8a05ae04a9e1fb9c9258>.
|
||||
<http://data.lblod.info/id/bestuursorganen/54f16d44-2f2c-45df-83c1-5a9fbe4756ca> a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan>;
|
||||
mu:uuid "54f16d44-2f2c-45df-83c1-5a9fbe4756ca";
|
||||
generiek:isTijdspecialisatieVan <http://data.lblod.info/id/bestuursorganen/56c71a29-bff0-4b67-804d-2c98fd4bd10f> .
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
# OP-2084
|
||||
|
||||
INSERT DATA {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
<http://data.lblod.info/id/bestuursorganen/1179426b-69d4-4974-8aa2-c4d46a22c9cc> a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan>;
|
||||
mu:uuid "1179426b-69d4-4974-8aa2-c4d46a22c9cc";
|
||||
besluit:bestuurt <http://data.lblod.info/id/besturenVanDeEredienst/88cc9ab83a5a94caeb2f4b04615b20f2>;
|
||||
org:classification <http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/b475fa47e17a8a05ae04a9e1fb9c9258>.
|
||||
<http://data.lblod.info/id/bestuursorganen/b3db6a8d-d6cb-4b78-af87-b80dfda580c7> a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan>;
|
||||
mu:uuid "b3db6a8d-d6cb-4b78-af87-b80dfda580c7";
|
||||
generiek:isTijdspecialisatieVan <http://data.lblod.info/id/bestuursorganen/1179426b-69d4-4974-8aa2-c4d46a22c9cc> .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
|
||||
PREFIX code: <http://lblod.data.gift/vocabularies/organisatie/>
|
||||
|
||||
INSERT DATA {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
<http://lblod.data.info/id/veranderingsgebeurtenis-resultaten/0b2f1b62-a15d-11ed-a8fc-0242ac120002>
|
||||
rdf:type code:VeranderingsgebeurtenisResultaat;
|
||||
mu:uuid "0b2f1b62-a15d-11ed-a8fc-0242ac120002" ;
|
||||
code:resulterendeStatus <http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> ;
|
||||
ext:resultingOrganization <http://data.lblod.info/id/bestuurseenheden/25b05f670144f166a485a1d0ac37faca672b36642cf1647d846010d6fe9cabb5> .
|
||||
|
||||
<http://data.lblod.info/id/veranderingsgebeurtenissen/63D7E7E07A8167ED439EC88E>
|
||||
rdf:type org:ChangeEvent ;
|
||||
mu:uuid "63D7E7E07A8167ED439EC88E" ;
|
||||
ch:typeWijziging <http://lblod.data.gift/concepts/e4c3d1ef-a34d-43b0-a18c-f4e60e2c8af3> ;
|
||||
org:resultingOrganization <http://data.lblod.info/id/bestuurseenheden/25b05f670144f166a485a1d0ac37faca672b36642cf1647d846010d6fe9cabb5> ;
|
||||
org:originalOrganization <http://data.lblod.info/id/bestuurseenheden/25b05f670144f166a485a1d0ac37faca672b36642cf1647d846010d6fe9cabb5> ;
|
||||
code:veranderingsgebeurtenisResultaat <http://lblod.data.info/id/veranderingsgebeurtenis-resultaten/0b2f1b62-a15d-11ed-a8fc-0242ac120002> .
|
||||
|
||||
}
|
||||
}
|
||||
25
config/migrations/2023/20230131172200-delete-region.sparql
Normal file
25
config/migrations/2023/20230131172200-delete-region.sparql
Normal file
@@ -0,0 +1,25 @@
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
?werkingsgebied geo:sfWithin ?locatie .
|
||||
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
VALUES ?bestuurseenheid {
|
||||
<http://data.lblod.info/id/bestuurseenheden/9b93ff5308590c7d03c97c3b892910f912e695ad45c82465934996fb04dac859> # OP-2033
|
||||
<http://data.lblod.info/id/bestuurseenheden/25b05f670144f166a485a1d0ac37faca672b36642cf1647d846010d6fe9cabb5> # OP-1994
|
||||
}
|
||||
|
||||
?bestuurseenheid rdf:type besluit:Bestuurseenheid ;
|
||||
besluit:werkingsgebied ?werkingsgebied .
|
||||
|
||||
?werkingsgebied geo:sfWithin ?locatie .
|
||||
|
||||
}
|
||||
}
|
||||
33
config/reasoner/dl2op/main-info/inverse_relations.n3
Normal file
33
config/reasoner/dl2op/main-info/inverse_relations.n3
Normal file
@@ -0,0 +1,33 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# Inverse properties
|
||||
{
|
||||
?s org:holds ?o.
|
||||
} => {
|
||||
?o org:heldBy ?s.
|
||||
}.
|
||||
|
||||
{
|
||||
?s org:heldBy ?o.
|
||||
} => {
|
||||
?o org:holds ?s.
|
||||
}.
|
||||
150
config/reasoner/dl2op/main-info/mapping.n3
Normal file
150
config/reasoner/dl2op/main-info/mapping.n3
Normal file
@@ -0,0 +1,150 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# DL and OP both use persoon:gebruikteVoornaam but with different semantics (!)
|
||||
# Hence the mapping is in two steps.
|
||||
# The first step maps the DL persoon:gebruikteVoornaam to the OP counterpart
|
||||
# and drops the DL persoon:gebruikteVoornaam statements with e:becomes
|
||||
# A second reasoning will map DL foaf:name to OP persoon:gebruikteVoornaam
|
||||
# Doing both at once would lead all DL foaf:names to incorrectly become foaf:givennames
|
||||
# in OP
|
||||
|
||||
# First name
|
||||
# persoon:gebruikteVoornaam => foaf:givenName
|
||||
# Alternatieve voornaam
|
||||
# foaf:name => persoon:gebruikteVoornaam
|
||||
|
||||
# Test Mock DL
|
||||
# <http://example.org/person> persoon_loket:gebruikteVoornaam "Didier".
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gebruikteVoornaam ?o
|
||||
} e:becomes {
|
||||
?s foaf:givenName ?o
|
||||
}
|
||||
} => {
|
||||
?s foaf:givenName ?o
|
||||
}.
|
||||
|
||||
|
||||
# First name
|
||||
# persoon:gebruikteVoornaam => foaf:givenName (done in pre-processing)
|
||||
# Alternatieve voornaam
|
||||
# foaf:name => persoon:gebruikteVoornaam
|
||||
|
||||
# Test Mock LLB
|
||||
# <http://example.org/person> foaf:name "Didier".
|
||||
{
|
||||
{
|
||||
?s foaf:name ?o
|
||||
} e:becomes {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}.
|
||||
|
||||
# Test
|
||||
# ex:s <http://data.vlaanderen.be/ns/mandaat#start> "2019-01-01T19:32:52+00:00"^^xsd:dateTime.
|
||||
{
|
||||
?s mandaat:start ?startDateTime.
|
||||
# use backward arrow rule defined below
|
||||
?startDateTime :dateFromDateTime ?startDate.
|
||||
{
|
||||
?s mandaat:start ?startDateTime
|
||||
} e:becomes {
|
||||
?s mandaat:start ?startDate
|
||||
}.
|
||||
} => {
|
||||
?s mandaat:start ?startDate
|
||||
}.
|
||||
|
||||
# ex:s <http://data.vlaanderen.be/ns/mandaat#einde> "2019-02-01T10:32:52+00:00"^^xsd:dateTime.
|
||||
{
|
||||
?s mandaat:einde ?eindeDateTime.
|
||||
# use backward arrow rule defined below
|
||||
?eindeDateTime :dateFromDateTime ?eindeDate.
|
||||
{
|
||||
?s mandaat:einde ?eindeDateTime
|
||||
} e:becomes {
|
||||
?s mandaat:einde ?eindeDate
|
||||
}.
|
||||
} => {
|
||||
?s mandaat:einde ?eindeDate
|
||||
}.
|
||||
|
||||
|
||||
# Backward arrow rule is like a function call.
|
||||
# Removes time info in the returned date
|
||||
# The user in DL selects a date via the UI.
|
||||
# These dates are persisted as midnight dateTimes in UTC.
|
||||
# Meaning that 1st of July is stored as
|
||||
# "2022-06-30T22:00:00Z"^^xsd:dateTime
|
||||
# and 1 December
|
||||
# "2022-11-30T23:00:00Z"^^xsd:dateTime
|
||||
# So, the following rule adds 2 hours to the datetime, and then takes the date part of the UTC date time
|
||||
# to come to the date that the DL user selected (in CE(S)T)
|
||||
{
|
||||
?dateTime :dateFromDateTime ?date
|
||||
} <= {
|
||||
(?dateTimeLiteral xsd:dateTime) log:dtlit ?dateTime.
|
||||
(?dateTime "PT2H"^^xsd:dayTimeDuration) func:add-dayTimeDuration-to-dateTime ?localDateTime.
|
||||
(?localDateTimeLiteral xsd:dateTime) log:dtlit ?localDateTime.
|
||||
(?localDateTimeLiteral 0 11) func:substring ?dateLiteral.
|
||||
(?dateLiteral xsd:date) log:dtlit ?date.
|
||||
}.
|
||||
|
||||
|
||||
# ex:orgA besluit:classificatie <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002>.
|
||||
{
|
||||
{
|
||||
?s besluit:classificatie ?o
|
||||
} e:becomes {
|
||||
?s org:classification ?o
|
||||
}
|
||||
} => {
|
||||
?s org:classification ?o
|
||||
}.
|
||||
|
||||
# fix typo V -> v
|
||||
# <http://data.lblod.info/id/adressen/606D972BC20E70000900001C> <https://data.vlaanderen.be/ns/adres#AdresVoorstelling.huisnummer> "1" .
|
||||
{
|
||||
{
|
||||
?s adres:AdresVoorstelling.huisnummer ?o
|
||||
} e:becomes {
|
||||
?s adres:Adresvoorstelling.huisnummer ?o
|
||||
}
|
||||
} => {
|
||||
?s adres:Adresvoorstelling.huisnummer ?o
|
||||
}.
|
||||
|
||||
|
||||
# Tijdspecialisatie
|
||||
{
|
||||
{
|
||||
?s mandaat:isTijdspecialisatieVan ?o.
|
||||
} e:becomes {
|
||||
?s generiek:isTijdspecialisatieVan ?o.
|
||||
}
|
||||
} => {
|
||||
?s generiek:isTijdspecialisatieVan ?o.
|
||||
}.
|
||||
534
config/reasoner/dl2op/main-info/persoon_http_to_https.n3
Normal file
534
config/reasoner/dl2op/main-info/persoon_http_to_https.n3
Normal file
@@ -0,0 +1,534 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# Map from http persoon to https persoon namespace.
|
||||
|
||||
## classes:
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Afstamming
|
||||
} e:becomes {
|
||||
?s a persoon:Afstamming
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Afstamming
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:BurgerlijkeStaat
|
||||
} e:becomes {
|
||||
?s a persoon:BurgerlijkeStaat
|
||||
}
|
||||
} => {
|
||||
?s a persoon:BurgerlijkeStaat
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Domicilie
|
||||
} e:becomes {
|
||||
?s a persoon:Domicilie
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Domicilie
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Geboorte
|
||||
} e:becomes {
|
||||
?s a persoon:Geboorte
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Geboorte
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:GeenInwoner
|
||||
} e:becomes {
|
||||
?s a persoon:GeenInwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:GeenInwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:GeregistreerdPersoon
|
||||
} e:becomes {
|
||||
?s a persoon:GeregistreerdPersoon
|
||||
}
|
||||
} => {
|
||||
?s a persoon:GeregistreerdPersoon
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Gezin
|
||||
} e:becomes {
|
||||
?s a persoon:Gezin
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Gezin
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Gezinsrelatie
|
||||
} e:becomes {
|
||||
?s a persoon:Gezinsrelatie
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Gezinsrelatie
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Huwelijk
|
||||
} e:becomes {
|
||||
?s a persoon:Huwelijk
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Huwelijk
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Inwoner
|
||||
} e:becomes {
|
||||
?s a persoon:Inwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Inwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Inwonerschap
|
||||
} e:becomes {
|
||||
?s a persoon:Inwonerschap
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Inwonerschap
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Nationaliteit
|
||||
} e:becomes {
|
||||
?s a persoon:Nationaliteit
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Nationaliteit
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Overlijden
|
||||
} e:becomes {
|
||||
?s a persoon:Overlijden
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Overlijden
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:PermanentInwoner
|
||||
} e:becomes {
|
||||
?s a persoon:PermanentInwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:PermanentInwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Persoonsgebeurtenis
|
||||
} e:becomes {
|
||||
?s a persoon:Persoonsgebeurtenis
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Persoonsgebeurtenis
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Persoonsrelatie
|
||||
} e:becomes {
|
||||
?s a persoon:Persoonsrelatie
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Persoonsrelatie
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Samenwonen
|
||||
} e:becomes {
|
||||
?s a persoon:Samenwonen
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Samenwonen
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Staatsburger
|
||||
} e:becomes {
|
||||
?s a persoon:Staatsburger
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Staatsburger
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Staatsburgerschap
|
||||
} e:becomes {
|
||||
?s a persoon:Staatsburgerschap
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Staatsburgerschap
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:TijdelijkInwoner
|
||||
} e:becomes {
|
||||
?s a persoon:TijdelijkInwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:TijdelijkInwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Verblijfplaats
|
||||
} e:becomes {
|
||||
?s a persoon:Verblijfplaats
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Verblijfplaats
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Voogdij
|
||||
} e:becomes {
|
||||
?s a persoon:Voogdij
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Voogdij
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Vreemdeling
|
||||
} e:becomes {
|
||||
?s a persoon:Vreemdeling
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Vreemdeling
|
||||
}.
|
||||
|
||||
## properties
|
||||
{
|
||||
{
|
||||
?s persoon_loket:afstammingsType ?o
|
||||
} e:becomes {
|
||||
?s persoon:afstammingsType ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:afstammingsType ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:alternatieveNaam ?o
|
||||
} e:becomes {
|
||||
?s persoon:alternatieveNaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:alternatieveNaam ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:datum ?o
|
||||
} e:becomes {
|
||||
?s persoon:datum ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:datum ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:datumVanAfstamming ?o
|
||||
} e:becomes {
|
||||
?s persoon:datumVanAfstamming ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:datumVanAfstamming ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gebruikteVoornaam ?o
|
||||
} e:becomes {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:geslacht ?o
|
||||
} e:becomes {
|
||||
?s persoon:geslacht ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:geslacht ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gezinsadres ?o
|
||||
} e:becomes {
|
||||
?s persoon:gezinsadres ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gezinsadres ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gezinsrelatietype ?o
|
||||
} e:becomes {
|
||||
?s persoon:gezinsrelatietype ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gezinsrelatietype ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftBurgerlijkeStaat ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftBurgerlijkeStaat ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftBurgerlijkeStaat ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftGeboorte ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftGeboorte ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftGeboorte ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftInwonerschap ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftInwonerschap ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftInwonerschap ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftNationaliteit ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftNationaliteit ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftNationaliteit ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftOverlijden ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftOverlijden ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftOverlijden ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftPersoonsrelatie ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftPersoonsrelatie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftPersoonsrelatie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftStaatsburgerschap ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftStaatsburgerschap ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftStaatsburgerschap ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftVerblijfplaats ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftVerblijfplaats ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftVerblijfplaats ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:Inwonerschap.binnenJurisdictie ?o
|
||||
} e:becomes {
|
||||
?s persoon:Inwonerschap.binnenJurisdictie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:Inwonerschap.binnenJurisdictie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:isHoofdVan ?o
|
||||
} e:becomes {
|
||||
?s persoon:isHoofdVan ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:isHoofdVan ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:isLidVan ?o
|
||||
} e:becomes {
|
||||
?s persoon:isLidVan ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:isLidVan ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:isRelatieMet ?o
|
||||
} e:becomes {
|
||||
?s persoon:isRelatieMet ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:isRelatieMet ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:land ?o
|
||||
} e:becomes {
|
||||
?s persoon:land ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:land ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:nationaliteit ?o
|
||||
} e:becomes {
|
||||
?s persoon:nationaliteit ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:nationaliteit ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:plaats ?o
|
||||
} e:becomes {
|
||||
?s persoon:plaats ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:plaats ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:registratie ?o
|
||||
} e:becomes {
|
||||
?s persoon:registratie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:registratie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:Staatsburgerschap.binnenJurisdictie ?o
|
||||
} e:becomes {
|
||||
?s persoon:Staatsburgerschap.binnenJurisdictie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:Staatsburgerschap.binnenJurisdictie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:type ?o
|
||||
} e:becomes {
|
||||
?s persoon:type ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:type ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:verblijfsadres ?o
|
||||
} e:becomes {
|
||||
?s persoon:verblijfsadres ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:verblijfsadres ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:volledigeNaam ?o
|
||||
} e:becomes {
|
||||
?s persoon:volledigeNaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:volledigeNaam ?o
|
||||
}.
|
||||
538
config/reasoner/dl2op/main-info/query.n3q
Normal file
538
config/reasoner/dl2op/main-info/query.n3q
Normal file
@@ -0,0 +1,538 @@
|
||||
# Generated by producer-config-to-query.ipynb
|
||||
|
||||
## CLASSES
|
||||
{
|
||||
?s a <http://data.lblod.info/vocabularies/contacthub/AgentInPositie>
|
||||
} => {
|
||||
?s a <http://data.lblod.info/vocabularies/contacthub/AgentInPositie>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.lblod.info/vocabularies/erediensten/EredienstMandataris>
|
||||
} => {
|
||||
?s a <http://data.lblod.info/vocabularies/erediensten/EredienstMandataris>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.lblod.info/vocabularies/erediensten/RolBedienaar>
|
||||
} => {
|
||||
?s a <http://data.lblod.info/vocabularies/erediensten/RolBedienaar>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Bestuursfunctie>
|
||||
} => {
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Bestuursfunctie>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris>
|
||||
} => {
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/FunctionarisStatusCode>
|
||||
} => {
|
||||
?s a <http://data.lblod.info/vocabularies/leidinggevenden/FunctionarisStatusCode>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.vlaanderen.be/ns/besluit#Bestuurseenheid>
|
||||
} => {
|
||||
?s a <http://data.vlaanderen.be/ns/besluit#Bestuurseenheid>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan>
|
||||
} => {
|
||||
?s a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Fractie>
|
||||
} => {
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Fractie>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandaat>
|
||||
} => {
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandaat>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandataris>
|
||||
} => {
|
||||
?s a <http://data.vlaanderen.be/ns/mandaat#Mandataris>
|
||||
}.
|
||||
|
||||
# {
|
||||
# ?s a <https://data.vlaanderen.be/ns/persoon#Geboorte>
|
||||
# } => {
|
||||
# ?s a <https://data.vlaanderen.be/ns/persoon#Geboorte>
|
||||
# }.
|
||||
|
||||
{
|
||||
?s a <http://mu.semte.ch/vocabularies/ext/BeleidsdomeinCode>
|
||||
} => {
|
||||
?s a <http://mu.semte.ch/vocabularies/ext/BeleidsdomeinCode>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://mu.semte.ch/vocabularies/ext/BestuurseenheidClassificatieCode>
|
||||
} => {
|
||||
?s a <http://mu.semte.ch/vocabularies/ext/BestuurseenheidClassificatieCode>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://mu.semte.ch/vocabularies/ext/BestuursfunctieCode>
|
||||
} => {
|
||||
?s a <http://mu.semte.ch/vocabularies/ext/BestuursfunctieCode>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://mu.semte.ch/vocabularies/ext/BestuursorgaanClassificatieCode>
|
||||
} => {
|
||||
?s a <http://mu.semte.ch/vocabularies/ext/BestuursorgaanClassificatieCode>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://mu.semte.ch/vocabularies/ext/MandatarisStatusCode>
|
||||
} => {
|
||||
?s a <http://mu.semte.ch/vocabularies/ext/MandatarisStatusCode>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://schema.org/ContactPoint>
|
||||
} => {
|
||||
?s a <http://schema.org/ContactPoint>
|
||||
}.
|
||||
|
||||
# {
|
||||
# ?s a <http://www.w3.org/ns/adms#Identifier>
|
||||
# } => {
|
||||
# ?s a <http://www.w3.org/ns/adms#Identifier>
|
||||
# }.
|
||||
|
||||
{
|
||||
?s a <http://www.w3.org/ns/locn#Address>
|
||||
} => {
|
||||
?s a <http://www.w3.org/ns/locn#Address>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://www.w3.org/ns/org#Membership>
|
||||
} => {
|
||||
?s a <http://www.w3.org/ns/org#Membership>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://www.w3.org/ns/person#Person>
|
||||
} => {
|
||||
?s a <http://www.w3.org/ns/person#Person>
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://www.w3.org/ns/prov#Location>
|
||||
} => {
|
||||
?s a <http://www.w3.org/ns/prov#Location>
|
||||
}.
|
||||
|
||||
## PROPERTIES
|
||||
{
|
||||
?s <http://data.lblod.info/vocabularies/contacthub/eindedatum> ?o
|
||||
} => {
|
||||
?s <http://data.lblod.info/vocabularies/contacthub/eindedatum> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.lblod.info/vocabularies/contacthub/startdatum> ?o
|
||||
} => {
|
||||
?s <http://data.lblod.info/vocabularies/contacthub/startdatum> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.lblod.info/vocabularies/erediensten/geplandeEinddatumAanstelling> ?o
|
||||
} => {
|
||||
?s <http://data.lblod.info/vocabularies/erediensten/geplandeEinddatumAanstelling> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.lblod.info/vocabularies/leidinggevenden/adresRegisterId> ?o
|
||||
} => {
|
||||
?s <http://data.lblod.info/vocabularies/leidinggevenden/adresRegisterId> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie> ?o
|
||||
} => {
|
||||
?s <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/besluit#bestuurt> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/besluit#bestuurt> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/besluit#werkingsgebied> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/besluit#werkingsgebied> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#aantalHouders> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#aantalHouders> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#beleidsdomein> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#beleidsdomein> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#bindingEinde> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#bindingEinde> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#bindingStart> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#bindingStart> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#einde> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#einde> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#isTijdelijkVervangenDoor> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#isTijdelijkVervangenDoor> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#rangorde> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#rangorde> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#start> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#start> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#status> ?o
|
||||
} => {
|
||||
?s <http://data.vlaanderen.be/ns/mandaat#status> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?o
|
||||
} => {
|
||||
?s <https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?o
|
||||
}.
|
||||
|
||||
# {
|
||||
# ?s <https://data.vlaanderen.be/ns/persoon#datum> ?o
|
||||
# } => {
|
||||
# ?s <https://data.vlaanderen.be/ns/persoon#datum> ?o
|
||||
# }.
|
||||
|
||||
{
|
||||
?s <https://data.vlaanderen.be/ns/persoon#gebruikteVoornaam> ?o
|
||||
} => {
|
||||
?s <https://data.vlaanderen.be/ns/persoon#gebruikteVoornaam> ?o
|
||||
}.
|
||||
|
||||
# {
|
||||
# ?s <https://data.vlaanderen.be/ns/persoon#geslacht> ?o
|
||||
# } => {
|
||||
# ?s <https://data.vlaanderen.be/ns/persoon#geslacht> ?o
|
||||
# }.
|
||||
|
||||
# {
|
||||
# ?s <https://data.vlaanderen.be/ns/persoon#heeftGeboorte> ?o
|
||||
# } => {
|
||||
# ?s <https://data.vlaanderen.be/ns/persoon#heeftGeboorte> ?o
|
||||
# }.
|
||||
|
||||
# {
|
||||
# ?s <https://data.vlaanderen.be/ns/persoon#heeftNationaliteit> ?o
|
||||
# } => {
|
||||
# ?s <https://data.vlaanderen.be/ns/persoon#heeftNationaliteit> ?o
|
||||
# }.
|
||||
|
||||
{
|
||||
?s <http://mu.semte.ch/vocabularies/core/uuid> ?o
|
||||
} => {
|
||||
?s <http://mu.semte.ch/vocabularies/core/uuid> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://mu.semte.ch/vocabularies/ext/secondaryContactPoint> ?o
|
||||
} => {
|
||||
?s <http://mu.semte.ch/vocabularies/ext/secondaryContactPoint> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://mu.semte.ch/vocabularies/ext/werkingsgebiedNiveau> ?o
|
||||
} => {
|
||||
?s <http://mu.semte.ch/vocabularies/ext/werkingsgebiedNiveau> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://schema.org/contactPoint> ?o
|
||||
} => {
|
||||
?s <http://schema.org/contactPoint> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://schema.org/contactType> ?o
|
||||
} => {
|
||||
?s <http://schema.org/contactType> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://schema.org/email> ?o
|
||||
} => {
|
||||
?s <http://schema.org/email> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://schema.org/faxNumber> ?o
|
||||
} => {
|
||||
?s <http://schema.org/faxNumber> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://schema.org/telephone> ?o
|
||||
} => {
|
||||
?s <http://schema.org/telephone> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://schema.org/url> ?o
|
||||
} => {
|
||||
?s <http://schema.org/url> ?o
|
||||
}.
|
||||
|
||||
# {
|
||||
# ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o
|
||||
# } => {
|
||||
# ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o
|
||||
# }.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/2000/01/rdf-schema#label> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/2000/01/rdf-schema#label> ?o
|
||||
}.
|
||||
|
||||
# {
|
||||
# ?s <http://www.w3.org/2002/07/owl#sameAs> ?o
|
||||
# } => {
|
||||
# ?s <http://www.w3.org/2002/07/owl#sameAs> ?o
|
||||
# }.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/2004/02/skos/core#altLabel> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/2004/02/skos/core#altLabel> ?o
|
||||
}.
|
||||
|
||||
# {
|
||||
# ?s <http://www.w3.org/2004/02/skos/core#notation> ?o
|
||||
# } => {
|
||||
# ?s <http://www.w3.org/2004/02/skos/core#notation> ?o
|
||||
# }.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/2004/02/skos/core#prefLabel> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/2004/02/skos/core#prefLabel> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/2004/02/skos/core#scopeNote> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/2004/02/skos/core#scopeNote> ?o
|
||||
}.
|
||||
|
||||
# {
|
||||
# ?s <http://www.w3.org/ns/adms#identifier> ?o
|
||||
# } => {
|
||||
# ?s <http://www.w3.org/ns/adms#identifier> ?o
|
||||
# }.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/locn#address> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/locn#address> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/locn#addressArea> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/locn#addressArea> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/locn#adminUnit1> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/locn#adminUnit1> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/locn#adminUnit2> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/locn#adminUnit2> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/locn#adminUnitL2> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/locn#adminUnitL2> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/locn#fullAddress> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/locn#fullAddress> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/locn#postCode> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/locn#postCode> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/locn#thoroughfare> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/locn#thoroughfare> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/org#classification> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/org#classification> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/org#hasMembership> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/org#hasMembership> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/org#hasPost> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/org#hasPost> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/org#heldBy> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/org#heldBy> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/org#holds> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/org#holds> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/org#linkedTo> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/org#linkedTo> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/org#memberOf> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/org#memberOf> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/org#organisation> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/org#organisation> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://www.w3.org/ns/org#role> ?o
|
||||
} => {
|
||||
?s <http://www.w3.org/ns/org#role> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://xmlns.com/foaf/0.1/familyName> ?o
|
||||
} => {
|
||||
?s <http://xmlns.com/foaf/0.1/familyName> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <http://xmlns.com/foaf/0.1/givenName> ?o
|
||||
} => {
|
||||
?s <http://xmlns.com/foaf/0.1/givenName> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <https://data.vlaanderen.be/ns/adres#Adresvoorstelling.busnummer> ?o
|
||||
} => {
|
||||
?s <https://data.vlaanderen.be/ns/adres#Adresvoorstelling.busnummer> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <https://data.vlaanderen.be/ns/adres#Adresvoorstelling.huisnummer> ?o
|
||||
} => {
|
||||
?s <https://data.vlaanderen.be/ns/adres#Adresvoorstelling.huisnummer> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <https://data.vlaanderen.be/ns/adres#gemeentenaam> ?o
|
||||
} => {
|
||||
?s <https://data.vlaanderen.be/ns/adres#gemeentenaam> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <https://data.vlaanderen.be/ns/adres#land> ?o
|
||||
} => {
|
||||
?s <https://data.vlaanderen.be/ns/adres#land> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <https://data.vlaanderen.be/ns/adres#postcode> ?o
|
||||
} => {
|
||||
?s <https://data.vlaanderen.be/ns/adres#postcode> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <https://data.vlaanderen.be/ns/adres#verwijstNaar> ?o
|
||||
} => {
|
||||
?s <https://data.vlaanderen.be/ns/adres#verwijstNaar> ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s <https://www.w3.org/ns/regorg#legalName> ?o
|
||||
} => {
|
||||
?s <https://www.w3.org/ns/regorg#legalName> ?o
|
||||
}.
|
||||
|
||||
27
config/reasoner/dl2op/main-info/retract_empty_strings.n3
Normal file
27
config/reasoner/dl2op/main-info/retract_empty_strings.n3
Normal file
@@ -0,0 +1,27 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# Retract empty strings
|
||||
{
|
||||
{
|
||||
?s ?p ""
|
||||
} e:becomes {}.
|
||||
} => {}.
|
||||
62
config/reasoner/dl2op/main-info/rrn.n3
Normal file
62
config/reasoner/dl2op/main-info/rrn.n3
Normal file
@@ -0,0 +1,62 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
|
||||
# Rijksregisternummer
|
||||
# Extend identifiers to match OP's model
|
||||
# <http://example.org/tst#subject> skos:notation "00010100105".
|
||||
{
|
||||
?identifier skos:notation ?notation.
|
||||
?notation string:notEqualIgnoringCase "Rijksregisternummer".
|
||||
?identifier log:uri ?identifierString.
|
||||
(?identifierString "STRUCTURED_IDENTIFIER") string:concatenation ?hashInput.
|
||||
?hashInput crypto:md5 ?uuid.
|
||||
("http://data.lblod.info/id/gestructureerdeIdentificatoren/" ?uuid) string:concatenation ?structuredIdString.
|
||||
?structuredIdentifier log:uri ?structuredIdString.
|
||||
|
||||
{
|
||||
?identifier skos:notation ?notation.
|
||||
} e:becomes {
|
||||
?identifier
|
||||
generiek:gestructureerdeIdentificator ?structuredIdentifier ;
|
||||
skos:notation "Rijksregisternummer" .
|
||||
}.
|
||||
|
||||
} => {
|
||||
?identifier
|
||||
generiek:gestructureerdeIdentificator ?structuredIdentifier ;
|
||||
skos:notation "Rijksregisternummer" .
|
||||
|
||||
?structuredIdentifier a generiek:GestructureerdeIdentificator ;
|
||||
mu:uuid ?uuid ;
|
||||
generiek:lokaleIdentificator ?notation
|
||||
}.
|
||||
|
||||
# identifier property in the export is only used for RRN.
|
||||
{
|
||||
{
|
||||
?s adms:identifier ?o
|
||||
} e:becomes {
|
||||
?s persoon:registratie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:registratie ?o
|
||||
}.
|
||||
33
config/reasoner/dl2op/main/inverse_relations.n3
Normal file
33
config/reasoner/dl2op/main/inverse_relations.n3
Normal file
@@ -0,0 +1,33 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# Inverse properties
|
||||
{
|
||||
?s org:holds ?o.
|
||||
} => {
|
||||
?o org:heldBy ?s.
|
||||
}.
|
||||
|
||||
{
|
||||
?s org:heldBy ?o.
|
||||
} => {
|
||||
?o org:holds ?s.
|
||||
}.
|
||||
150
config/reasoner/dl2op/main/mapping.n3
Normal file
150
config/reasoner/dl2op/main/mapping.n3
Normal file
@@ -0,0 +1,150 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# DL and OP both use persoon:gebruikteVoornaam but with different semantics (!)
|
||||
# Hence the mapping is in two steps.
|
||||
# The first step maps the DL persoon:gebruikteVoornaam to the OP counterpart
|
||||
# and drops the DL persoon:gebruikteVoornaam statements with e:becomes
|
||||
# A second reasoning will map DL foaf:name to OP persoon:gebruikteVoornaam
|
||||
# Doing both at once would lead all DL foaf:names to incorrectly become foaf:givennames
|
||||
# in OP
|
||||
|
||||
# First name
|
||||
# persoon:gebruikteVoornaam => foaf:givenName
|
||||
# Alternatieve voornaam
|
||||
# foaf:name => persoon:gebruikteVoornaam
|
||||
|
||||
# Test Mock DL
|
||||
# <http://example.org/person> persoon_loket:gebruikteVoornaam "Didier".
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gebruikteVoornaam ?o
|
||||
} e:becomes {
|
||||
?s foaf:givenName ?o
|
||||
}
|
||||
} => {
|
||||
?s foaf:givenName ?o
|
||||
}.
|
||||
|
||||
|
||||
# First name
|
||||
# persoon:gebruikteVoornaam => foaf:givenName (done in pre-processing)
|
||||
# Alternatieve voornaam
|
||||
# foaf:name => persoon:gebruikteVoornaam
|
||||
|
||||
# Test Mock LLB
|
||||
# <http://example.org/person> foaf:name "Didier".
|
||||
{
|
||||
{
|
||||
?s foaf:name ?o
|
||||
} e:becomes {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}.
|
||||
|
||||
# Test
|
||||
# ex:s <http://data.vlaanderen.be/ns/mandaat#start> "2019-01-01T19:32:52+00:00"^^xsd:dateTime.
|
||||
{
|
||||
?s mandaat:start ?startDateTime.
|
||||
# use backward arrow rule defined below
|
||||
?startDateTime :dateFromDateTime ?startDate.
|
||||
{
|
||||
?s mandaat:start ?startDateTime
|
||||
} e:becomes {
|
||||
?s mandaat:start ?startDate
|
||||
}.
|
||||
} => {
|
||||
?s mandaat:start ?startDate
|
||||
}.
|
||||
|
||||
# ex:s <http://data.vlaanderen.be/ns/mandaat#einde> "2019-02-01T10:32:52+00:00"^^xsd:dateTime.
|
||||
{
|
||||
?s mandaat:einde ?eindeDateTime.
|
||||
# use backward arrow rule defined below
|
||||
?eindeDateTime :dateFromDateTime ?eindeDate.
|
||||
{
|
||||
?s mandaat:einde ?eindeDateTime
|
||||
} e:becomes {
|
||||
?s mandaat:einde ?eindeDate
|
||||
}.
|
||||
} => {
|
||||
?s mandaat:einde ?eindeDate
|
||||
}.
|
||||
|
||||
|
||||
# Backward arrow rule is like a function call.
|
||||
# Removes time info in the returned date
|
||||
# The user in DL selects a date via the UI.
|
||||
# These dates are persisted as midnight dateTimes in UTC.
|
||||
# Meaning that 1st of July is stored as
|
||||
# "2022-06-30T22:00:00Z"^^xsd:dateTime
|
||||
# and 1 December
|
||||
# "2022-11-30T23:00:00Z"^^xsd:dateTime
|
||||
# So, the following rule adds 2 hours to the datetime, and then takes the date part of the UTC date time
|
||||
# to come to the date that the DL user selected (in CE(S)T)
|
||||
{
|
||||
?dateTime :dateFromDateTime ?date
|
||||
} <= {
|
||||
(?dateTimeLiteral xsd:dateTime) log:dtlit ?dateTime.
|
||||
(?dateTime "PT2H"^^xsd:dayTimeDuration) func:add-dayTimeDuration-to-dateTime ?localDateTime.
|
||||
(?localDateTimeLiteral xsd:dateTime) log:dtlit ?localDateTime.
|
||||
(?localDateTimeLiteral 0 11) func:substring ?dateLiteral.
|
||||
(?dateLiteral xsd:date) log:dtlit ?date.
|
||||
}.
|
||||
|
||||
|
||||
# ex:orgA besluit:classificatie <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002>.
|
||||
{
|
||||
{
|
||||
?s besluit:classificatie ?o
|
||||
} e:becomes {
|
||||
?s org:classification ?o
|
||||
}
|
||||
} => {
|
||||
?s org:classification ?o
|
||||
}.
|
||||
|
||||
# fix typo V -> v
|
||||
# <http://data.lblod.info/id/adressen/606D972BC20E70000900001C> <https://data.vlaanderen.be/ns/adres#AdresVoorstelling.huisnummer> "1" .
|
||||
{
|
||||
{
|
||||
?s adres:AdresVoorstelling.huisnummer ?o
|
||||
} e:becomes {
|
||||
?s adres:Adresvoorstelling.huisnummer ?o
|
||||
}
|
||||
} => {
|
||||
?s adres:Adresvoorstelling.huisnummer ?o
|
||||
}.
|
||||
|
||||
|
||||
# Tijdspecialisatie
|
||||
{
|
||||
{
|
||||
?s mandaat:isTijdspecialisatieVan ?o.
|
||||
} e:becomes {
|
||||
?s generiek:isTijdspecialisatieVan ?o.
|
||||
}
|
||||
} => {
|
||||
?s generiek:isTijdspecialisatieVan ?o.
|
||||
}.
|
||||
534
config/reasoner/dl2op/main/persoon_http_to_https.n3
Normal file
534
config/reasoner/dl2op/main/persoon_http_to_https.n3
Normal file
@@ -0,0 +1,534 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# Map from http persoon to https persoon namespace.
|
||||
|
||||
## classes:
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Afstamming
|
||||
} e:becomes {
|
||||
?s a persoon:Afstamming
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Afstamming
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:BurgerlijkeStaat
|
||||
} e:becomes {
|
||||
?s a persoon:BurgerlijkeStaat
|
||||
}
|
||||
} => {
|
||||
?s a persoon:BurgerlijkeStaat
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Domicilie
|
||||
} e:becomes {
|
||||
?s a persoon:Domicilie
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Domicilie
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Geboorte
|
||||
} e:becomes {
|
||||
?s a persoon:Geboorte
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Geboorte
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:GeenInwoner
|
||||
} e:becomes {
|
||||
?s a persoon:GeenInwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:GeenInwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:GeregistreerdPersoon
|
||||
} e:becomes {
|
||||
?s a persoon:GeregistreerdPersoon
|
||||
}
|
||||
} => {
|
||||
?s a persoon:GeregistreerdPersoon
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Gezin
|
||||
} e:becomes {
|
||||
?s a persoon:Gezin
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Gezin
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Gezinsrelatie
|
||||
} e:becomes {
|
||||
?s a persoon:Gezinsrelatie
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Gezinsrelatie
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Huwelijk
|
||||
} e:becomes {
|
||||
?s a persoon:Huwelijk
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Huwelijk
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Inwoner
|
||||
} e:becomes {
|
||||
?s a persoon:Inwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Inwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Inwonerschap
|
||||
} e:becomes {
|
||||
?s a persoon:Inwonerschap
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Inwonerschap
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Nationaliteit
|
||||
} e:becomes {
|
||||
?s a persoon:Nationaliteit
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Nationaliteit
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Overlijden
|
||||
} e:becomes {
|
||||
?s a persoon:Overlijden
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Overlijden
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:PermanentInwoner
|
||||
} e:becomes {
|
||||
?s a persoon:PermanentInwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:PermanentInwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Persoonsgebeurtenis
|
||||
} e:becomes {
|
||||
?s a persoon:Persoonsgebeurtenis
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Persoonsgebeurtenis
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Persoonsrelatie
|
||||
} e:becomes {
|
||||
?s a persoon:Persoonsrelatie
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Persoonsrelatie
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Samenwonen
|
||||
} e:becomes {
|
||||
?s a persoon:Samenwonen
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Samenwonen
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Staatsburger
|
||||
} e:becomes {
|
||||
?s a persoon:Staatsburger
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Staatsburger
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Staatsburgerschap
|
||||
} e:becomes {
|
||||
?s a persoon:Staatsburgerschap
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Staatsburgerschap
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:TijdelijkInwoner
|
||||
} e:becomes {
|
||||
?s a persoon:TijdelijkInwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:TijdelijkInwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Verblijfplaats
|
||||
} e:becomes {
|
||||
?s a persoon:Verblijfplaats
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Verblijfplaats
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Voogdij
|
||||
} e:becomes {
|
||||
?s a persoon:Voogdij
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Voogdij
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Vreemdeling
|
||||
} e:becomes {
|
||||
?s a persoon:Vreemdeling
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Vreemdeling
|
||||
}.
|
||||
|
||||
## properties
|
||||
{
|
||||
{
|
||||
?s persoon_loket:afstammingsType ?o
|
||||
} e:becomes {
|
||||
?s persoon:afstammingsType ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:afstammingsType ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:alternatieveNaam ?o
|
||||
} e:becomes {
|
||||
?s persoon:alternatieveNaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:alternatieveNaam ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:datum ?o
|
||||
} e:becomes {
|
||||
?s persoon:datum ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:datum ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:datumVanAfstamming ?o
|
||||
} e:becomes {
|
||||
?s persoon:datumVanAfstamming ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:datumVanAfstamming ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gebruikteVoornaam ?o
|
||||
} e:becomes {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:geslacht ?o
|
||||
} e:becomes {
|
||||
?s persoon:geslacht ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:geslacht ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gezinsadres ?o
|
||||
} e:becomes {
|
||||
?s persoon:gezinsadres ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gezinsadres ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gezinsrelatietype ?o
|
||||
} e:becomes {
|
||||
?s persoon:gezinsrelatietype ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gezinsrelatietype ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftBurgerlijkeStaat ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftBurgerlijkeStaat ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftBurgerlijkeStaat ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftGeboorte ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftGeboorte ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftGeboorte ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftInwonerschap ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftInwonerschap ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftInwonerschap ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftNationaliteit ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftNationaliteit ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftNationaliteit ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftOverlijden ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftOverlijden ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftOverlijden ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftPersoonsrelatie ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftPersoonsrelatie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftPersoonsrelatie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftStaatsburgerschap ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftStaatsburgerschap ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftStaatsburgerschap ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftVerblijfplaats ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftVerblijfplaats ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftVerblijfplaats ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:Inwonerschap.binnenJurisdictie ?o
|
||||
} e:becomes {
|
||||
?s persoon:Inwonerschap.binnenJurisdictie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:Inwonerschap.binnenJurisdictie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:isHoofdVan ?o
|
||||
} e:becomes {
|
||||
?s persoon:isHoofdVan ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:isHoofdVan ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:isLidVan ?o
|
||||
} e:becomes {
|
||||
?s persoon:isLidVan ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:isLidVan ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:isRelatieMet ?o
|
||||
} e:becomes {
|
||||
?s persoon:isRelatieMet ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:isRelatieMet ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:land ?o
|
||||
} e:becomes {
|
||||
?s persoon:land ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:land ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:nationaliteit ?o
|
||||
} e:becomes {
|
||||
?s persoon:nationaliteit ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:nationaliteit ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:plaats ?o
|
||||
} e:becomes {
|
||||
?s persoon:plaats ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:plaats ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:registratie ?o
|
||||
} e:becomes {
|
||||
?s persoon:registratie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:registratie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:Staatsburgerschap.binnenJurisdictie ?o
|
||||
} e:becomes {
|
||||
?s persoon:Staatsburgerschap.binnenJurisdictie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:Staatsburgerschap.binnenJurisdictie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:type ?o
|
||||
} e:becomes {
|
||||
?s persoon:type ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:type ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:verblijfsadres ?o
|
||||
} e:becomes {
|
||||
?s persoon:verblijfsadres ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:verblijfsadres ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:volledigeNaam ?o
|
||||
} e:becomes {
|
||||
?s persoon:volledigeNaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:volledigeNaam ?o
|
||||
}.
|
||||
27
config/reasoner/dl2op/main/retract_empty_strings.n3
Normal file
27
config/reasoner/dl2op/main/retract_empty_strings.n3
Normal file
@@ -0,0 +1,27 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# Retract empty strings
|
||||
{
|
||||
{
|
||||
?s ?p ""
|
||||
} e:becomes {}.
|
||||
} => {}.
|
||||
62
config/reasoner/dl2op/main/rrn.n3
Normal file
62
config/reasoner/dl2op/main/rrn.n3
Normal file
@@ -0,0 +1,62 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
|
||||
# Rijksregisternummer
|
||||
# Extend identifiers to match OP's model
|
||||
# <http://example.org/tst#subject> skos:notation "00010100105".
|
||||
{
|
||||
?identifier skos:notation ?notation.
|
||||
?notation string:notEqualIgnoringCase "Rijksregisternummer".
|
||||
?identifier log:uri ?identifierString.
|
||||
(?identifierString "STRUCTURED_IDENTIFIER") string:concatenation ?hashInput.
|
||||
?hashInput crypto:md5 ?uuid.
|
||||
("http://data.lblod.info/id/gestructureerdeIdentificatoren/" ?uuid) string:concatenation ?structuredIdString.
|
||||
?structuredIdentifier log:uri ?structuredIdString.
|
||||
|
||||
{
|
||||
?identifier skos:notation ?notation.
|
||||
} e:becomes {
|
||||
?identifier
|
||||
generiek:gestructureerdeIdentificator ?structuredIdentifier ;
|
||||
skos:notation "Rijksregisternummer" .
|
||||
}.
|
||||
|
||||
} => {
|
||||
?identifier
|
||||
generiek:gestructureerdeIdentificator ?structuredIdentifier ;
|
||||
skos:notation "Rijksregisternummer" .
|
||||
|
||||
?structuredIdentifier a generiek:GestructureerdeIdentificator ;
|
||||
mu:uuid ?uuid ;
|
||||
generiek:lokaleIdentificator ?notation
|
||||
}.
|
||||
|
||||
# identifier property in the export is only used for RRN.
|
||||
{
|
||||
{
|
||||
?s adms:identifier ?o
|
||||
} e:becomes {
|
||||
?s persoon:registratie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:registratie ?o
|
||||
}.
|
||||
33
config/reasoner/dl2op/private-info/inverse_relations.n3
Normal file
33
config/reasoner/dl2op/private-info/inverse_relations.n3
Normal file
@@ -0,0 +1,33 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# Inverse properties
|
||||
{
|
||||
?s org:holds ?o.
|
||||
} => {
|
||||
?o org:heldBy ?s.
|
||||
}.
|
||||
|
||||
{
|
||||
?s org:heldBy ?o.
|
||||
} => {
|
||||
?o org:holds ?s.
|
||||
}.
|
||||
150
config/reasoner/dl2op/private-info/mapping.n3
Normal file
150
config/reasoner/dl2op/private-info/mapping.n3
Normal file
@@ -0,0 +1,150 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# DL and OP both use persoon:gebruikteVoornaam but with different semantics (!)
|
||||
# Hence the mapping is in two steps.
|
||||
# The first step maps the DL persoon:gebruikteVoornaam to the OP counterpart
|
||||
# and drops the DL persoon:gebruikteVoornaam statements with e:becomes
|
||||
# A second reasoning will map DL foaf:name to OP persoon:gebruikteVoornaam
|
||||
# Doing both at once would lead all DL foaf:names to incorrectly become foaf:givennames
|
||||
# in OP
|
||||
|
||||
# First name
|
||||
# persoon:gebruikteVoornaam => foaf:givenName
|
||||
# Alternatieve voornaam
|
||||
# foaf:name => persoon:gebruikteVoornaam
|
||||
|
||||
# Test Mock DL
|
||||
# <http://example.org/person> persoon_loket:gebruikteVoornaam "Didier".
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gebruikteVoornaam ?o
|
||||
} e:becomes {
|
||||
?s foaf:givenName ?o
|
||||
}
|
||||
} => {
|
||||
?s foaf:givenName ?o
|
||||
}.
|
||||
|
||||
|
||||
# First name
|
||||
# persoon:gebruikteVoornaam => foaf:givenName (done in pre-processing)
|
||||
# Alternatieve voornaam
|
||||
# foaf:name => persoon:gebruikteVoornaam
|
||||
|
||||
# Test Mock LLB
|
||||
# <http://example.org/person> foaf:name "Didier".
|
||||
{
|
||||
{
|
||||
?s foaf:name ?o
|
||||
} e:becomes {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}.
|
||||
|
||||
# Test
|
||||
# ex:s <http://data.vlaanderen.be/ns/mandaat#start> "2019-01-01T19:32:52+00:00"^^xsd:dateTime.
|
||||
{
|
||||
?s mandaat:start ?startDateTime.
|
||||
# use backward arrow rule defined below
|
||||
?startDateTime :dateFromDateTime ?startDate.
|
||||
{
|
||||
?s mandaat:start ?startDateTime
|
||||
} e:becomes {
|
||||
?s mandaat:start ?startDate
|
||||
}.
|
||||
} => {
|
||||
?s mandaat:start ?startDate
|
||||
}.
|
||||
|
||||
# ex:s <http://data.vlaanderen.be/ns/mandaat#einde> "2019-02-01T10:32:52+00:00"^^xsd:dateTime.
|
||||
{
|
||||
?s mandaat:einde ?eindeDateTime.
|
||||
# use backward arrow rule defined below
|
||||
?eindeDateTime :dateFromDateTime ?eindeDate.
|
||||
{
|
||||
?s mandaat:einde ?eindeDateTime
|
||||
} e:becomes {
|
||||
?s mandaat:einde ?eindeDate
|
||||
}.
|
||||
} => {
|
||||
?s mandaat:einde ?eindeDate
|
||||
}.
|
||||
|
||||
|
||||
# Backward arrow rule is like a function call.
|
||||
# Removes time info in the returned date
|
||||
# The user in DL selects a date via the UI.
|
||||
# These dates are persisted as midnight dateTimes in UTC.
|
||||
# Meaning that 1st of July is stored as
|
||||
# "2022-06-30T22:00:00Z"^^xsd:dateTime
|
||||
# and 1 December
|
||||
# "2022-11-30T23:00:00Z"^^xsd:dateTime
|
||||
# So, the following rule adds 2 hours to the datetime, and then takes the date part of the UTC date time
|
||||
# to come to the date that the DL user selected (in CE(S)T)
|
||||
{
|
||||
?dateTime :dateFromDateTime ?date
|
||||
} <= {
|
||||
(?dateTimeLiteral xsd:dateTime) log:dtlit ?dateTime.
|
||||
(?dateTime "PT2H"^^xsd:dayTimeDuration) func:add-dayTimeDuration-to-dateTime ?localDateTime.
|
||||
(?localDateTimeLiteral xsd:dateTime) log:dtlit ?localDateTime.
|
||||
(?localDateTimeLiteral 0 11) func:substring ?dateLiteral.
|
||||
(?dateLiteral xsd:date) log:dtlit ?date.
|
||||
}.
|
||||
|
||||
|
||||
# ex:orgA besluit:classificatie <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002>.
|
||||
{
|
||||
{
|
||||
?s besluit:classificatie ?o
|
||||
} e:becomes {
|
||||
?s org:classification ?o
|
||||
}
|
||||
} => {
|
||||
?s org:classification ?o
|
||||
}.
|
||||
|
||||
# fix typo V -> v
|
||||
# <http://data.lblod.info/id/adressen/606D972BC20E70000900001C> <https://data.vlaanderen.be/ns/adres#AdresVoorstelling.huisnummer> "1" .
|
||||
{
|
||||
{
|
||||
?s adres:AdresVoorstelling.huisnummer ?o
|
||||
} e:becomes {
|
||||
?s adres:Adresvoorstelling.huisnummer ?o
|
||||
}
|
||||
} => {
|
||||
?s adres:Adresvoorstelling.huisnummer ?o
|
||||
}.
|
||||
|
||||
|
||||
# Tijdspecialisatie
|
||||
{
|
||||
{
|
||||
?s mandaat:isTijdspecialisatieVan ?o.
|
||||
} e:becomes {
|
||||
?s generiek:isTijdspecialisatieVan ?o.
|
||||
}
|
||||
} => {
|
||||
?s generiek:isTijdspecialisatieVan ?o.
|
||||
}.
|
||||
534
config/reasoner/dl2op/private-info/persoon_http_to_https.n3
Normal file
534
config/reasoner/dl2op/private-info/persoon_http_to_https.n3
Normal file
@@ -0,0 +1,534 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# Map from http persoon to https persoon namespace.
|
||||
|
||||
## classes:
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Afstamming
|
||||
} e:becomes {
|
||||
?s a persoon:Afstamming
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Afstamming
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:BurgerlijkeStaat
|
||||
} e:becomes {
|
||||
?s a persoon:BurgerlijkeStaat
|
||||
}
|
||||
} => {
|
||||
?s a persoon:BurgerlijkeStaat
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Domicilie
|
||||
} e:becomes {
|
||||
?s a persoon:Domicilie
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Domicilie
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Geboorte
|
||||
} e:becomes {
|
||||
?s a persoon:Geboorte
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Geboorte
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:GeenInwoner
|
||||
} e:becomes {
|
||||
?s a persoon:GeenInwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:GeenInwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:GeregistreerdPersoon
|
||||
} e:becomes {
|
||||
?s a persoon:GeregistreerdPersoon
|
||||
}
|
||||
} => {
|
||||
?s a persoon:GeregistreerdPersoon
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Gezin
|
||||
} e:becomes {
|
||||
?s a persoon:Gezin
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Gezin
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Gezinsrelatie
|
||||
} e:becomes {
|
||||
?s a persoon:Gezinsrelatie
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Gezinsrelatie
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Huwelijk
|
||||
} e:becomes {
|
||||
?s a persoon:Huwelijk
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Huwelijk
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Inwoner
|
||||
} e:becomes {
|
||||
?s a persoon:Inwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Inwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Inwonerschap
|
||||
} e:becomes {
|
||||
?s a persoon:Inwonerschap
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Inwonerschap
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Nationaliteit
|
||||
} e:becomes {
|
||||
?s a persoon:Nationaliteit
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Nationaliteit
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Overlijden
|
||||
} e:becomes {
|
||||
?s a persoon:Overlijden
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Overlijden
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:PermanentInwoner
|
||||
} e:becomes {
|
||||
?s a persoon:PermanentInwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:PermanentInwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Persoonsgebeurtenis
|
||||
} e:becomes {
|
||||
?s a persoon:Persoonsgebeurtenis
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Persoonsgebeurtenis
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Persoonsrelatie
|
||||
} e:becomes {
|
||||
?s a persoon:Persoonsrelatie
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Persoonsrelatie
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Samenwonen
|
||||
} e:becomes {
|
||||
?s a persoon:Samenwonen
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Samenwonen
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Staatsburger
|
||||
} e:becomes {
|
||||
?s a persoon:Staatsburger
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Staatsburger
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Staatsburgerschap
|
||||
} e:becomes {
|
||||
?s a persoon:Staatsburgerschap
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Staatsburgerschap
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:TijdelijkInwoner
|
||||
} e:becomes {
|
||||
?s a persoon:TijdelijkInwoner
|
||||
}
|
||||
} => {
|
||||
?s a persoon:TijdelijkInwoner
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Verblijfplaats
|
||||
} e:becomes {
|
||||
?s a persoon:Verblijfplaats
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Verblijfplaats
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Voogdij
|
||||
} e:becomes {
|
||||
?s a persoon:Voogdij
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Voogdij
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s a persoon_loket:Vreemdeling
|
||||
} e:becomes {
|
||||
?s a persoon:Vreemdeling
|
||||
}
|
||||
} => {
|
||||
?s a persoon:Vreemdeling
|
||||
}.
|
||||
|
||||
## properties
|
||||
{
|
||||
{
|
||||
?s persoon_loket:afstammingsType ?o
|
||||
} e:becomes {
|
||||
?s persoon:afstammingsType ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:afstammingsType ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:alternatieveNaam ?o
|
||||
} e:becomes {
|
||||
?s persoon:alternatieveNaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:alternatieveNaam ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:datum ?o
|
||||
} e:becomes {
|
||||
?s persoon:datum ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:datum ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:datumVanAfstamming ?o
|
||||
} e:becomes {
|
||||
?s persoon:datumVanAfstamming ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:datumVanAfstamming ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gebruikteVoornaam ?o
|
||||
} e:becomes {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gebruikteVoornaam ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:geslacht ?o
|
||||
} e:becomes {
|
||||
?s persoon:geslacht ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:geslacht ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gezinsadres ?o
|
||||
} e:becomes {
|
||||
?s persoon:gezinsadres ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gezinsadres ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:gezinsrelatietype ?o
|
||||
} e:becomes {
|
||||
?s persoon:gezinsrelatietype ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:gezinsrelatietype ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftBurgerlijkeStaat ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftBurgerlijkeStaat ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftBurgerlijkeStaat ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftGeboorte ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftGeboorte ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftGeboorte ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftInwonerschap ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftInwonerschap ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftInwonerschap ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftNationaliteit ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftNationaliteit ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftNationaliteit ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftOverlijden ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftOverlijden ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftOverlijden ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftPersoonsrelatie ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftPersoonsrelatie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftPersoonsrelatie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftStaatsburgerschap ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftStaatsburgerschap ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftStaatsburgerschap ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:heeftVerblijfplaats ?o
|
||||
} e:becomes {
|
||||
?s persoon:heeftVerblijfplaats ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:heeftVerblijfplaats ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:Inwonerschap.binnenJurisdictie ?o
|
||||
} e:becomes {
|
||||
?s persoon:Inwonerschap.binnenJurisdictie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:Inwonerschap.binnenJurisdictie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:isHoofdVan ?o
|
||||
} e:becomes {
|
||||
?s persoon:isHoofdVan ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:isHoofdVan ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:isLidVan ?o
|
||||
} e:becomes {
|
||||
?s persoon:isLidVan ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:isLidVan ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:isRelatieMet ?o
|
||||
} e:becomes {
|
||||
?s persoon:isRelatieMet ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:isRelatieMet ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:land ?o
|
||||
} e:becomes {
|
||||
?s persoon:land ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:land ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:nationaliteit ?o
|
||||
} e:becomes {
|
||||
?s persoon:nationaliteit ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:nationaliteit ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:plaats ?o
|
||||
} e:becomes {
|
||||
?s persoon:plaats ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:plaats ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:registratie ?o
|
||||
} e:becomes {
|
||||
?s persoon:registratie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:registratie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:Staatsburgerschap.binnenJurisdictie ?o
|
||||
} e:becomes {
|
||||
?s persoon:Staatsburgerschap.binnenJurisdictie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:Staatsburgerschap.binnenJurisdictie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:type ?o
|
||||
} e:becomes {
|
||||
?s persoon:type ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:type ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:verblijfsadres ?o
|
||||
} e:becomes {
|
||||
?s persoon:verblijfsadres ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:verblijfsadres ?o
|
||||
}.
|
||||
|
||||
{
|
||||
{
|
||||
?s persoon_loket:volledigeNaam ?o
|
||||
} e:becomes {
|
||||
?s persoon:volledigeNaam ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:volledigeNaam ?o
|
||||
}.
|
||||
90
config/reasoner/dl2op/private-info/query.n3q
Normal file
90
config/reasoner/dl2op/private-info/query.n3q
Normal file
@@ -0,0 +1,90 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
|
||||
# Rijksregisternummer
|
||||
# Extend identifiers to match OP's model
|
||||
# <http://example.org/tst#subject> skos:notation "00010100105".
|
||||
{
|
||||
?identifier
|
||||
generiek:gestructureerdeIdentificator ?structuredIdentifier ;
|
||||
skos:notation "Rijksregisternummer" .
|
||||
|
||||
?structuredIdentifier a generiek:GestructureerdeIdentificator ;
|
||||
mu:uuid ?uuid ;
|
||||
generiek:lokaleIdentificator ?notation
|
||||
} => {
|
||||
?identifier
|
||||
generiek:gestructureerdeIdentificator ?structuredIdentifier ;
|
||||
skos:notation "Rijksregisternummer" .
|
||||
|
||||
?structuredIdentifier a generiek:GestructureerdeIdentificator ;
|
||||
mu:uuid ?uuid ;
|
||||
generiek:lokaleIdentificator ?notation
|
||||
}.
|
||||
|
||||
# identifier property in the export is only used for RRN.
|
||||
{
|
||||
?s persoon:registratie ?o
|
||||
} => {
|
||||
?s persoon:registratie ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s a <http://www.w3.org/ns/adms#Identifier>
|
||||
} => {
|
||||
?s a <http://www.w3.org/ns/adms#Identifier>
|
||||
}.
|
||||
|
||||
# Nationality
|
||||
{
|
||||
?s persoon:heeftNationaliteit ?o
|
||||
} => {
|
||||
?s persoon:heeftNationaliteit ?o
|
||||
}.
|
||||
|
||||
|
||||
# Birth and related attributes
|
||||
{
|
||||
?s a persoon:Geboorte;
|
||||
?p ?o.
|
||||
} => {
|
||||
?s a persoon:Geboorte;
|
||||
?p ?o.
|
||||
}.
|
||||
|
||||
{
|
||||
?s persoon:heeftGeboorte ?o
|
||||
} => {
|
||||
?s persoon:heeftGeboorte ?o
|
||||
}.
|
||||
|
||||
{
|
||||
?s persoon:datum ?o
|
||||
} => {
|
||||
?s persoon:datum ?o
|
||||
}.
|
||||
|
||||
# Gender
|
||||
{
|
||||
?s persoon:geslacht ?o
|
||||
} => {
|
||||
?s persoon:geslacht ?o
|
||||
}.
|
||||
27
config/reasoner/dl2op/private-info/retract_empty_strings.n3
Normal file
27
config/reasoner/dl2op/private-info/retract_empty_strings.n3
Normal file
@@ -0,0 +1,27 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
# Retract empty strings
|
||||
{
|
||||
{
|
||||
?s ?p ""
|
||||
} e:becomes {}.
|
||||
} => {}.
|
||||
62
config/reasoner/dl2op/private-info/rrn.n3
Normal file
62
config/reasoner/dl2op/private-info/rrn.n3
Normal file
@@ -0,0 +1,62 @@
|
||||
PREFIX : <#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
|
||||
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
|
||||
PREFIX ex: <http://example.org/test#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX func: <http://www.w3.org/2007/rif-builtin-function#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
|
||||
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX string: <http://www.w3.org/2000/10/swap/string#>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
|
||||
|
||||
# Rijksregisternummer
|
||||
# Extend identifiers to match OP's model
|
||||
# <http://example.org/tst#subject> skos:notation "00010100105".
|
||||
{
|
||||
?identifier skos:notation ?notation.
|
||||
?notation string:notEqualIgnoringCase "Rijksregisternummer".
|
||||
?identifier log:uri ?identifierString.
|
||||
(?identifierString "STRUCTURED_IDENTIFIER") string:concatenation ?hashInput.
|
||||
?hashInput crypto:md5 ?uuid.
|
||||
("http://data.lblod.info/id/gestructureerdeIdentificatoren/" ?uuid) string:concatenation ?structuredIdString.
|
||||
?structuredIdentifier log:uri ?structuredIdString.
|
||||
|
||||
{
|
||||
?identifier skos:notation ?notation.
|
||||
} e:becomes {
|
||||
?identifier
|
||||
generiek:gestructureerdeIdentificator ?structuredIdentifier ;
|
||||
skos:notation "Rijksregisternummer" .
|
||||
}.
|
||||
|
||||
} => {
|
||||
?identifier
|
||||
generiek:gestructureerdeIdentificator ?structuredIdentifier ;
|
||||
skos:notation "Rijksregisternummer" .
|
||||
|
||||
?structuredIdentifier a generiek:GestructureerdeIdentificator ;
|
||||
mu:uuid ?uuid ;
|
||||
generiek:lokaleIdentificator ?notation
|
||||
}.
|
||||
|
||||
# identifier property in the export is only used for RRN.
|
||||
{
|
||||
{
|
||||
?s adms:identifier ?o
|
||||
} e:becomes {
|
||||
?s persoon:registratie ?o
|
||||
}
|
||||
} => {
|
||||
?s persoon:registratie ?o
|
||||
}.
|
||||
@@ -23,7 +23,7 @@
|
||||
"skos": "http://www.w3.org/2004/02/skos/core#",
|
||||
"euvoc": "http://publications.europa.eu/ontology/euvoc#",
|
||||
"ere": "http://data.lblod.info/vocabularies/erediensten/",
|
||||
"ch": "http://data.lblod.info/vocabularies/contacthub/",
|
||||
"ch": "http://data.lblod.info/vocabularies/contacthub/",
|
||||
"code": "http://lblod.data.gift/vocabularies/organisatie/",
|
||||
"ext": "http://mu.semte.ch/vocabularies/ext/",
|
||||
"geo": "http://www.opengis.net/ont/geosparql#"
|
||||
@@ -63,7 +63,7 @@
|
||||
"target": "agents",
|
||||
"cardinality": "many",
|
||||
"inverse": true
|
||||
},
|
||||
}
|
||||
},
|
||||
"new-resource-base": "http://data.lblod.info/id/personen/"
|
||||
},
|
||||
@@ -108,7 +108,7 @@
|
||||
},
|
||||
"organization": {
|
||||
"predicate": "org:postIn",
|
||||
"target": "organization",
|
||||
"target": "organizations",
|
||||
"cardinality": "one"
|
||||
},
|
||||
"agents-in-position": {
|
||||
@@ -223,7 +223,7 @@
|
||||
"type": "string",
|
||||
"predicate": "schema:contactType"
|
||||
}
|
||||
},
|
||||
},
|
||||
"relationships": {
|
||||
"contact-address": {
|
||||
"predicate": "locn:address",
|
||||
@@ -269,7 +269,7 @@
|
||||
"type": "datetime",
|
||||
"predicate": "mandaat:einde"
|
||||
}
|
||||
},
|
||||
},
|
||||
"relationships": {
|
||||
"board-position": {
|
||||
"predicate": "org:holds",
|
||||
@@ -358,7 +358,7 @@
|
||||
"predicate": "skos:prefLabel"
|
||||
},
|
||||
"alternative-name": {
|
||||
"type": "string",
|
||||
"type": "string",
|
||||
"predicate": "skos:altLabel"
|
||||
}
|
||||
},
|
||||
@@ -492,10 +492,15 @@
|
||||
"predicate": "ere:wordtBediendDoor",
|
||||
"target": "minister-positions",
|
||||
"cardinality": "many"
|
||||
},
|
||||
"involvements": {
|
||||
"predicate": "org:organization",
|
||||
"target": "local-involvements",
|
||||
"cardinality": "many",
|
||||
"inverse": true
|
||||
}
|
||||
},
|
||||
"new-resource-base": "http://data.lblod.info/id/eredienstBestuurseenheden/"
|
||||
|
||||
},
|
||||
"worship-services": {
|
||||
"class": "ere:BestuurVanDeEredienst",
|
||||
@@ -510,14 +515,6 @@
|
||||
"predicate": "ere:grensoverschrijdend"
|
||||
}
|
||||
},
|
||||
"relationships": {
|
||||
"involvements": {
|
||||
"predicate": "org:organization",
|
||||
"target": "local-involvements",
|
||||
"cardinality": "many",
|
||||
"inverse": true
|
||||
}
|
||||
},
|
||||
"new-resource-base": "http://data.lblod.info/id/besturenVanDeEredienst/"
|
||||
},
|
||||
"recognized-worship-types": {
|
||||
@@ -631,9 +628,9 @@
|
||||
"target": "involvement-types",
|
||||
"cardinality": "one"
|
||||
},
|
||||
"worship-service": {
|
||||
"worship-administrative-unit": {
|
||||
"predicate": "org:organization",
|
||||
"target": "worship-services",
|
||||
"target": "worship-administrative-units",
|
||||
"cardinality": "one"
|
||||
},
|
||||
"administrative-unit": {
|
||||
@@ -711,7 +708,6 @@
|
||||
"type": "url",
|
||||
"predicate": "adres:verwijstNaar"
|
||||
}
|
||||
|
||||
},
|
||||
"relationships": {
|
||||
"source": {
|
||||
@@ -838,9 +834,9 @@
|
||||
"predicate": "ere:voldoetAan",
|
||||
"target": "minister-conditions",
|
||||
"cardinality": "many"
|
||||
}
|
||||
}
|
||||
},
|
||||
"new-resource-base": "http://data.lblod.info/id/rollenBedienaar/"
|
||||
"new-resource-base": "http://data.lblod.info/id/rollenBedienaar/"
|
||||
},
|
||||
"minister-conditions": {
|
||||
"class": "ere:VoorwaardenBedienaar",
|
||||
@@ -968,4 +964,4 @@
|
||||
"new-resource-base": "http://lblod.data.gift/concepts/"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
config/search-migrations/.gitignore
vendored
Normal file
1
config/search-migrations/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.migration_history
|
||||
0
config/search-migrations/.gitkeep
Normal file
0
config/search-migrations/.gitkeep
Normal file
@@ -141,8 +141,8 @@
|
||||
{
|
||||
"type": "mandatory",
|
||||
"on_path": "mandatories",
|
||||
"rdf_type": "http://data.vlaanderen.be/ns/mandaat#Mandataris",
|
||||
"sub_types": [
|
||||
"rdf_type": [
|
||||
"http://data.vlaanderen.be/ns/mandaat#Mandataris",
|
||||
"http://data.lblod.info/vocabularies/erediensten/EredienstMandataris"
|
||||
],
|
||||
"properties": {
|
||||
@@ -150,11 +150,11 @@
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://xmlns.com/foaf/0.1/givenName"
|
||||
],
|
||||
"id": [
|
||||
"person_id": [
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
"uuid": [
|
||||
"person_uuid": [
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
@@ -312,11 +312,11 @@
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://xmlns.com/foaf/0.1/givenName"
|
||||
],
|
||||
"id": [
|
||||
"person_id": [
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
"uuid": [
|
||||
"person_uuid": [
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
@@ -468,8 +468,8 @@
|
||||
{
|
||||
"type": "minister",
|
||||
"on_path": "ministers",
|
||||
"rdf_type": "http://data.lblod.info/vocabularies/erediensten/RolBedienaar",
|
||||
"sub_types": [
|
||||
"rdf_type": [
|
||||
"http://data.lblod.info/vocabularies/erediensten/RolBedienaar",
|
||||
"http://data.lblod.info/vocabularies/contacthub/AgentInPositie"
|
||||
],
|
||||
"properties": {
|
||||
@@ -477,11 +477,11 @@
|
||||
"http://www.w3.org/ns/org#heldBy",
|
||||
"http://xmlns.com/foaf/0.1/givenName"
|
||||
],
|
||||
"id": [
|
||||
"person_id": [
|
||||
"http://www.w3.org/ns/org#heldBy",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
"uuid": [
|
||||
"person_uuid": [
|
||||
"http://www.w3.org/ns/org#heldBy",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
@@ -546,7 +546,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"person_id": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"field": {
|
||||
@@ -638,11 +638,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"name": "person_id",
|
||||
"mappings": {
|
||||
"minister": "id",
|
||||
"agent": "id",
|
||||
"mandatory": "id"
|
||||
"minister": "person_id",
|
||||
"agent": "person_id",
|
||||
"mandatory": "person_id"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -814,8 +814,8 @@
|
||||
{
|
||||
"type": "unit",
|
||||
"on_path": "units",
|
||||
"rdf_type": "http://data.vlaanderen.be/ns/besluit#Bestuurseenheid",
|
||||
"sub_types": [
|
||||
"rdf_type": [
|
||||
"http://data.vlaanderen.be/ns/besluit#Bestuurseenheid",
|
||||
"http://data.lblod.info/vocabularies/erediensten/EredienstBestuurseenheid",
|
||||
"http://data.lblod.info/vocabularies/erediensten/CentraalBestuurVanDeEredienst",
|
||||
"http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"automatic_index_updates": true,
|
||||
"persist_indexes": true,
|
||||
"number_of_threads": 11,
|
||||
"number_of_threads": 8,
|
||||
"eager_indexing_groups": [
|
||||
[
|
||||
{
|
||||
@@ -46,27 +46,27 @@
|
||||
}
|
||||
]
|
||||
],
|
||||
"default_settings" : {
|
||||
"default_settings": {
|
||||
"analysis": {
|
||||
"normalizer": {
|
||||
"custom_sort_normalizer": {
|
||||
"type": "custom",
|
||||
"char_filter": [],
|
||||
"filter": [
|
||||
"lowercase",
|
||||
"trim",
|
||||
"asciifolding"
|
||||
]
|
||||
"type": "custom",
|
||||
"char_filter": [],
|
||||
"filter": [
|
||||
"lowercase",
|
||||
"trim",
|
||||
"asciifolding"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"type": "mandatory",
|
||||
"on_path": "mandatories",
|
||||
"rdf_type": "http://data.vlaanderen.be/ns/mandaat#Mandataris",
|
||||
"sub_types": [
|
||||
"rdf_type": [
|
||||
"http://data.vlaanderen.be/ns/mandaat#Mandataris",
|
||||
"http://data.lblod.info/vocabularies/erediensten/EredienstMandataris"
|
||||
],
|
||||
"properties": {
|
||||
@@ -74,11 +74,11 @@
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://xmlns.com/foaf/0.1/givenName"
|
||||
],
|
||||
"id": [
|
||||
"person_id": [
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
"uuid": [
|
||||
"person_uuid": [
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
@@ -153,7 +153,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"person_id": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"field": {
|
||||
@@ -236,11 +236,11 @@
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://xmlns.com/foaf/0.1/givenName"
|
||||
],
|
||||
"id": [
|
||||
"person_id": [
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
"uuid": [
|
||||
"person_uuid": [
|
||||
"http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
@@ -315,7 +315,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"person_id": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"field": {
|
||||
@@ -392,8 +392,8 @@
|
||||
{
|
||||
"type": "minister",
|
||||
"on_path": "ministers",
|
||||
"rdf_type": "http://data.lblod.info/vocabularies/erediensten/RolBedienaar",
|
||||
"sub_types": [
|
||||
"rdf_type": [
|
||||
"http://data.lblod.info/vocabularies/erediensten/RolBedienaar",
|
||||
"http://data.lblod.info/vocabularies/contacthub/AgentInPositie"
|
||||
],
|
||||
"properties": {
|
||||
@@ -401,11 +401,11 @@
|
||||
"http://www.w3.org/ns/org#heldBy",
|
||||
"http://xmlns.com/foaf/0.1/givenName"
|
||||
],
|
||||
"id": [
|
||||
"person_id": [
|
||||
"http://www.w3.org/ns/org#heldBy",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
"uuid": [
|
||||
"person_uuid": [
|
||||
"http://www.w3.org/ns/org#heldBy",
|
||||
"http://mu.semte.ch/vocabularies/core/uuid"
|
||||
],
|
||||
@@ -470,7 +470,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"person_id": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"field": {
|
||||
@@ -562,11 +562,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"name": "person_id",
|
||||
"mappings": {
|
||||
"minister": "id",
|
||||
"agent": "id",
|
||||
"mandatory": "id"
|
||||
"minister": "person_id",
|
||||
"agent": "person_id",
|
||||
"mandatory": "person_id"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -661,7 +661,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"person_id": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"field": {
|
||||
@@ -739,8 +739,8 @@
|
||||
{
|
||||
"type": "unit",
|
||||
"on_path": "units",
|
||||
"rdf_type": "http://data.vlaanderen.be/ns/besluit#Bestuurseenheid",
|
||||
"sub_types": [
|
||||
"rdf_type": [
|
||||
"http://data.vlaanderen.be/ns/besluit#Bestuurseenheid",
|
||||
"http://data.lblod.info/vocabularies/erediensten/EredienstBestuurseenheid",
|
||||
"http://data.lblod.info/vocabularies/erediensten/CentraalBestuurVanDeEredienst",
|
||||
"http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst"
|
||||
|
||||
@@ -71,3 +71,7 @@ services:
|
||||
restart: "no"
|
||||
construct-administrative-unit-relationships:
|
||||
restart: "no"
|
||||
delta-producer-bg-jobs-initiator-worship-posts:
|
||||
restart: "no"
|
||||
delta-producer-pub-graph-maintainer-worship-posts:
|
||||
restart: "no"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
version: '3.4'
|
||||
version: "3.4"
|
||||
|
||||
x-logging:
|
||||
&default-logging
|
||||
x-logging: &default-logging
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
@@ -11,7 +10,7 @@ services:
|
||||
identifier:
|
||||
image: semtech/mu-identifier:1.9.1
|
||||
environment:
|
||||
DEFAULT_MU_AUTH_ALLOWED_GROUPS_HEADER: "[{\"variables\":[],\"name\":\"public\"}]"
|
||||
DEFAULT_MU_AUTH_ALLOWED_GROUPS_HEADER: '[{"variables":[],"name":"public"}]'
|
||||
SESSION_COOKIE_SECURE: "on"
|
||||
labels:
|
||||
- "logging=true"
|
||||
@@ -92,7 +91,7 @@ services:
|
||||
LOGGING_LEVEL: "INFO"
|
||||
SPARQL_ENDPOINT: "http://db:8890/sparql"
|
||||
LIMIT_SIZE: "10000"
|
||||
MU_AUTH_SUDO: "false"
|
||||
MU_AUTH_SUDO: "true"
|
||||
labels:
|
||||
- "logging=true"
|
||||
restart: always
|
||||
@@ -158,7 +157,7 @@ services:
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
frontend:
|
||||
image: lblod/frontend-organization-portal:1.13.3
|
||||
image: lblod/frontend-organization-portal:1.14.0
|
||||
volumes:
|
||||
- ./config/frontend/add-x-frame-options-header.conf:/config/add-x-frame-options.conf
|
||||
environment:
|
||||
@@ -201,34 +200,35 @@ services:
|
||||
- db:database
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
################################################################################
|
||||
# DELTA GENERAL
|
||||
################################################################################
|
||||
reasoner:
|
||||
image: eyereasoner/reasoning-service:1.0.1
|
||||
volumes:
|
||||
- ./config/reasoner:/config
|
||||
################################################################################
|
||||
# DELTA GENERAL
|
||||
################################################################################
|
||||
delta-producer-dump-file-publisher:
|
||||
image: bdevloed/delta-producer-dump-file-publisher:0.8.0-beta
|
||||
image: lblod/delta-producer-dump-file-publisher:0.9.0
|
||||
volumes:
|
||||
- ./config/delta-producer/dump-file-publisher:/config
|
||||
- ./data/files:/share
|
||||
environment:
|
||||
FILES_GRAPH: 'http://mu.semte.ch/graphs/public' # Note: this will be extracted in a config per job one day
|
||||
DCAT_DATASET_GRAPH: 'http://mu.semte.ch/graphs/public'
|
||||
links:
|
||||
- db:database
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
################################################################################
|
||||
# DELTA ADMINISTRATIVE-UNITS: START
|
||||
################################################################################
|
||||
################################################################################
|
||||
# DELTA ADMINISTRATIVE-UNITS: START
|
||||
################################################################################
|
||||
delta-producer-bg-jobs-initiator-administrative-units:
|
||||
image: lblod/delta-producer-background-jobs-initiator:0.3.1
|
||||
environment:
|
||||
JOBS_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
DUMP_FILE_CREATION_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/administrative-units'
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/administrative-units'
|
||||
HEALING_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/administrative-units'
|
||||
CRON_PATTERN_DUMP_JOB: '0 0 4 * * 6' # weekly on saturday
|
||||
CRON_PATTERN_HEALING_JOB: '0 0 4 * * *' # everyday at 4 AM
|
||||
START_INITIAL_SYNC: 'false' # prefer to disable it now. We want to have feeling with how the DB acts.
|
||||
DUMP_FILE_CREATION_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/administrative-units"
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/administrative-units"
|
||||
HEALING_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/administrative-units"
|
||||
CRON_PATTERN_DUMP_JOB: "0 0 4 * * 6" # weekly on saturday
|
||||
CRON_PATTERN_HEALING_JOB: "0 0 4 * * *" # everyday at 4 AM
|
||||
START_INITIAL_SYNC: "false" # prefer to disable it now. We want to have feeling with how the DB acts.
|
||||
labels:
|
||||
- "logging=true"
|
||||
links:
|
||||
@@ -241,12 +241,12 @@ services:
|
||||
MAX_BODY_SIZE: "50mb"
|
||||
JOBS_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
RELATIVE_FILE_PATH: "deltas/administrative-units"
|
||||
PUBLICATION_GRAPH: 'http://redpencil.data.gift/id/deltas/producer/administrative-units'
|
||||
HEALING_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/administrative-units'
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/administrative-units'
|
||||
PUBLICATION_GRAPH: "http://redpencil.data.gift/id/deltas/producer/administrative-units"
|
||||
HEALING_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/administrative-units"
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/administrative-units"
|
||||
QUEUE_POLL_INTERVAL: 3000
|
||||
USE_VIRTUOSO_FOR_EXPENSIVE_SELECTS: "true" # some queries are just too expensive
|
||||
SKIP_MU_AUTH_INITIAL_SYNC: 'true'
|
||||
SKIP_MU_AUTH_INITIAL_SYNC: "true"
|
||||
HEALING_PATCH_GRAPH_BATCH_SIZE: 500
|
||||
volumes:
|
||||
- ./config/delta-producer/administrative-units:/config
|
||||
@@ -263,7 +263,7 @@ services:
|
||||
ERROR_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
RELATIVE_FILE_PATH: "deltas/administrative-units"
|
||||
PUBLISHER_URI: "http://data.lblod.info/services/delta-production-json-diff-file-manager/administrative-units"
|
||||
PUBLICATION_GRAPH: 'http://redpencil.data.gift/id/deltas/producer/administrative-units'
|
||||
PUBLICATION_GRAPH: "http://redpencil.data.gift/id/deltas/producer/administrative-units"
|
||||
DELTA_INTERVAL_MS: 10000
|
||||
PRETTY_PRINT_DIFF_JSON: "true"
|
||||
volumes:
|
||||
@@ -274,22 +274,22 @@ services:
|
||||
- db:database
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
################################################################################
|
||||
# DELTA ADMINISTRATIVE-UNITS: END
|
||||
################################################################################
|
||||
################################################################################
|
||||
# DELTA ORGANIZATIONS: START
|
||||
################################################################################
|
||||
################################################################################
|
||||
# DELTA ADMINISTRATIVE-UNITS: END
|
||||
################################################################################
|
||||
################################################################################
|
||||
# DELTA ORGANIZATIONS: START
|
||||
################################################################################
|
||||
delta-producer-bg-jobs-initiator-organizations:
|
||||
image: lblod/delta-producer-background-jobs-initiator:0.3.1
|
||||
environment:
|
||||
JOBS_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
DUMP_FILE_CREATION_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/organizations'
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations'
|
||||
HEALING_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations'
|
||||
CRON_PATTERN_DUMP_JOB: '42 * * * *' # At minute 42 every hour
|
||||
CRON_PATTERN_HEALING_JOB: '0 0 4 * * *' # everyday at 4 AM
|
||||
START_INITIAL_SYNC: 'false' # prefer to disable it now. We want to have feeling with how the DB acts.
|
||||
DUMP_FILE_CREATION_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/organizations"
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations"
|
||||
HEALING_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations"
|
||||
CRON_PATTERN_DUMP_JOB: "40 * * * *" # At minute 40 every hour
|
||||
CRON_PATTERN_HEALING_JOB: "0 0 4 * * *" # everyday at 4 AM
|
||||
START_INITIAL_SYNC: "false" # prefer to disable it now. We want to have feeling with how the DB acts.
|
||||
labels:
|
||||
- "logging=true"
|
||||
links:
|
||||
@@ -302,13 +302,15 @@ services:
|
||||
MAX_BODY_SIZE: "50mb"
|
||||
JOBS_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
RELATIVE_FILE_PATH: "deltas/organizations"
|
||||
PUBLICATION_GRAPH: 'http://redpencil.data.gift/id/deltas/producer/organizations'
|
||||
HEALING_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations'
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations'
|
||||
PUBLICATION_GRAPH: "http://redpencil.data.gift/id/deltas/producer/organizations"
|
||||
HEALING_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations"
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations"
|
||||
QUEUE_POLL_INTERVAL: 3000
|
||||
USE_VIRTUOSO_FOR_EXPENSIVE_SELECTS: "true" # some queries are just too expensive
|
||||
SKIP_MU_AUTH_INITIAL_SYNC: 'true'
|
||||
SKIP_MU_AUTH_INITIAL_SYNC: "true"
|
||||
HEALING_PATCH_GRAPH_BATCH_SIZE: 500
|
||||
FILES_GRAPH: "http://redpencil.data.gift/id/deltas/producer/organizations-deltas"
|
||||
ACCOUNT: "http://data.lblod.info/foaf/account/id/8df6f1e4-869f-4223-9834-961b01a7bd48"
|
||||
volumes:
|
||||
- ./config/delta-producer/organizations:/config
|
||||
- ./data/files/:/share
|
||||
@@ -324,7 +326,7 @@ services:
|
||||
ERROR_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
RELATIVE_FILE_PATH: "deltas/organizations"
|
||||
PUBLISHER_URI: "http://data.lblod.info/services/delta-production-json-diff-file-manager/organizations"
|
||||
PUBLICATION_GRAPH: 'http://redpencil.data.gift/id/deltas/producer/organizations'
|
||||
PUBLICATION_GRAPH: "http://redpencil.data.gift/id/deltas/producer/organizations"
|
||||
DELTA_INTERVAL_MS: 10000
|
||||
PRETTY_PRINT_DIFF_JSON: "true"
|
||||
volumes:
|
||||
@@ -335,24 +337,23 @@ services:
|
||||
- db:database
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
################################################################################
|
||||
# DELTA ORGANIZATIONS: END
|
||||
################################################################################
|
||||
################################################################################
|
||||
# DELTA ORGANIZATIONS: END
|
||||
################################################################################
|
||||
|
||||
|
||||
################################################################################
|
||||
# DELTA PUBLIC INFORMATION: START
|
||||
################################################################################
|
||||
################################################################################
|
||||
# DELTA PUBLIC INFORMATION: START
|
||||
################################################################################
|
||||
delta-producer-bg-jobs-initiator-public:
|
||||
image: lblod/delta-producer-background-jobs-initiator:0.3.1
|
||||
environment:
|
||||
JOBS_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
DUMP_FILE_CREATION_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/public'
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/public'
|
||||
HEALING_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/public'
|
||||
CRON_PATTERN_DUMP_JOB: '11 */4 * * *' # At minute 11 every 4 hours
|
||||
CRON_PATTERN_HEALING_JOB: '0 0 4 * * *' # everyday at 4 AM
|
||||
START_INITIAL_SYNC: 'false' # prefer to disable it now. We want to have feeling with how the DB acts.
|
||||
DUMP_FILE_CREATION_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/public"
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/public"
|
||||
HEALING_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/public"
|
||||
CRON_PATTERN_DUMP_JOB: "11 */4 * * *" # At minute 11 every 4 hours
|
||||
CRON_PATTERN_HEALING_JOB: "0 0 4 * * *" # everyday at 4 AM
|
||||
START_INITIAL_SYNC: "false" # prefer to disable it now. We want to have feeling with how the DB acts.
|
||||
labels:
|
||||
- "logging=true"
|
||||
links:
|
||||
@@ -365,12 +366,12 @@ services:
|
||||
MAX_BODY_SIZE: "50mb"
|
||||
JOBS_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
RELATIVE_FILE_PATH: "deltas/public"
|
||||
PUBLICATION_GRAPH: 'http://redpencil.data.gift/id/deltas/producer/public'
|
||||
HEALING_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/public'
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/public'
|
||||
PUBLICATION_GRAPH: "http://redpencil.data.gift/id/deltas/producer/public"
|
||||
HEALING_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/public"
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/public"
|
||||
QUEUE_POLL_INTERVAL: 3000
|
||||
USE_VIRTUOSO_FOR_EXPENSIVE_SELECTS: "true" # some queries are just too expensive
|
||||
SKIP_MU_AUTH_INITIAL_SYNC: 'true'
|
||||
SKIP_MU_AUTH_INITIAL_SYNC: "true"
|
||||
HEALING_PATCH_GRAPH_BATCH_SIZE: 500
|
||||
volumes:
|
||||
- ./config/delta-producer/public:/config
|
||||
@@ -387,7 +388,7 @@ services:
|
||||
ERROR_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
RELATIVE_FILE_PATH: "deltas/public"
|
||||
PUBLISHER_URI: "http://data.lblod.info/services/delta-production-json-diff-file-manager/public"
|
||||
PUBLICATION_GRAPH: 'http://redpencil.data.gift/id/deltas/producer/public'
|
||||
PUBLICATION_GRAPH: "http://redpencil.data.gift/id/deltas/producer/public"
|
||||
DELTA_INTERVAL_MS: 10000
|
||||
PRETTY_PRINT_DIFF_JSON: "true"
|
||||
volumes:
|
||||
@@ -398,16 +399,156 @@ services:
|
||||
- db:database
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
################################################################################
|
||||
# DELTA PUBLIC INFORMATION: END
|
||||
################################################################################
|
||||
################################################################################
|
||||
# DELTA PUBLIC INFORMATION: END
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# DELTA WORSHIP POSTS: START
|
||||
################################################################################
|
||||
delta-producer-bg-jobs-initiator-worship-posts:
|
||||
image: lblod/delta-producer-background-jobs-initiator:0.3.1
|
||||
environment:
|
||||
JOBS_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
DUMP_FILE_CREATION_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/worship-posts"
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/worship-posts"
|
||||
HEALING_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/worship-posts"
|
||||
CRON_PATTERN_DUMP_JOB: "17 */4 * * *" # At minute 17 every 4 hours
|
||||
CRON_PATTERN_HEALING_JOB: "0 0 3 * * *" # everyday at 3 AM
|
||||
START_INITIAL_SYNC: "false" # prefer to disable it now. We want to have feeling with how the DB acts.
|
||||
labels:
|
||||
- "logging=true"
|
||||
links:
|
||||
- db:database
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
delta-producer-pub-graph-maintainer-worship-posts:
|
||||
image: lblod/delta-producer-publication-graph-maintainer:0.15.1
|
||||
environment:
|
||||
MAX_BODY_SIZE: "50mb"
|
||||
JOBS_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
RELATIVE_FILE_PATH: "deltas/worship-posts"
|
||||
PUBLICATION_GRAPH: "http://redpencil.data.gift/id/deltas/producer/worship-posts"
|
||||
HEALING_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/worship-posts"
|
||||
INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/worship-posts"
|
||||
QUEUE_POLL_INTERVAL: 3000
|
||||
USE_VIRTUOSO_FOR_EXPENSIVE_SELECTS: "true" # some queries are just too expensive
|
||||
SKIP_MU_AUTH_INITIAL_SYNC: "true"
|
||||
HEALING_PATCH_GRAPH_BATCH_SIZE: 500
|
||||
SERVE_DELTA_FILES: "true"
|
||||
PUBLISHER_URI: "http://data.lblod.info/services/delta-production-json-diff-file-manager/worship-posts"
|
||||
DELTA_INTERVAL_MS: 10000
|
||||
PRETTY_PRINT_DIFF_JSON: "true"
|
||||
ERROR_GRAPH: "http://mu.semte.ch/graphs/organisatieportaal"
|
||||
volumes:
|
||||
- ./config/delta-producer/worship-posts:/config
|
||||
- ./data/files/:/share
|
||||
links:
|
||||
- db:database
|
||||
- triplestore:virtuoso
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
################################################################################
|
||||
# DELTA WORSHIP POSTS: END
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# MU SEARCH - TODO USE THE CORRECT IMAGE ONCE INHERITANCE IS IN MU SEARCH
|
||||
################################################################################
|
||||
################################################################################
|
||||
# DELTA CONSUMERS
|
||||
################################################################################
|
||||
################################################################################
|
||||
# LOKET MANDATEN CONSUMERS
|
||||
################################################################################
|
||||
mandaten-consumer:
|
||||
image: lblod/delta-consumer:0.0.14
|
||||
environment:
|
||||
DCR_SERVICE_NAME: "mandatendatabank-consumer"
|
||||
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # replace with link to Loket API
|
||||
DCR_SYNC_DATASET_SUBJECT: "http://data.lblod.info/datasets/delta-producer/dumps/MandatarissenCacheGraphDump"
|
||||
DCR_INITIAL_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/consumer/initialSync/mandatarissen"
|
||||
DCR_DELTA_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/consumer/deltaSync/mandatarissen"
|
||||
DCR_JOB_CREATOR_URI: "http://data.lblod.info/services/id/mandatendatabank-consumer"
|
||||
DCR_DISABLE_INITIAL_SYNC: "true"
|
||||
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES: "true"
|
||||
DCR_SYNC_FILES_PATH: "/sync/mandatarissen/files"
|
||||
FILE_SYNC_GRAPH: "http://mu.semte.ch/graphs/temp/original-physical-files-data"
|
||||
KEEP_DELTA_FILES: "true"
|
||||
volumes:
|
||||
- ./config/loket-consumer/mandate-dispatching:/config/triples-dispatching/custom-dispatching
|
||||
- ./data/files/consumer-files/mandaten:/consumer-files/
|
||||
restart: always
|
||||
labels:
|
||||
- "logging=true"
|
||||
links:
|
||||
- db:database
|
||||
- triplestore:virtuoso
|
||||
logging: *default-logging
|
||||
|
||||
################################################################################
|
||||
# LOKET LEIDINGGEVENDEN CONSUMERS
|
||||
################################################################################
|
||||
leidinggevenden-consumer:
|
||||
image: lblod/delta-consumer:0.0.14
|
||||
environment:
|
||||
DCR_SERVICE_NAME: "leidinggevenden-consumer"
|
||||
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # replace with link to Loket API
|
||||
DCR_SYNC_DATASET_SUBJECT: "http://data.lblod.info/datasets/delta-producer/dumps/LeidinggevendenCacheGraphDump"
|
||||
DCR_INITIAL_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/consumer/initialSync/leidinggevenden"
|
||||
DCR_DELTA_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/consumer/deltaSync/leidinggevenden"
|
||||
DCR_JOB_CREATOR_URI: "http://data.lblod.info/services/id/leidinggevenden-consumer"
|
||||
DCR_DISABLE_INITIAL_SYNC: "true"
|
||||
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES: "true"
|
||||
DCR_SYNC_FILES_PATH: "/sync/leidinggevenden/files"
|
||||
FILE_SYNC_GRAPH: "http://mu.semte.ch/graphs/temp/original-physical-files-data"
|
||||
KEEP_DELTA_FILES: "true"
|
||||
volumes:
|
||||
- ./config/loket-consumer/leidinggevenden-dispatching:/config/triples-dispatching/custom-dispatching
|
||||
- ./data/files/consumer-files/leidinggevenden:/consumer-files/
|
||||
restart: always
|
||||
labels:
|
||||
- "logging=true"
|
||||
links:
|
||||
- db:database
|
||||
- triplestore:virtuoso
|
||||
logging: *default-logging
|
||||
|
||||
################################################################################
|
||||
# LOKET WORSHIP SENSITIVE CONSUMERS
|
||||
################################################################################
|
||||
worship-services-sensitive-consumer:
|
||||
image: lblod/delta-consumer:0.0.14
|
||||
environment:
|
||||
DCR_SYNC_BASE_URL: "https://loket.lblod.info/"
|
||||
DCR_SERVICE_NAME: "worship-services-sensitive-consumer"
|
||||
DCR_SYNC_FILES_PATH: "/sync/worship-services-sensitive/files"
|
||||
DCR_SYNC_DATASET_SUBJECT: "http://data.lblod.info/datasets/delta-producer/dumps/WorshipServicesSensitiveCacheGraphDump"
|
||||
DCR_INITIAL_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/consumer/wsSensitive"
|
||||
DCR_DELTA_SYNC_JOB_OPERATION: "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/consumer/wsSensitiveDeltaFileSyncing"
|
||||
DCR_JOB_CREATOR_URI: "http://data.lblod.info/services/id/worship-services-sensitive-consumer"
|
||||
DCR_DISABLE_INITIAL_SYNC: "true"
|
||||
FILE_SYNC_GRAPH: "http://mu.semte.ch/graphs/temp/original-physical-files-data"
|
||||
DCR_KEEP_DELTA_FILES: "true"
|
||||
DCR_DELTA_FILE_FOLDER: "/consumer-files"
|
||||
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES: "false"
|
||||
volumes:
|
||||
- ./config/loket-consumer/positions-dispatching:/config/triples-dispatching/custom-dispatching
|
||||
- ./data/files/consumer-files/worship-services-sensitive:/consumer-files/
|
||||
restart: always
|
||||
labels:
|
||||
- "logging=true"
|
||||
links:
|
||||
- db:database
|
||||
- triplestore:virtuoso
|
||||
logging: *default-logging
|
||||
|
||||
################################################################################
|
||||
# DELTA CONSUMERS: END
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# MU SEARCH
|
||||
################################################################################
|
||||
search:
|
||||
image: nbittich/mu-search:wip-inheritance-alpha2 # Bump to fixed version when merged and release to the original repo
|
||||
image: semtech/mu-search:0.9.0-beta.2
|
||||
links:
|
||||
- db:database
|
||||
restart: always
|
||||
@@ -418,10 +559,20 @@ services:
|
||||
volumes:
|
||||
- ./data/elasticsearch/:/usr/share/elasticsearch/data
|
||||
environment:
|
||||
- discovery.type=single-node
|
||||
- discovery.type=single-node
|
||||
restart: always
|
||||
|
||||
error-report-service:
|
||||
image: lblod/error-report-service:0.1.0
|
||||
links:
|
||||
- db:database
|
||||
|
||||
|
||||
###################################################################################
|
||||
# MU SCRIPTS
|
||||
# #################################################################################
|
||||
project-scripts:
|
||||
image: semtech/mu-scripts:1.0.0
|
||||
volumes:
|
||||
- ./scripts/project:/app/scripts/
|
||||
restart: "no"
|
||||
|
||||
21
scripts/project/config.json
Normal file
21
scripts/project/config.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"version": "0.1",
|
||||
"scripts": [
|
||||
{
|
||||
"documentation": {
|
||||
"command": "mu-search-delta",
|
||||
"description": "produce delta for mu-search",
|
||||
"arguments": []
|
||||
},
|
||||
"environment": {
|
||||
"image": "node:16",
|
||||
"interactive": true,
|
||||
"script": "mu-search-delta/build.sh",
|
||||
"join_networks": true
|
||||
},
|
||||
"mounts": {
|
||||
"app": "/data/app/"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
scripts/project/mu-search-delta/.gitignore
vendored
Normal file
1
scripts/project/mu-search-delta/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
43
scripts/project/mu-search-delta/README.md
Normal file
43
scripts/project/mu-search-delta/README.md
Normal file
@@ -0,0 +1,43 @@
|
||||
#### Scripts mu-search-delta
|
||||
* make the script executable: `chmod a+x scripts/project/mu-search-delta/build.sh`
|
||||
* add your delta messages in json format in `config/search-migrations`, e.g:
|
||||
```js
|
||||
// config/search-migrations/2023/001-delete-bedinaeren.json
|
||||
[
|
||||
{
|
||||
"deletes": [
|
||||
{
|
||||
"subject": {
|
||||
"type": "uri",
|
||||
"value": "http://data.lblod.info/id/mandatarissen/807a3e07c95fe40962d64695069af946"
|
||||
},
|
||||
"predicate": {
|
||||
"type": "uri",
|
||||
"value": "http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan"
|
||||
},
|
||||
"object": {
|
||||
"type": "uri",
|
||||
"value": "http://data.lblod.info/id/personen/620523C451BFC225E4ECFA97"
|
||||
}
|
||||
},
|
||||
{
|
||||
"subject": {
|
||||
"type": "uri",
|
||||
"value": "http://data.lblod.info/id/mandatarissen/40ed3cb19f9fa33e47b39016780dce1d"
|
||||
},
|
||||
"predicate": {
|
||||
"type": "uri",
|
||||
"value": "http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan"
|
||||
},
|
||||
"object": {
|
||||
"type": "uri",
|
||||
"value": "http://data.lblod.info/id/personen/620523C451BFC225E4ECFA97"
|
||||
}
|
||||
}
|
||||
],
|
||||
"inserts": []
|
||||
}
|
||||
]
|
||||
```
|
||||
* make sure virtuoso, mu-auth, elasticsearch & mu search are running
|
||||
* run `mu script project-scripts mu-search-delta`
|
||||
4
scripts/project/mu-search-delta/build.sh
Executable file
4
scripts/project/mu-search-delta/build.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
mkdir -p /data/app/config/search-migrations
|
||||
npm i
|
||||
node script.mjs
|
||||
144
scripts/project/mu-search-delta/package-lock.json
generated
Normal file
144
scripts/project/mu-search-delta/package-lock.json
generated
Normal file
@@ -0,0 +1,144 @@
|
||||
{
|
||||
"name": "mu-search-delta",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mu-search-delta",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"node-fetch": "^3.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/data-uri-to-buffer": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
|
||||
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
|
||||
"engines": {
|
||||
"node": ">= 12"
|
||||
}
|
||||
},
|
||||
"node_modules/fetch-blob": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
|
||||
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/jimmywarting"
|
||||
},
|
||||
{
|
||||
"type": "paypal",
|
||||
"url": "https://paypal.me/jimmywarting"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"node-domexception": "^1.0.0",
|
||||
"web-streams-polyfill": "^3.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20 || >= 14.13"
|
||||
}
|
||||
},
|
||||
"node_modules/formdata-polyfill": {
|
||||
"version": "4.0.10",
|
||||
"resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
|
||||
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
|
||||
"dependencies": {
|
||||
"fetch-blob": "^3.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/node-domexception": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
||||
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/jimmywarting"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://paypal.me/jimmywarting"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=10.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/node-fetch": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz",
|
||||
"integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==",
|
||||
"dependencies": {
|
||||
"data-uri-to-buffer": "^4.0.0",
|
||||
"fetch-blob": "^3.1.4",
|
||||
"formdata-polyfill": "^4.0.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/node-fetch"
|
||||
}
|
||||
},
|
||||
"node_modules/web-streams-polyfill": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",
|
||||
"integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"data-uri-to-buffer": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
|
||||
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="
|
||||
},
|
||||
"fetch-blob": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
|
||||
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
|
||||
"requires": {
|
||||
"node-domexception": "^1.0.0",
|
||||
"web-streams-polyfill": "^3.0.3"
|
||||
}
|
||||
},
|
||||
"formdata-polyfill": {
|
||||
"version": "4.0.10",
|
||||
"resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
|
||||
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
|
||||
"requires": {
|
||||
"fetch-blob": "^3.1.2"
|
||||
}
|
||||
},
|
||||
"node-domexception": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
||||
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz",
|
||||
"integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==",
|
||||
"requires": {
|
||||
"data-uri-to-buffer": "^4.0.0",
|
||||
"fetch-blob": "^3.1.4",
|
||||
"formdata-polyfill": "^4.0.10"
|
||||
}
|
||||
},
|
||||
"web-streams-polyfill": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",
|
||||
"integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q=="
|
||||
}
|
||||
}
|
||||
}
|
||||
14
scripts/project/mu-search-delta/package.json
Normal file
14
scripts/project/mu-search-delta/package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "mu-search-delta",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "script.mjs",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Nordine Bittich",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"node-fetch": "^3.3.0"
|
||||
}
|
||||
}
|
||||
82
scripts/project/mu-search-delta/script.mjs
Normal file
82
scripts/project/mu-search-delta/script.mjs
Normal file
@@ -0,0 +1,82 @@
|
||||
import fs from 'fs';
|
||||
import fetch from 'node-fetch';
|
||||
import path from 'path';
|
||||
|
||||
const CONFIG_PATH = process.env.SEARCH_CONFIG_PATH || '/data/app/config/search-migrations';
|
||||
const HISTORY_PATH = process.env.HISTORY_PATH || CONFIG_PATH + '/.migration_history';
|
||||
const MU_SEARCH_DELTA_URL = process.env.MU_SEARCH_DELTA_URL || 'http://search/update';
|
||||
const SEARCH_MIGRATIONS_DIR = process.env.SEARCH_MIGRATIONS_DIR || CONFIG_PATH;
|
||||
const CONTENT_TYPE_JSON_API = { 'Content-Type': 'application/vnd.api+json' };
|
||||
|
||||
function read(fd, len) {
|
||||
const buff = Buffer.alloc(len),
|
||||
pos = 0, offset = 0;
|
||||
fs.readSync(fd, buff, offset, len, pos);
|
||||
return buff.toString();
|
||||
}
|
||||
|
||||
function readDirRecursive(dir, filterHistory = [], filterExtensions = ["json"]) {
|
||||
const files = fs.readdirSync(dir);
|
||||
|
||||
const resultFiles = [];
|
||||
|
||||
for (const file of files) {
|
||||
const filePath = path.join(dir, file);
|
||||
const stat = fs.statSync(filePath);
|
||||
if (stat.isDirectory()) {
|
||||
resultFiles.push(...(readDirRecursive(`${dir}/${file}`, filterHistory)));
|
||||
} else if (filterExtensions.some((ext) => filePath.endsWith(ext)) && !filterHistory.includes(filePath)) {
|
||||
resultFiles.push({
|
||||
time: stat.atimeMs,
|
||||
file: filePath,
|
||||
});
|
||||
} else {
|
||||
console.log(`filter file ${filePath}`);
|
||||
}
|
||||
}
|
||||
|
||||
return resultFiles.sort((a, b) => a.time - b.time);
|
||||
}
|
||||
|
||||
// main
|
||||
|
||||
async function main() {
|
||||
const historyFileDescriptor = fs.openSync(HISTORY_PATH, 'a+');
|
||||
const historyFileLen = fs.statSync(HISTORY_PATH).size;
|
||||
|
||||
const history = read(historyFileDescriptor, historyFileLen)
|
||||
.split(/\r?\n/)
|
||||
.map((f) => f.trim())
|
||||
.filter((f) => f?.length);
|
||||
|
||||
const fileNames = readDirRecursive(SEARCH_MIGRATIONS_DIR, history);
|
||||
console.log(`processing ${fileNames.length} migration(s)`);
|
||||
for (const { file } of fileNames) {
|
||||
console.log(`Current file: ${file}`);
|
||||
const payload = fs.readFileSync(file);
|
||||
|
||||
try {
|
||||
JSON.parse(payload);
|
||||
} catch (e) {
|
||||
console.error("Verify your migration. Exit...");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const r = await fetch(MU_SEARCH_DELTA_URL, {
|
||||
method: "post",
|
||||
body: payload,
|
||||
headers: CONTENT_TYPE_JSON_API,
|
||||
});
|
||||
console.log(`"[Delta]=> Status: ${r.status} `);
|
||||
if (r.status == 200) {
|
||||
const responseBody = await r.json();
|
||||
console.log(`response ${JSON.stringify(responseBody)}`);
|
||||
fs.appendFileSync(HISTORY_PATH, file + '\n');
|
||||
} else {
|
||||
console.error("an error occurred. check your migration, make sure mu search is running.");
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main().then(() => console.log("Done."));
|
||||
Reference in New Issue
Block a user