Genesys PGR issueshttps://gitlab.croptrust.org/groups/genesys-pgr/-/issues2023-01-29T09:13:46+01:00https://gitlab.croptrust.org/genesys-pgr/taxonomy-tools/-/issues/14Cucumis melo2023-01-29T09:13:46+01:00Matija ObrezaCucumis meloHow does GRIN-Global taxonomy database handle *Cucumis melo SUBSP. AGRESTIS VAR. CONOMON* as reported by TWN001?
* *Cucumis melo subsp. agrestis*: [ Cucumis melo L. subsp. agrestis (Naudin) Pangalo](https://npgsweb.ars-grin.gov/gringlob...How does GRIN-Global taxonomy database handle *Cucumis melo SUBSP. AGRESTIS VAR. CONOMON* as reported by TWN001?
* *Cucumis melo subsp. agrestis*: [ Cucumis melo L. subsp. agrestis (Naudin) Pangalo](https://npgsweb.ars-grin.gov/gringlobal/taxonomydetail.aspx?id=404408)
* *Cucumis melo subsp. agrestis var. conomon*: [Cucumis melo L. subsp. agrestis (Naudin) Pangalo var. conomon (Thunb.) Makino](https://npgsweb.ars-grin.gov/gringlobal/taxonomydetail.aspx?id=404418)
```csv
GENUS,SPECIES,SUBTAXA,SPAUTHOR,SUBTAUTHOR
Cucumis,melo,subsp. agrestis,,
Cucumis,melo,subsp. agrestis var. conomon,,
```Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/653Draft: Introducing "Collection name"2023-01-09T16:15:23+01:00Matija ObrezaDraft: Introducing "Collection name"MCPD allows genebanks to exchange accession passport data, and is at the core of the Genesys database. Genesys data is often used for reporting, and the reporting is generally done by crop, but only because there are usually different te...MCPD allows genebanks to exchange accession passport data, and is at the core of the Genesys database. Genesys data is often used for reporting, and the reporting is generally done by crop, but only because there are usually different teams or management approaches used in different crop collections in one genebank. A good example is the ICRAF genebank where the same species (and therefore crop) being managed in a field collection and their seed then in a seed bank, and ICRAF does not report by crop, but by collection.
## New passport field: Collection name
In this ticket we introduce a new field to accession passport data: the name of the collection in the genebank to which this accession belongs. For most genebanks, the collection name will be the same as crop name. In case of ICRAF, they can use "Field bank" and "Seed bank".Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/ui-embedded/-/issues/52Upgrade to Redux toolkit2022-12-01T07:43:08+01:00Matija ObrezaUpgrade to Redux toolkitUpgrade to RTK.
Redux store can keep the Overview data, allowing for narrowing down the options in Accession Search form.Upgrade to RTK.
Redux store can keep the Overview data, allowing for narrowing down the options in Accession Search form.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/917Updated API for requesting material2022-11-21T10:28:08+01:00Matija ObrezaUpdated API for requesting materialgenesys-pgr/genesys-server#640 implements new API for requesting material. This change request modifies how UI handles requests for accessions.
Please implement a new UI with new components and we will delete the original implementation...genesys-pgr/genesys-server#640 implements new API for requesting material. This change request modifies how UI handles requests for accessions.
Please implement a new UI with new components and we will delete the original implementation.
# User: Starting a request
![image](/uploads/f2d9b25716aea11a88fcbb9d30b7749b/image.png)
On "Request for material" click, the list of **all** selected accession `ids` is sent to the API `/api/v1/requests/r/create`. The API returns a **new** `DRAFT` `MaterialRequest` with multiple `MaterialSubRequests`. Please update the typescript classes.
The UI displays the `MaterialSubRequests` and indicates the number of requested accessions for each genebank. This can be a simple `h2` and a `p`:
```ts
{ subRequests.map(subreq => <SubRequestInfo key={ subreq.uuid } value={ subreq } /> }
```
`SubRequestInfo` also includes the of accessions in the sub request.
## Possibility to request via Genesys
The flag `FaoInstitute.allowMaterialRequests` indicates if it is possible to request via Genesys.
If the genebank does not allow for requests via Genesys, the UI displays a message saying "Sorry, XYZ does not allow for initiating requests for material from Genesys. We cannot relay your request directly."
Otherwise we indicate "XYZ allows initiating requests for material from Genesys".
# User: Submitting requests
If there is at least one `MaterialSubRequest` that can be relayed, then "Continue..." leads the user to provide additional info (same as now) and submit the request for validation.
When there are no such requests, "Continue..." is disabled, same as now.
# Admin: Viewing requests
Check that Admin can browse all requests and subrequests.Oleksii PlotnykovOleksii Plotnykovhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/644Request API2022-10-27T10:39:48+02:00Matija ObrezaRequest APIRelated to #640, but with a revised design: The UI remains unchanged at this stage and will send the entire list of accession `ids` to the `/initiate` endpoint. The API will filter out only `historical` accessions -- and keep accessions ...Related to #640, but with a revised design: The UI remains unchanged at this stage and will send the entire list of accession `ids` to the `/initiate` endpoint. The API will filter out only `historical` accessions -- and keep accessions of institutes that don't allow requests. Such `MaterialSubRequests` will have status `IGNORED` (because the institute does not enable requests).
The UI page that says "Your request was received" is updated to show the details of all subrequests, similar to the draft implementation in genesys-pgr/genesys-ui!905:
![image](https://gitlab.croptrust.org/genesys-pgr/genesys-ui/uploads/a68c44d0d97da8bfcfe6374123726832/image.png)Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/622AccessionList2022-03-14T10:30:28+01:00Matija ObrezaAccessionListThe `AccessionList` is a very old implementation that allowed Genesys users to store their lists of accessions in the database. There are still some records in `accession_list` and `accession_listitem` tables :smile: With the new UI we s...The `AccessionList` is a very old implementation that allowed Genesys users to store their lists of accessions in the database. There are still some records in `accession_list` and `accession_listitem` tables :smile: With the new UI we started saving selected accession on the client (`localStorage`) and with that the API support for `AccessionList` was no longer required.
This ticket is to create new APIs to support `AccessionList`.
## Changes to data model
- Drop `AccessionList#shared` column: this must be handled by ACL. If the list is readable by `ROLE_EVERYONE`, then it is `public`. We can add an `isPublic()` getter.
- We need to be able to "tag" entries in the list, the `accession_listitem` needs a new column `grp VARCHAR(10) NULL` that allows the user to "classify" each entry in the list of accessions.
## API
We need the usual CRUD methods, but their implementation must only work on lists that I have created.
The `get/load` method needs to check for `READ` permission on the list: not by ownership!
# UI
The first change to the UI will be the ability to save/browse/load any of the lists the user created.
We now have "My List (X)" menu item, but we probably need to change that to "Selection (X)" and add a menu item (for logged in users) to the logged-in user menu that says "My lists". This loads and displays all lists the user has saved in Genesys.
When a user loads a saved list, the "Selection" list items (title and description) are replaced.
Basically: there is a *currently selected `AccessionList`* with: `title`, `description` and `uuid[]` that can be "Save as...", "Save"-d, "Reload"-ed and "Delete"-d. If I load a list, then "Selection" page should indicate if the list is different from what I have saved on the server.
![image](/uploads/b631899f01676f301c49d1de4b665ac8/image.png)
I think the best thing to do is to change the "Clear list" into a dropdown called "List" that has "Save", "Delete, "Clear", "Save as.."... options.Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/862Accession lists2022-03-14T10:28:49+01:00Matija ObrezaAccession listsgenesys-pgr/genesys-server!677 adds API support for user-managed lists of accessions.
The first change to the UI will be the ability to save/browse/load any of the lists the user created.
We now have "My List (X)" menu item, but we pr...genesys-pgr/genesys-server!677 adds API support for user-managed lists of accessions.
The first change to the UI will be the ability to save/browse/load any of the lists the user created.
We now have "My List (X)" menu item, but we probably need to change that to "Selection (X)" and add a menu item (for logged in users) to the logged-in user menu that says "My lists". This loads and displays all lists the user has saved in Genesys.
When a user loads a saved list, the "Selection" list items (title and description) are replaced.
Basically: there is a *currently selected* `AccessionList` with: `title`, `description` and `uuid[]` that can be "Save as...", "Save"-d, "Reload"-ed and "Delete"-d. If I load a list, then "Selection" page should indicate if the list is different from what I have saved on the server.
![image](https://gitlab.croptrust.org/genesys-pgr/genesys-server/uploads/b631899f01676f301c49d1de4b665ac8/image.png)
I think the best thing to do is to change the "Clear list" into a dropdown called "List" that has "Save", "Delete, "Clear", "Save as.."... options.Maksym TishchenkoMaksym Tishchenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/616Natural query syntax2021-11-16T12:25:16+01:00Matija ObrezaNatural query syntaxQuerying Genesys today requires a construction of a `Filter` object which is not something one could type up from scratch without deep understanding of the JSON model. Users must rely on the Genesys user interface to create queries.
@cr...Querying Genesys today requires a construction of a `Filter` object which is not something one could type up from scratch without deep understanding of the JSON model. Users must rely on the Genesys user interface to create queries.
@crabil demonstrated the use and utility of a more *natural query syntax* that is used by publication repositories. One of the main benefits of such approach is the ability to disconnect the querying syntax from the underlying implementation. This provides forward compatibility with the next implementations of Genesys and assures that user queries can still be executed (maybe not 100%) the same way as with the previous versions.
Examples of natural queries:
- `cassava[crop]` equals `{ "crop": [ "cassava" ] }`
- `(cassava[crop]) OR (banana[crop])`: `{ "crop": [ "cassava", "banana" ] }`
- `((cassava[crop]) OR (banana[crop])) AND (cimmyt[holder])`: `{ "crop": [ "cassava", "banana" ], "institute": { "code": [ "MEX002" ] } }`
- `amarill*`: `{ "_text": "amarill*" }`
- `cass*[cropName]`: `{ "cropName": { "sw": [ "cass" ] } }` (`filter.crop` would need `StringFilter` support)
- `TMp[accessionNumber]`: `{ "accessionNumber": { "sw": [ "TMp" ] } }`
- `2020:2021[created]` is an example of a date range: `{ "createdDate": { "ge": "2020-01-01T...", "lt": "2021-01-01T..." } }`
- `13.4:44.8[Latitude]`
## Syntax
Query syntax supports parentheses, OR, AND and NOT keywords. Each expression is either targeting a specific field (by label) or is a general full-text search.
Date and number expressions are range expressions and use `fromValue : toValue` format.
```
query := oneQuery | orQuery | andQuery | notQuery;
orQuery := "(" orQuery ")" | query "OR" query
andQuery := "(" andQuery ")" | query "AND" query;
notQuery := "(" notQuery ")" | "NOT" query;
oneQuery := "(" oneQuery ")" | termQuery; -- unwrap ()
termQuery := fulltextQuery | (dateQuery | numberQuery | stringQuery) termField; -- single term query
stringQuery := "\"" stringQuery "\"" | string;
string := keyword | keyword " " keyword; -- e.g. 123, abc, 1ab3, 123 abc defg
keyword := alphaNum; -- no whitespace
fulltextQuery := stringQuery; -- e.g. "This is a test", This is a test
dateQuery := dateStr ":" dateStr; -- e.g. "2021":"3000"
dateStr := ("\"" dateVal "\"") | dateVal; -- e.g. "2021-01-01" or 2021-01-01, "2021-JAN", "1991-07", ...
dateVal := year ("-" month ("-" day)?)?;
year := integer;
month := integer[1-12] | "JAN" | "FEB" ...;
day := integer[1-31];
numberQuery := number ":" number; -- e.g. 300:800
number := integer | float;
float := integer ("." integer);
termField := "[" fieldLabel "]"; -- e.g. [Holding Institute]
fieldLabel := /[a-z]([a-z ]*)/; -- alphanum and space
```
## Field labels and translation to filters
*Field labels* in queries correspond to `Filter` fields. This allows for declaring field aliases, e.g. `Holding institute`, `Genebank code`, `Institute code` and `WIEWS code` can all map to the same filter field `institute.code` while `Genebank` can map to `institute.name`.
It is also possible to determine the target filter field by the query "value" itself. When the query value is in *WIEWS code format*, we can automatically switch from the default `institute.name` to `institute.code` field. Similarly, a search for `CIMMYT` may be converted to `MEX002` for more precise results when applicable, or `CGIAR` may expand into all institute codes of that network.
More appropriate fields may be automatically targeted when user provides a query that we detect as a *Country name* (or ISO3166 code). This may map to the country of provenance of accession instead of just a general full-text search if no field is provided. Country names may also expand into their current and past ISO codes.
## Providing "parsed" query to the user
Since the query is now a user-provided string, the server needs to parse the incoming query and provide sensible feedback to the user when the query syntax is misunderstood.
Luckily, antlr supports parsing warnings/errors that can be returned to the user and the query maybe still "understood" by the system.
## UI changes
The implementation requires a change in the underlying filtering implementation (#615) and will no longer neatly map to UI filtering elements.
"Filters" in a similar portal are implemented with a very simple filtering by **tags** and are purely boolean. In Genesys, comparable "filters" are the `BooleanFilters` (i.e. `georeferenced`, `inMls`, `available`, `historical` etc.)https://gitlab.croptrust.org/genesys-pgr/validator/-/issues/17Coordinates check2021-10-12T16:38:32+02:00Matija ObrezaCoordinates checkAdd a function that will detect if a series of coordinates with the same offset is detected.
A recent dataset of passport data contained:
![image](/uploads/9a593afc9b73d1ec9e5d662642c1c202/image.png)
![image](/uploads/e8c22205144bf814...Add a function that will detect if a series of coordinates with the same offset is detected.
A recent dataset of passport data contained:
![image](/uploads/9a593afc9b73d1ec9e5d662642c1c202/image.png)
![image](/uploads/e8c22205144bf814b72009df1c296266/image.png)Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/50Export all passport data2021-10-04T11:22:54+02:00Matija ObrezaExport all passport dataImplement a new `@Component` with one function `exportToAccess(AppliedFilters filters, File targetFile)`
It should use
```xml
<dependency>
<groupId>com.healthmarketscience.jackcess</groupId>
<artifactId>jackcess</artifactId>
<versi...Implement a new `@Component` with one function `exportToAccess(AppliedFilters filters, File targetFile)`
It should use
```xml
<dependency>
<groupId>com.healthmarketscience.jackcess</groupId>
<artifactId>jackcess</artifactId>
<version>2.1.6</version>
</dependency>
```
Cookbook at http://jackcess.sourceforge.net/cookbook.html#Starting_from_ScratchMatija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-client-api/-/issues/10Junit tests against Sandbox server2021-10-04T11:21:18+02:00Matija ObrezaJunit tests against Sandbox serverIt would be useful to have tests of the OAuth authentication and some API calls against the Genesys API running at api.sandbox.genesys-pgr.org
Client ID and secret need to be loaded from the environment variables.It would be useful to have tests of the OAuth authentication and some API calls against the Genesys API running at api.sandbox.genesys-pgr.org
Client ID and secret need to be loaded from the environment variables.1.4Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/anno/-/issues/35J11: BG Colors2021-10-04T11:20:50+02:00Matija ObrezaJ11: BG ColorsOn Win10, the background colors get messed up.
![image](/uploads/9e04f7668716b52634418593315925fb/image.png)
Also the highlights:
![image](/uploads/8b97952025fdb814cb548e2d428b4dff/image.png)
![image](/uploads/130e20a95271eaf8fc49b03...On Win10, the background colors get messed up.
![image](/uploads/9e04f7668716b52634418593315925fb/image.png)
Also the highlights:
![image](/uploads/8b97952025fdb814cb548e2d428b4dff/image.png)
![image](/uploads/130e20a95271eaf8fc49b0396c62e08a/image.png)
## Remove custom highlighting
Can we change the Column header background colors instead of this:
![image](/uploads/b0d096d88ddcda7b62cfd0bd978e6531/image.png)3.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/580Descriptor-Descriptor mapping2021-10-04T11:20:16+02:00Matija ObrezaDescriptor-Descriptor mappingGenesys has a large database of descriptor definitions and many of them refer to the same trait, but are categorized under a different crop or there are slight differences in the description, but not the *meaning*.
For example, we have ...Genesys has a large database of descriptor definitions and many of them refer to the same trait, but are categorized under a different crop or there are slight differences in the description, but not the *meaning*.
For example, we have 64 published "Plant height" descriptors. Similar descriptors can be linked/combined to form a "super descriptor". A super descriptor may be crop-specific. Individual descriptors are linked to the super descriptor and each of their `terms` is associated with one term in the super descriptor.
#579 helps in finding similar `Descriptor`s and is instrumental for building the database of `SuperDescriptor`s.
# Super descriptor
|IITA|NPGRL|WorldVeg|
|--|--|--|
|![image](/uploads/fddce512f92f55fd68d73fe746a74d9f/image.png)|![image](/uploads/00779c8088176cae95487b001316602b/image.png)|![image](/uploads/ba5e5de56ebb59761c9f918459b853e0/image.png)|
These could be combined into a super descriptor with:
1. `title` Hilum color
1. `description` Seed eye color
1. `lang` en
1. `crop` `null`
1. `category` `CHARACTERIZATION`
## Coding table
Each term of a descriptor is mapped to exactly one term in the super descriptor. The super has terms that are more broadly defined and applicable to many crops:
| Super | D1 | D2 | D3 | D4 |
|----------|----------------------------------------------|---------|-----------|------------------------|
| Absent | Eye absent | | COLORLESS | |
| Brown | Brown splash or grey, Tan brown | Brown | | Brown |
| Black | Blue to black, Blue to black spots or mottle | Black | BLACK | Black, imperfect Black |
| White | | White | | |
| Red | Red | | | |
| Green | Green | | | Green |
| Grey | | | GRAY | Grey |
| Speckled | Speckled | | | |
| Mottled | Mottled, Mottled and speckled | | | Buff |
| Mixture | | Mixture | MIXED | |
| Other | Other | | OTHER | Others |
| Yellow | | | | Yellow |Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/585Cleanup: API v22021-10-04T11:19:01+02:00Matija ObrezaCleanup: API v2Most of the code for API **v2** and the tests of it are a copy of API **v1**.
Can we make all API **v2** `Controllers` extend from API **v1** controllers? -- that way we can reduce duplicated code?
The same applies to unit tests of **v...Most of the code for API **v2** and the tests of it are a copy of API **v1**.
Can we make all API **v2** `Controllers` extend from API **v1** controllers? -- that way we can reduce duplicated code?
The same applies to unit tests of **v2** controllers.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/805SuperDescriptors UI2021-09-20T18:47:39+02:00Matija ObrezaSuperDescriptors UIgenesys-pgr/genesys-server!622 adds support for `SuperDescriptor`. Please add a "Super Descriptors" menu item (for `ROLE_ADMINISTRATOR`) to the Dashboard Catalog menu with a browse page with filters for `SuperDescriptor`s.
Editing and d...genesys-pgr/genesys-server!622 adds support for `SuperDescriptor`. Please add a "Super Descriptors" menu item (for `ROLE_ADMINISTRATOR`) to the Dashboard Catalog menu with a browse page with filters for `SuperDescriptor`s.
Editing and details pages are not yet required.Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/595Relaying requests for other systems2021-09-20T18:46:10+02:00Matija ObrezaRelaying requests for other systemsGenesys is a gateway for users to select (based on data in Genesys) and make requests for material (to multiple genebanks). This ticket describes making the existing Genesys request mechanisms and workflows available for use by other sys...Genesys is a gateway for users to select (based on data in Genesys) and make requests for material (to multiple genebanks). This ticket describes making the existing Genesys request mechanisms and workflows available for use by other systems (e.g. snp-seek.irri.org).
## Basic workflow
1. User makes the selection of material on Site A (shopping cart on Site A)
2. User clicks "Request for material" button on Site A
- Site A sends `requestData` to Genesys
- Genesys responds with a request identifier `reqId`
3. Site A redirects the user to Genesys website to complete the request for selected material
Step **2** is executed by the server of Site A (not in the browser).
## Initiating the Request
Request data sent to Genesys API from the external system includes only the list of selected accessions (preferably by `doi`, alternatively with FAO `instituteCode` and `accessionNumber`). No personally identifiable information is sent in the request.
```json
[
{ "doi": "10.xxxx/1231", "instituteCode": "PHL001", "accessionNumber": "IRGC 1000001" },
{ ... }
]
```
Genesys may have a limit on the number of items accepted for a single request.
## Genesys response
Genesys checks that all requested items exist in the database and that they are flagged as *available for distribution*.
**200 OK** response: all items in the list pass the checks, a request record is persisted and waiting for the user to resume the ordering process on the Genesys website.
```json
{
"id": "some-generated-id",
"url": "https://the-url-to-continue-the-order",
// maybe more detail?
}
```
**4xx Client error** response: one or more items are not available in Genesys. The request is not persisted.
```json
{
"error": "Error message",
"detail": { // TBD }
}
```
**5xx Server error** response: something went horribly wrong, response body contains a standard Genesys API error message in JSON.
## Redirecting the user
Site A has the **request identifier** and the `url` that is used to resume the ordering process on the Genesys website. Site A may store this data for further processing.
The user navigates to the `url` provided in the Genesys response either using an HTTP redirect or a regular link. Upon accessing the `url`, Genesys checks that request data exists (has not expired) and renders the forms for the user to complete the request information.
Changes to the list of items requested are not allowed.
If the user aborts the request, it is deleted from the database. If the request expires due to a timeout set by Genesys, it is deleted from the database.
## Completing the request
After the user provides the necessary request information, the existing Genesys request validation process kicks in: email validations may be sent, Easy-SMTA is checked, and eventually the request is relayed to the genebank holding the material.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/811SuperDescriptor edit page2021-04-21T16:57:06+02:00Viacheslav PavlovSuperDescriptor edit pageIn #805 we created dashboard page for `SuperDescriptor` and creating of `SuperDescriptor` from `Descriptor`.
Now we need to create edit page (based on stepper approach, but hook based).
In this issue:
- Create hook based stepper templa...In #805 we created dashboard page for `SuperDescriptor` and creating of `SuperDescriptor` from `Descriptor`.
Now we need to create edit page (based on stepper approach, but hook based).
In this issue:
- Create hook based stepper template
- Create edit page for `SuperDescriptor`. For now steps are:
1. **Create page**: similar to Descriptor stepper.
2. **Find similar descriptors**: Has list of similar descriptors (similar to SimilarDescriptors in `DatasetValidator`)
3. **Preview**: How it will look on public site's part. --TBD
cc @mobreza @vmokliakViacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/472WIP: Exclude accessions where geo.uncertainty > 200002021-04-09T18:23:33+02:00Matija ObrezaWIP: Exclude accessions where geo.uncertainty > 20000In `AccessionGeo` the `uncertainty` declares how "bad" the coordinates are (in `m` meters). Such accessions should not be included in GIS functions of Genesys.
Add a constant `ACCEPTABLE_COORD_UNCERTAINTY = 20000` (20km). Latitude/longi...In `AccessionGeo` the `uncertainty` declares how "bad" the coordinates are (in `m` meters). Such accessions should not be included in GIS functions of Genesys.
Add a constant `ACCEPTABLE_COORD_UNCERTAINTY = 20000` (20km). Latitude/longitude of accessions with uncertainty over this constant must:
1. Not be included in the map tiles generated by Genesys
1. Not display the map in the website UI (the data should be displayed)
1. Excluded when lookup is done by lat/lon from UI
1. PDCI calculator should assign 0 valueMatija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/565Knowledge management backend2021-03-14T12:16:13+01:00Matija ObrezaKnowledge management backendFor the next phase of Genesys we need to better document the meaning of terms, concepts and how they relate.
We can (and will) use data and metadata that exists in the Genesys database schema.
We want to be able to document the concepts ...For the next phase of Genesys we need to better document the meaning of terms, concepts and how they relate.
We can (and will) use data and metadata that exists in the Genesys database schema.
We want to be able to document the concepts using [SKOS](https://www.w3.org/TR/skos-primer/). Also see https://www.obitko.com/tutorials/ontologies-semantic-web/ontologies.html.
While following SKOS concepts, we will initially record Genesys terms in the database not RDF store.
## Background
Multiple LOD (linked open data) resources contain data highly relevant to understanding and defining Genesys data.
Many of these resources provide not only definitions, but also translations.
## Data model
The data modelling of a `Concept` follows SKOS nomenclature.
```json
{
"id": "foobar1",
"prefLabel": {
"_": "Default label",
"en": "Something else",
"de": "German label"
},
"altLabel": { ... },
"definition": { ... },
"sameAs" : "https://...",
}
```
## RDF engine
**And RDF engine would allow for making inferences about the data, but it appears that we do not yet have a need for that.**
https://jena.apache.org appears to be our best match.
In production, Jena (and whatever is needed) will run as a separate Docker container (just like Amphibian) and will be responsible
for its data (volume). TBD will most likely be the most appropriate engine as we don't want to overload the
Genesys accession database with this data.
Genesys will provide API endpoints to query and interact with the RDF engine.
In this first phase, we want to be able to
1. Add a new record to the RDF store
1. List (all) records existing in the store
1. Retrieve the details from the storeMatija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/118Timezone2021-03-11T13:32:51+01:00Matija ObrezaTimezoneLooking at last updates of accession data (or any other date) shows:
![Screenshot_20181107-201805__01](/uploads/edb7264cfefd5e1c73104cb6c10e7770/Screenshot_20181107-201805__01.jpg)
The calculation is done in GMT, but needs to be render...Looking at last updates of accession data (or any other date) shows:
![Screenshot_20181107-201805__01](/uploads/edb7264cfefd5e1c73104cb6c10e7770/Screenshot_20181107-201805__01.jpg)
The calculation is done in GMT, but needs to be rendered in user's current timezone.Matija ObrezaMatija Obreza