BMT doesn't really (yet) have a method to simply validate whether or not a given xmlns prefix is known to the model (ie. is in the list of resolved prefixes)
Would we get that directly from a LinkML call?
We're not really thinking solely of category id_prefixes enumerated prefixes.
His specific commentary is regarding validation of the attribute_type_id (preferably inheriting from biolink:association_slot):
The constraint is not really absolute, mostly because many of the concepts we want to convey are not in biolink. So I think we should enforce a curie, so if there's not colon, then that should be an error. If the prefix is not biolink, that should be a warning. If the prefix is not known to biolink that should be a double warning. Are we able to report warnings? or just errors?
ERROR if not a CURIE
_WARNING if not an instance of biolink:association_slot (but is another Biolink class?)_
(double) WARNING if prefix is not known to Biolink
Oddly enough, it is not obvious how one directly checks if a prefix exists in the Namespaces although one can perhaps simulate the checking using a try block wrapped Namespaces.sri_or_curie_for() call?
BMT doesn't really (yet) have a method to simply validate whether or not a given xmlns prefix is known to the model (ie. is in the list of resolved prefixes)
Would we get that directly from a LinkML call?
We're not really thinking solely of category
id_prefixes
enumerated prefixes.Rather, Eric Deutsch is suggesting that the CURIE's in the
attribute_type_id
field be validated as belonging to a Biolink-known prefix namespace (preferably a value mapped onto an association slot, if the CURIE given isn't strictly speaking a Biolink term)His specific commentary is regarding validation of the attribute_type_id (preferably inheriting from biolink:association_slot):
The constraint is not really absolute, mostly because many of the concepts we want to convey are not in biolink. So I think we should enforce a curie, so if there's not colon, then that should be an error. If the prefix is not biolink, that should be a warning. If the prefix is not known to biolink that should be a double warning. Are we able to report warnings? or just errors?
biolink:association_slot
(but is another Biolink class?)_I guess that the prefixes are loaded via the SchemaDefinition?
Or rather, viewable in the SchemaView which is available in the BMT
Toolkit.view
instance attribute.Oddly enough, it is not obvious how one directly checks if a prefix exists in the
Namespaces
although one can perhaps simulate the checking using a try block wrappedNamespaces.sri_or_curie_for()
call?