{"id":31202089,"url":"https://github.com/programmfabrik/easydb-custom-data-type-gazetteer","last_synced_at":"2025-09-20T13:06:12.029Z","repository":{"id":97949410,"uuid":"143708365","full_name":"programmfabrik/easydb-custom-data-type-gazetteer","owner":"programmfabrik","description":"easydb custom data type to support linking to https://gazetteer.dainst.org","archived":false,"fork":false,"pushed_at":"2025-05-14T14:32:34.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-14T15:44:36.045Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/programmfabrik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-08-06T09:46:27.000Z","updated_at":"2025-05-14T14:32:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"4a252ac4-f003-4dc3-9135-6aad55157b73","html_url":"https://github.com/programmfabrik/easydb-custom-data-type-gazetteer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/programmfabrik/easydb-custom-data-type-gazetteer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmfabrik%2Feasydb-custom-data-type-gazetteer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmfabrik%2Feasydb-custom-data-type-gazetteer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmfabrik%2Feasydb-custom-data-type-gazetteer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmfabrik%2Feasydb-custom-data-type-gazetteer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/programmfabrik","download_url":"https://codeload.github.com/programmfabrik/easydb-custom-data-type-gazetteer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmfabrik%2Feasydb-custom-data-type-gazetteer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276099600,"owners_count":25585038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-20T13:06:09.216Z","updated_at":"2025-09-20T13:06:12.023Z","avatar_url":"https://github.com/programmfabrik.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Custom data type gazetteer\n\nThis is a [custom data type](https://docs.easydb.de/en/technical/plugins/customdatatype/) for [easydb](https://docs.easydb.de/en/).\n\nThis custom data type consumes the [iDAI.gazetteer](https://gazetteer.dainst.org) API and provides an input that can be used to search by name or ID.\n\n### Data structure\n```json\n{\n        \"displayName\": \"Buenos Aires\",\n        \"iconName\": \"fa-map\",\n        \"gazId\": \"2087760\",\n        \"position\": {\n            \"lat\": -34.61315,\n            \"lng\": -58.37723\n        },\n        \"types\": [\n            \"populated-place\"\n        ],\n        \"otherNames\": [\n                            {\n                                \"language\": \"ell\",\n                                \"title\": \"Μπουένος Άιρες\"\n                            },\n                            {\n                                \"language\": \"ara\",\n                                \"title\": \"بوينس آيرس\"\n                            },\n                            {\n                                \"language\": \"zho\",\n                                \"title\": \"布宜诺斯艾利斯\"\n                            },\n                            {\n                                \"language\": \"spa\",\n                                \"title\": \"Buenos Aires\"\n                            },\n                            {\n                                \"language\": \"rus\",\n                                \"title\": \"Буэнос-Айрес\"\n                            },\n                            {\n                                \"language\": \"spa\",\n                                \"title\": \"Santa María del Buen Ayre\"\n                            },\n                            {\n                                \"language\": \"spa\",\n                                \"title\": \"Ciudad de La Santísima Trinidad y Puerto de Santa María del Buen Ayre\"\n                            },\n                            {\n                                \"language\": \"spa\",\n                                \"title\": \"Baires\"\n                            },\n                            {\n                                \"language\": \"lat\",\n                                \"title\": \"Bonaëropolis\"\n                            },\n                            {\n                                \"language\": \"zho\",\n                                \"title\": \"布宜諾斯艾利斯\"\n                            },\n                            {\n                                \"language\": \"eng\",\n                                \"title\": \"Buenos Aires\"\n                            },\n                            {\n                                \"language\": \"ell\",\n                                \"title\": \"Μπουένος ΄Aιρες\"\n                            },\n                            {\n                                \"language\": \"spa\",\n                                \"title\": \"Ciudad Autónoma de Buenos Aires\"\n                            },\n                            {\n                                \"language\": \"ita\",\n                                \"title\": \"Buenos Aires\"\n                            },\n                            {\n                                \"language\": \"fra\",\n                                \"title\": \"Buenos Aires\"\n                            },\n                            {\n                                \"language\": \"por\",\n                                \"title\": \"Buenos Aires\"\n                            },\n                            {\n                                \"language\": \"deu\",\n                                \"title\": \"Buenos Aires\"\n                            }\n        ],\n        \"_fulltext\": {\n                    \"text\": [\n                        \"Μπουένος Άιρες\",\n                        \"بوينس آيرس\",\n                        \"布宜诺斯艾利斯\",\n                        \"Buenos Aires\",\n                        \"Буэнос-Айрес\",\n                        \"Santa María del Buen Ayre\",\n                        \"Ciudad de La Santísima Trinidad y Puerto de Santa María del Buen Ayre\",\n                        \"Baires\",\n                        \"Bonaëropolis\",\n                        \"布宜諾斯艾利斯\",\n                        \"Buenos Aires\",\n                        \"Μπουένος ΄Aιρες\",\n                        \"Ciudad Autónoma de Buenos Aires\",\n                        \"Buenos Aires\",\n                        \"Buenos Aires\",\n                        \"Buenos Aires\",\n                        \"Buenos Aires\",\n                        \"Buenos Aires\"\n                    ],\n                    \"string\": \"2087760\"\n        },\n        \"_standard\": {\n            \"text\": \"Buenos Aires\"\n        }\n}\n```\n\nThe keys [_fulltext and _standard](https://docs.easydb.de/en/technical/plugins/customdatatype/#general-keys) are used to search.\n\n### Automatic update\n\nThis plugin uses the [automatic updater for custom data types](https://docs.easydb.de/en/technical/plugins/customdatatype/customdatatype_updater/) to update the data when the data provided by [iDAI.gazetteer](https://gazetteer.dainst.org) changes.\n\nThe update script runs at a specified interval of time that is configured using the YML file.\n\n### Automatic updating and inserting of objects with Gazetteer fields\n\nThis plugin has the ability to automatically update and insert hierarchic objecttypes with Gazetteer fields.\n\nWhen an object with a Gazetteer field, that is configured for this update in the base config (see below), the plugin reads the Gazetteer ID from a source field (or alternatively from the target field), the object and all its parents are requested from [iDAI.gazetteer](https://gazetteer.dainst.org).\n\nThe tree structure of the Gazetteer is mirrored. Missing parents are automatically created and inserted.\n\n#### Base config\n\nYou can find the settings for this plugin at the \"Gazetteer\" tab of the base config.\n\n* **Enabled**\n    * Enable or disable the update for the selected objecttype\n* **Object type**\n    * Select a hierarchic objecttype from the dropdown menu\n    * The objecttypes are prefiltered:\n        * Only object types can be selected that have at least one Gazetteer type field outside of a nested table\n        * The object type must be hierarchical to map the hierarchical Gazetteer structure\n        * No object types can be selected that have fields with **NOT-NULL** or check constraints (apart from the target field and fields inside nested tables), as the plugin cannot fulfill the constraints\n* **Source field**\n    * The field where the plugin reads the Gazetteer ID that is used for the search\n    * Must be a text field\n    * If it is not selected, the plugin will try to parse the ID from the target field, if it has been prefilled with custom data\n* **Target field**\n    * The field where the plugin writes the generated custom data\n    * must be of type *Gazetteer*\n* **Update Gazetteer entries also when changing objects**\n    * By default, objects with Gazetteer entries are only updated by the plugin when they are inserted\n    * enable this checkbox if the Gazetteer entries should be updated after any update of the object\n\n#### Example\n\nA hierarchic objecttype has been configured for the update:\n\n* `gazetteer_data`\n    * `gazetteer_id` (of type `text`)\n    * `custom_data` (of custom type `gazetteer`)\n\n`gazetteer_id` is configured as the source field, `custom_data` as the target field for the custom data that has been requested.\n\nThe following Gazetteer entries have already been inserted into the hierarchy:\n\n* World (ID [`2042600`](https://gazetteer.dainst.org/place/2042600))\n    * Europe (ID [`2044223`](https://gazetteer.dainst.org/place/2044223))\n        * Germany (ID [`2044274`](https://gazetteer.dainst.org/place/2044274))\n            * Berlin (ID [`2048564`](https://gazetteer.dainst.org/place/2048564))\n\n----\n\n**1)** A new `gazetteer_data` object with the Gazetteer ID [`2052755`](https://gazetteer.dainst.org/place/2052755) (for the city of Hamburg) in field `gazetteer_id` is inserted.\n\nThe plugin will search for the ID and find the custom data, as well as the parents. Since the parent *Germany* is already in the hierarchy, the new Object will be inserted directly at this position:\n\n----\n\n* World\n    * Europe\n        * Germany\n            * Berlin\n            * *Hamburg (ID [`2052755`](https://gazetteer.dainst.org/place/2052755))*\n\n----\n\n**2)** A new `gazetteer_data` object with the Gazetteer ID [`2347833`](https://gazetteer.dainst.org/place/2347833) (for the city of Hanoi in Vietnam) in field `gazetteer_id` is inserted.\n\nAfter searching for the custom data and the parents, there is no direct parent for this Gazetteer entry yet. The plugin searches the deepest existing parent, in this case *World*. The missing parents *Asia* and *Vietnam* are created by the plugin and inserted into the tree:\n\n----\n\n* World\n    * Europe\n        * Germany\n            * Berlin\n            * Hamburg\n    * **Asia (ID [`2042932`](https://gazetteer.dainst.org/place/2042932))**\n        * **Vietnam (ID [`2281934`](https://gazetteer.dainst.org/place/2281934))**\n            * *Hanoi (ID [`2347833`](https://gazetteer.dainst.org/place/2347833))*\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammfabrik%2Feasydb-custom-data-type-gazetteer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogrammfabrik%2Feasydb-custom-data-type-gazetteer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammfabrik%2Feasydb-custom-data-type-gazetteer/lists"}