SynBioDex / SBOL-specification

The Synthetic Biology Open Language (SBOL)
http://sbolstandard.org
13 stars 9 forks source link

Provenance and OM classes should follow the same rules as any other extension class #462

Closed bbartley closed 2 years ago

bbartley commented 2 years ago

Currently these classes are not treated like other types of SBOL extension classes, i.e., they are only defined by their prov: or om: type. Like other SBOL extensions, they should also derive through multiple inheritance from sbol:TopLevel or sbol:Identified.

jakebeal commented 2 years ago

I believe this is implicitly the case already, since in the appendices we provide a subclass mapping for all of their classes to sbol:TopLevel or sbol:Identified. We should make it explicit at the top of the appendix.

Checking, I find that pySBOL3 already handles these objects in this manner:

>>> doc = sbol3.Document()
>>> doc.add(sbol3.Activity('http://foo.org/bar'))
>>> print(doc.write_string(sbol3.NTRIPLES))
<http://foo.org/bar> <http://sbols.org/v3#displayId> "bar" .
<http://foo.org/bar> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://sbols.org/v3#TopLevel> .
<http://foo.org/bar> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/prov#Activity> .
<http://foo.org/bar> <http://sbols.org/v3#hasNamespace> <https://bbn.com/scratch/> .

@goksel , @udp: do your libraries do this also?