JSON Cache
No-SQL Interface
Databases of the modules provid a No-SQL interface where the data of the main table and the depending tables are merged as JSON.
Table JsonCache
classDiagram class JsonCache { ID int URI varchar 500 DisplayText nvarchar 500 LogUpdatedWhen datetime Data JSON }
This table is filled via the stored procedure procFillJsonCache.
procFillJsonCache is started by a update trigger trgUpd… of the main table in the database
Interface in clients
All modules provide data via a cache table. In the header of the clients you can inspect the content of the JsonCache with a click on the button.
Example
The JsonCache of the current dataset will be shown as in the example below:
[
{
"Type": "Taxon",
"ID": 4403792,
"Attributes": {
"FullName": "Arachnida Cuvier, 1812",
"Rank": "cl.",
"GenusOrSupragenericName": "Arachnida",
"Authors": "Cuvier",
"Publication": ". 1812",
"Project": [
{
"Project": "SNSBnames"
}
],
"Checklist": {
"Analysis": [
{
"Checklist": "TaxRef_SNSB_NHC-Pests",
"Analysis": "IPM | Group",
"Value": "70"
},
{
"Checklist": "TaxRef_SNSB_NHC-Beneficials",
"Analysis": "IPM | Group",
"Value": "70"
},
{
"Checklist": "TaxRef_SNSB_NHC-Bycatchs",
"Analysis": "IPM | Group",
"Value": "70"
}
]
},
"Synonymy": [
{
"ID": 4403792,
"FullName": "Arachnida Cuvier, 1812",
"Name": "Arachnida",
"Type": "accepted name"
}
],
"HierarchyListCache": [
{
"HierarchyListCache": "Animalia | Arthropoda | Arachnida"
}
],
"Hierarchy": [
{
"ID": 4403792,
"FullName": "Arachnida Cuvier, 1812",
"Name": "Arachnida",
"Rank": "cl."
},
{
"ID": 4403934,
"FullName": "Arthropoda Gravenhorst, 1843",
"Name": "Arthropoda",
"Rank": "phyl./div."
},
{
"ID": 4403805,
"FullName": "Animalia Linnaeus, 1758",
"Name": "Animalia",
"Rank": "reg."
}
],
"CommonNames": [
{
"CommonName": "spider",
"LanguageCode": "en",
"CountryCode": "GB",
"Context": "IPM"
},
{
"CommonName": "Spinnentier",
"LanguageCode": "de",
"CountryCode": "DE",
"Context": "IPM"
}
],
"Resource": [
{
"URI": "https://museumsschaedlinge.de/gaeste/",
"Title": "diverse animals that migrate or are introduced into buildings seasonally, generally don't casue any damage to objects",
"Type": "information"
}
]
}
}
]
Update
Apart of the update via the Trigger (see below) you can update the JsonCache via the update button underneath the button.
To update the JsonCache for the whole database select Administration - JsonCache… from the menu. a window as shown below will open where you can update the JsonCache for single datasets or the whole database.
Summary
graph TD; TaxonName[main table in database] -->|Update in table| trgUpdTaxonName(trgUpd.. of main table in database) Mainform[Buttons in main form] -->ButtonUpdateSingle[Update single dataset] --> procFillJsonCache Mainform -->ButtonShowSingle[Show single dataset] --> JsonCache trgUpdTaxonName --> procFillJsonCache(procFillJsonCache) procFillJsonCache -->JsonCache[JsonCache] Adminform[Administration form] -->AdminUpdateSingle[Update single dataset] --> procFillJsonCache Adminform --> AdminUpdateDB[Update for whole database] --> procFillJsonCache Adminform --> JsonCache
OpenAPI
… hier kommt mal swagger hin sobald verfügbar