Skip to content

Commit

Permalink
Merge pull request #33 from CommonGateway/feature/AXCVDWOF-14/tilburg…
Browse files Browse the repository at this point in the history
…-cases-sync

Added working sync for Tilburg cases to OpenIndex Publication
  • Loading branch information
WilcoLouwerse authored Sep 27, 2024
2 parents db84b29 + 4b87c57 commit a9e1d76
Show file tree
Hide file tree
Showing 48 changed files with 1,403 additions and 170 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"title" : "OpenIndex SyncTilburgCasesAction",
"$id" : "https://openwoo.app/openindex.woo.SyncTilburgCasesAction.action.json",
"$schema" : "https://docs.commongateway.nl/schemas/Action.schema.json",
"version" : "0.0.1",
"listens" : [
"tilburg.openindex.default.listens"
],
"configuration" : {
"oin" : "00000001001172773000",
"portalUrl" : "https://conductionnl.github.io/woo-website-tubbergen",
"source" : "https://openwoo.app/source/openindex.tilburg.zaaksysteem.source.json",
"schema" : "https://openwoo.app/schemas/publication.schema.json",
"mapping" : "https://openwoo.app/mapping/openindex.woo.tilburgCaseToWoo.mapping.json",
"organisatie" : "Gemeente Tilburg",
"caseIndex" : "/v1/zaken",
"caseDetail" : "/v1/zaken/:identificatie/informatieobjecten",
"caseDocument" : "/v1/informatieobjecten/:identificatie",
"fileEndpoint" : "https://openwoo.app/openindex.woo.ViewFile.endpoint.json",
"rateLimitStart": "2024-06-06",
"rateLimitEnd": "2024-08-01"
},
"conditions" : {
"==" : [
1,
1
]
},
"class" : "CommonGateway\\OpenIndex\\ActionHandler\\SyncTilburgCasesHandler"
}
15 changes: 15 additions & 0 deletions Installation/Action/openindex.woo.viewFileAction.action.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"title": "OpenIndex ViewFileAction",
"$id": "https://commongateway.nl/openindex.woo.ViewFileAction.action.json",
"$schema": "https://docs.commongateway.nl/schemas/Action.schema.json",
"version": "0.0.1",
"listens": ["woo.openindex.file.view"],
"configuration": {
"schemaThisFileBelongsTo": ["https://openwoo.app/schemas/publication.schema.json", "https://openwoo.app/schemas/attachment.schema.json"]
},
"conditions":
{
"==": [1, 1]
},
"class": "CommonGateway\\OpenIndex\\ActionHandler\\ViewFileHandler"
}
12 changes: 12 additions & 0 deletions Installation/Cronjob/openindex.tilburg.default.cronjob.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"title": "OpenIndex Tilburg default cronjob",
"$id": "https://openwoo.app/openindex.tilburg.default.cronjob.json",
"$schema": "https://docs.commongateway.nl/schemas/Cronjob.schema.json",
"version": "0.0.1",
"description": "This cronjob fires the OpenIndex Tilburg actions every night at 03.00",
"crontab": "0 3 * * *",
"throws": [
"tilburg.openindex.default.listens"
],
"isEnabled": false
}
27 changes: 27 additions & 0 deletions Installation/Mapping/openindex.woo.tilburgCaseToWoo.mapping.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"title" : "OpenIndex TilburgCaseToWoo",
"$id" : "https://openwoo.app/mapping/openindex.woo.tilburgCaseToWoo.mapping.json",
"$schema" : "https://docs.commongateway.nl/schemas/Mapping.schema.json",
"version" : "0.0.1",
"passTrough" : false,
"mapping" : {
"_sourceId" : "identificatie",
"reference" : "identificatie",
"title" : "omschrijving",
"summary" : "zaaktypeomschrijving",
"description" : "zaaktypeomschrijving",
"image" : "",
"category" : "Woo-verzoeken en -besluiten",
"portal" : "",
"publicationDate" : "startdatum",
"featured" : "false",
"schema" : "https://openwoo.app/schemas/metadata.tooi_verzoeken_en_besluiten.schema.json",
"attachments" : "[]",
"data.datumBesluit" : "startdatum",
"data.datumOntvangst": "startdatum"
},
"cast" : {
"featured": "bool",
"attachments" : "jsonToArray"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"title" : "OpenIndex TilburgCustomFields",
"$id" : "https://openwoo.app/mapping/openindex.woo.tilburgCustomFields.mapping.json",
"$schema" : "https://docs.commongateway.nl/schemas/Mapping.schema.json",
"version" : "0.0.1",
"passTrough" : false,
"mapping" : {
"_sourceId" : "id",
"metadata.statuscode" : "statuscode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"title" : "OpenIndex TilburgDocumentSetSourceId",
"$id" : "https://openwoo.app/mapping/openindex.woo.tilburgDocumentSetSourceId.schema.json",
"$schema" : "https://docs.commongateway.nl/schemas/Mapping.schema.json",
"version" : "0.0.1",
"passTrough" : false,
"mapping" : {
"_sourceId" : "identificatie",
"titel" : "Temporarily title so a object gets created for file fetching and url genering."
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"title" : "OpenIndex tilburgDocumentToAttachment",
"$id" : "https://openwoo.app/mapping/openindex.woo.tilburgDocumentToAttachment.mapping.json",
"$schema" : "https://docs.commongateway.nl/schemas/Mapping.schema.json",
"version" : "0.0.1",
"passTrough" : false,
"mapping" : {
"_sourceId" : "identificatie",
"id" : "identificatie",
"title" : "titel",
"accessURL" : "link",
"type" : "formaat"
}
}
4 changes: 2 additions & 2 deletions Installation/Schema/Attachment.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"accessURL": {
"type": "string",
"format": "url",
"description": "The URL to the original document, this URL should be accessible to Open Index. When there is an ‘POST` or `PUT` request to Open Index then Open Index wil try to get the original file from the URL and use it to fill thedocumentText, type, extensionand size` properties",
"description": "The URL to the original document, this URL should be accessible to Open Index. When there is an ‘POST` or `PUT` request to Open Index then Open Index wil try to get the original file from the URL and use it to fill the documentText, type, extension and size` properties",
"required": true
},
"downloadURL": {
Expand Down Expand Up @@ -104,7 +104,7 @@
},
"license": {
"type": "string"
},
}
},
"required": [
"url"
Expand Down
4 changes: 2 additions & 2 deletions Installation/Schema/Metadata.tooi_klachtoordelen.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Metadata TOOI klachtoordelen",
"$id": "https://openwoo.app/schemas/metadata.tooi_klachtoordelen.schema.json",
"$schema": "https://docs.commongateway.nl/schemas/Entity.schema.json",
"version": "0.0.1",
"version": "0.0.2",
"type": "object",
"description": "Schriftelijke oordelen in klachtprocedures.",
"properties": {
Expand Down Expand Up @@ -47,7 +47,7 @@
},
"termijnoverschrijding": {
"type": "string",
"format": "ISO-8601",
"format": "date-time",
"description":"Een (evenuteel) overschrijding van het beantwoordings termijn termijn"
},
"organisatieonderdeel": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Metadata TOOI Woo-verzoeken en -besluiten",
"$id": "https://openwoo.app/schemas/metadata.tooi_wetten_en_algemeen_verbindende_voorschriften.schema.json",
"$id": "https://openwoo.app/schemas/metadata.tooi_verzoeken_en_besluiten.schema.json",
"$schema": "https://docs.commongateway.nl/schemas/Entity.schema.json",
"version": "0.0.1",
"version": "0.0.2",
"type": "object",
"description": "Inhoud van schriftelijke Woo-verzoeken en besluiten daarop, inclusief verstrekte informatie.",
"properties": {
Expand Down Expand Up @@ -47,7 +47,7 @@
},
"termijnoverschrijding": {
"type": "string",
"format": "ISO-8601",
"format": "date-time",
"description":"Een (evenuteel) overschrijding van het beantwoordings termijn termijn"
},
"values": {
Expand Down
14 changes: 14 additions & 0 deletions Installation/Source/openindex.tilburg.zaaksysteem.source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"title" : "OpenIndex Tilburg Zaaksysteem",
"$id" : "https://openwoo.app/source/openindex.tilburg.zaaksysteem.source.json",
"$schema" : "https://docs.commongateway.nl/schemas/Gateway.schema.json",
"version" : "0.0.1",
"description" : "OpenIndex Tilburg Zaaksysteem api",
"location" : "https://secure1.acc.enable-u.cloud/tlb/zaaksysteem/api",
"headers" : {
"Accept" : "*/*",
"Host" : "localhost",
"Content-Type" : "application/json"
},
"isEnabled" : true
}
10 changes: 10 additions & 0 deletions Installation/installation.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
"path": "attachments",
"methods": [],
"version": "0.0.1"
},
{
"$id": "https://openwoo.app/openindex.woo.ViewFile.endpoint.json",
"version": "0.0.1",
"reference": "https://openwoo.app/schemas/attachment.schema.json",
"path": "openindex-view-file",
"methods": ["GET"],
"throws": [
"woo.openindex.file.view"
]
}
]
}
Expand Down
16 changes: 8 additions & 8 deletions Resources/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ services:
- '../../src/DependencyInjection/'
- '../../src/Entity/'
- '../../src/Resources/'
- '../../src/OpenIndex.php'
- '../../src/OpenIndexExtension.php'

# this config only applies to the services created by this file
# _instanceof:
_instanceof:
# actionHandlers whose classes are instances of ActionHandlerInterface will be tagged automatically and set to public
# CommonGateway\OpenIndex\ActionHandler\ActionHandlerInterface:
# public: true
# tags: ['commongateway.action_handlers']
CommonGateway\CoreBundle\ActionHandler\ActionHandlerInterface:
public: true
tags: ['commongateway.action_handlers']

# installers whose classes are instances of InstallerInterface will be tagged automatically and set to public
# CommonGateway\OpenIndex\Installer\InstallerInterface:
# public: true
# tags: ['commongateway.installer']
CommonGateway\CoreBundle\Installer\InstallerInterface:
public: true
tags: ['commongateway.installer']
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"minimum-stability": "dev",
"require": {
"php": ">=8.2",
"commongateway/corebundle": "^1.1.52 | <2.0"
"commongateway/corebundle": "^1.2.23 | <2.0"
},
"require-dev": {
"symfony/dependency-injection": "~3.4|~4.1|~5.0"
Expand Down
11 changes: 7 additions & 4 deletions docs/schema/Attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

An attachment object

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/update-schemas/docs/schema/Attachment.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/tilburg-cases-sync/docs/schema/Attachment.svg)

## Properties

Expand All @@ -14,13 +14,13 @@ An attachment object
| summary | string | A short summary of the subject for the overview page | No |
| description | string | An extensive description of the subject for display on the subject page | No |
| labels | array | Possible labels on the attachment that are used to assess what kind of file it is | No |
| url | string | The URL to the original document, this URL should be accessible to Open Index. When there is an ‘POST` or `PUT` request to Open Index then Open Index wil try to get the original file from the URL and use it to fill the `documentText`,` type`, ` extension` and ` size` properties | Yes |
| content | string | The text from the original document, which is included in the search index to facilitate searching of documents. This value is automatically updated and thus cannot be set via the API | No |
| accessURL | string | The URL to the original document, this URL should be accessible to Open Index. When there is an ‘POST` or `PUT` request to Open Index then Open Index wil try to get the original file from the URL and use it to fill the documentText, type, extension and size` properties | No |
| downloadURL | string | The URL to download the document. | No |
| type | string | The MIME type of the attachment, determined at the time of reading and recorded for display in the UI. This value is automatically updated and thus cannot be set via the API | No |
| extension | string | The extension of the attachment, determined at the time of reading and recorded for display in the UI. This value is automatically updated and thus cannot be set via the API | No |
| size | integer | The size of the attachment in bytes, determined at the time of reading and recorded for display in the UI. This value is automatically updated and thus cannot be set via the API | No |
| anonymization | object | Whether the attachment is properly annonymized and the results there of | No |
| language | object | The language and language level of the object | No |
| languageObject | object | The language and language level of the object | No |
| version_of | string | Is this attachment a version of another attachment, e.g. annonymized or pdf rendering of another document | No |
| hash | string | **Generated**
A file hash is essential for ensuring the uniqueness and integrity of files. It serves several critical purposes:
Expand All @@ -36,3 +36,6 @@ Data Deduplication: In systems that store large amounts of data, file hashes hel
Digital Signatures and Certificates: Hashes are integral to the functioning of digital signatures and certificates, which verify the identity of the sender and ensure that the file has not been altered.

Overall, file hashes are a fundamental tool in data management and cybersecurity, ensuring that files remain unique, intact, and secure. | No |
| published | string | N/A | No |
| modified | string | N/A | No |
| license | string | N/A | No |
9 changes: 6 additions & 3 deletions docs/schema/Attachment.puml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ class Attachment {
+ summary: string
+ description: string
+ labels: array
+ url: string
+ content: string
+ accessURL: string
+ downloadURL: string
+ type: string
+ extension: string
+ size: integer
+ anonymization: object
+ language: object
+ languageObject: object
+ version_of: string
+ hash: string
+ published: string
+ modified: string
+ license: string
}
@enduml
2 changes: 1 addition & 1 deletion docs/schema/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

An externally found index that can be used as a source in federative search queries

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/update-schemas/docs/schema/Index.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/tilburg-cases-sync/docs/schema/Index.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.oc_publiccode.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Adviezen over ontwerpen en andere onderwerpen van adviescolleges of -commissies, exclusief adviezen die betrekking hebben op individuele gevallen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/update-schemas/docs/schema/Metadata.oc_publiccode.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/tilburg-cases-sync/docs/schema/Metadata.oc_publiccode.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.ods_agenda_item.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Adviezen over ontwerpen en andere onderwerpen van adviescolleges of -commissies, exclusief adviezen die betrekking hebben op individuele gevallen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/update-schemas/docs/schema/Metadata.ods_agenda_item.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/tilburg-cases-sync/docs/schema/Metadata.ods_agenda_item.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_adviezen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Adviezen over ontwerpen en andere onderwerpen van adviescolleges of -commissies, exclusief adviezen die betrekking hebben op individuele gevallen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/update-schemas/docs/schema/Metadata.tooi_adviezen.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/tilburg-cases-sync/docs/schema/Metadata.tooi_adviezen.svg)

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Agenda’s en besluitenlijsten van vergaderingen van diverse bestuurlijke organen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/update-schemas/docs/schema/Metadata.tooi_agendas_en_besluitenlijsten_bestuurscolleges.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/tilburg-cases-sync/docs/schema/Metadata.tooi_agendas_en_besluitenlijsten_bestuurscolleges.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_bereikbaarheidsgegevens.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Bereikbaarheidsinformatie van bestuursorganen en hun organisatieonderdelen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/update-schemas/docs/schema/Metadata.tooi_bereikbaarheidsgegevens.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/tilburg-cases-sync/docs/schema/Metadata.tooi_bereikbaarheidsgegevens.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_beschikkingen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Beschikkingen, uitgezonderd specifieke categorieën.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/update-schemas/docs/schema/Metadata.tooi_beschikkingen.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/tilburg-cases-sync/docs/schema/Metadata.tooi_beschikkingen.svg)

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Ingekomen stukken bij diverse overheidsorganen, uitgezonderd bepaalde vertrouwelijke informatie of individuele gevallen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/update-schemas/docs/schema/Metadata.tooi_bij_vertegenwoordigende_organen_ingekomen_stukken.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/tilburg-cases-sync/docs/schema/Metadata.tooi_bij_vertegenwoordigende_organen_ingekomen_stukken.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_convenanten.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Convenanten.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/update-schemas/docs/schema/Metadata.tooi_convenanten.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/tilburg-cases-sync/docs/schema/Metadata.tooi_convenanten.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_jaarplannen_en_jaarverslagen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Jaarplannen en jaarverslagen van bestuursorganen over hun taakuitvoering.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/update-schemas/docs/schema/Metadata.tooi_jaarplannen_en_jaarverslagen.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/tilburg-cases-sync/docs/schema/Metadata.tooi_jaarplannen_en_jaarverslagen.svg)

## Properties

Expand Down
Loading

0 comments on commit a9e1d76

Please sign in to comment.