brain-bican / models

BICAN data models
https://brain-bican.github.io/models/
3 stars 4 forks source link

jsonld-context-autogen missing the base IRI #88

Open tekrajchhetri opened 3 days ago

tekrajchhetri commented 3 days ago

@puja-trivedi @djarecka I noticed the context file is missing the default IRI.

Issue: Whenever you do the conversion of JSON-LD to ttl file, the file path is taken as base IRI, while it should be something like http://example.org/NIMP/<ID>.. Screenshot 2024-11-20 at 1 02 35 PM

In the previous version, it's not the case. Screenshot 2024-11-20 at 1 03 22 PM

tekrajchhetri commented 3 days ago

Update:

The issue is in the JSON-LD file. So, there is no need to update the context file.

In current, i.e., rapid release file: We do not have any prefix and also no base IRI causing the aforementioned issue. I suggest to make use of prefix, explicitly rather than having base, as is the best practice.

      "was_derived_from": [
        "EC-VYUUTE137687",
        "EC-UYBXXW324656"
      ]

In old JSON-LD file: We have NIMP prefix so everything's fine.

"was_derived_from": [
        "NIMP:LA-GFHFDE415771LOMHPL202182",
        "NIMP:LA-LYZZRW951279LOMHPL202182",
        "NIMP:LA-QVRSQW524460LOMHPL202182",
        "NIMP:LA-BFDXZY775863LOMHPL202182",
        "NIMP:LA-VUVPPX234898LOMHPL202182",
        "NIMP:LA-HHEABG177343LOMHPL202182", 
      ],
puja-trivedi commented 1 day ago

@tekrajchhetri - I took a look at the library_generation model and the NIMP prefix is already set to http://example.org/NIMP/. See line#18 -> https://github.com/brain-bican/models/blob/main/linkml-schema/library_generation.yaml.

While we did not explicitly define the prefix in the spreadsheet; linkml automatically fills in any missing prefix (that is why it is not missing from the .yaml file).

tekrajchhetri commented 1 day ago

@puja-trivedi Yes, there exist NIMP prefix but in the JSON-LD files that you've shared with me, they're missing the NIMP prefix as I've pointed out in the earlier example (https://github.com/brain-bican/models/issues/88#issuecomment-2489311092). The same is shown in the image below, which is a snapshot of a JSON-LD file. Also, you can see from the image blow that not in all cases NIMP prefix is missing.

image

It could be the issue with the translator that you're using to generate JSON-LD files. Also a suggestion, I think it would be better to add some automated checks to ensure there's always a prefix associated.