You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on the integration of shacl-vue and dump-things-service, which requires the bidirectional conversion of YAML and RDF data using LinkML, we discovered some issues with conversion to RDF.
The TRR379 base schema contains the trr379 prefix declaration, and it is included in emit_prefixes
The data has id: trr379:instruments/fra-cobic-mri-prisma-3t, and the output has this resolved to a named node: <https://trr379.de/instruments/fra-cobic-mri-prisma-3t> a dlres:Instrument ;
The schema contains the ror and sct prefix declarations, and they are not included in the output TTL (same as trr379). I added these to the emit_prefixes as well, and this made no difference to the output
While the conversion resolves the trr379 for the id: field in the data, the same does not happen for other fields that include the ror or sct prefixes, e.g. we get dlprops:about "sct:816077007"^^xsd:anyURI (i.e. literal with datatype) from:
about:
# MRI of the brain
- sct:816077007
For the Project example:
The case of the trr379 remains the same, although with additional notes:
The TRR379 base schema contains the trr379 prefix declaration, and it is included in emit_prefixes
The output TTL does not contain the trr379 prefix
The prefix is resolved in the output for the id: field
This data sample also uses this prefix in an additional places, and its resolution differs substantially sometimes being a literal with xsd:anyURI datatype, sometimes being a resolved URI, sometimes being a CURIE.
The ror prefix provides follows the same type of variability
Thoughts:
could the difference between an available and missing prefix in RDF output be that the prefix is defined in the upstream schema vs not?
it seems that mostly (although not consistently) the output triples that have a named node or literal as object will have the resolved URI (of the missing prefix, e.g. trr379) or curie (of an available prefix, e.g. ror), e.g. dlprov:associated_with <https://trr379.de/.> or dlprov:associated_with ror:018mejw64, while triples with blank nodes as objects (i.e. nested objects in the data) will themselves contain literals with the CURIE format and xsd:anyURI. An example:
Further things that I tried that made no difference:
temporarily switching to relative imports in the trr379 base schema
adding the --prefix-file flag to the linkml-convert command, pointing to a yaml file that contains all prefixes also defined in the schema, including the ones that weren't in the ttl output
adding --prefix 'trr379=https://trr379.de/' to the linkml-convert command
While working on the integration of
shacl-vue
anddump-things-service
, which requires the bidirectional conversion of YAML and RDF data using LinkML, we discovered some issues with conversion to RDF.Demo
For a demonstration, let's take:
dlschemas
, at https://hub.trr379.de/q02/concepts.trr379.de/src/commit/6b8e51ed5eb2ccede8467f1430b727ad618c533cThis is what an example
Instrument
looks like:This is the conversion code:
This is the output:
And here's another example for a `Project`:
Data:
Code:
Output:
Analysis
For the
Instrument
example:trr379
prefixtrr379
prefix declaration, and it is included inemit_prefixes
id: trr379:instruments/fra-cobic-mri-prisma-3t
, and the output has this resolved to a named node:<https://trr379.de/instruments/fra-cobic-mri-prisma-3t> a dlres:Instrument ;
ror
andsct
prefix declarations, and they are not included in the output TTL (same astrr379
). I added these to theemit_prefixes
as well, and this made no difference to the outputtrr379
for theid:
field in the data, the same does not happen for other fields that include theror
orsct
prefixes, e.g. we getdlprops:about "sct:816077007"^^xsd:anyURI
(i.e. literal with datatype) from:For the
Project
example:trr379
remains the same, although with additional notes:trr379
prefix declaration, and it is included inemit_prefixes
trr379
prefixid:
fieldxsd:anyURI
datatype, sometimes being a resolved URI, sometimes being a CURIE.ror
prefix provides follows the same type of variabilityThoughts:
trr379
) or curie (of an available prefix, e.g.ror
), e.g.dlprov:associated_with <https://trr379.de/.>
ordlprov:associated_with ror:018mejw64
, while triples with blank nodes as objects (i.e. nested objects in the data) will themselves contain literals with the CURIE format andxsd:anyURI
. An example:Although this example also shows a nested resolved
<https://trr379.de/roles/pi>
, which shows the inconsistency.The text was updated successfully, but these errors were encountered: