herminiogg / ShExML

A heterogeneous data mapping language based on Shape Expressions
http://shexml.herminiogarcia.com
MIT License
15 stars 2 forks source link

How to add an specific instance uri identifier #97

Closed CMCosta closed 2 years ago

CMCosta commented 3 years ago

Hi,

I am using EXPRESSION declaration as follows: EXPRESSION cs_sex_gut_id <fgm_gut_csv_file.fgm_gut_csv.sex + "_gender_CS_gut_subject"+fgm_gut_csv_file.fgm_gut_csv.id>

in order to create identifiers for my rdf instances. However, some times I need to use "http://snomed.info/id/410515003" as the identifier. ¿How is it possible?

:FGM_CS_AGE p4q:[cs_sex_gut_id]{ rdf:type sdm:ClinicalStatement ; btl2:hasPart @:KNOWN_PRESENT ; }

:KNOWN_PRESENT sct:[??????????]{ rdf:type sct:410515003; }

Thanks, Cheers, Cati

herminiogg commented 3 years ago

Hi,

Sorry for the late response. I'm afraid that's not possible with the current specification and implementation. Literals (in the form of prefix + ":" + literal_value) are only allowed in predicates and objects but not in subjects. This was intentionally forced in the language inception as generating a shape like :KNOWN_PRESENT will not imply neither a dynamic generation nor an extraction of values from any datasource. However, I can see some cases where this could be useful so I will plan a modification in ShExML for further versions to support this possibility. I will let you know when it's ready.

Thank you for your feedback!

Best regards, Herminio

herminiogg commented 2 years ago

Hello,

I have just released the ShExML v0.2.6 which solves, among other things, this specific issue.

Please find it here: https://github.com/herminiogg/ShExML/releases/tag/v0.2.6

Best regards, Herminio García