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
If an RDF/XML SBOL file is loaded that contains ownership relationships those relationships are not restored. There is currently code in Document.parse_annotation_objects that heuristically tries to determine whether an extension/annotation object is a TopLevel by the existence of the SBOL_PERSISTENT_IDENTITY property. But that property is on Identified (per the code and the spec), not TopLevel.
Another approach might be to parse the XML and build a list of top level object URIs, and then use that list to determine which annotation objects (whose builder has not been registered) are TopLevel and which are not. From there we can determine that an annotation object is not top level, and thus if the object of the relationship is a URIRef it must be a parent/child relationship. We aren't sure this will work, but it is worth further exploration.
For users of the library a better workaround is to register extension classes so that relationships are properly constructed.
The text was updated successfully, but these errors were encountered:
Here is an example of pre-parsing the XML to extract the top level objects. This is a step in the right direction, but not sufficient. There is more that is needed. Also, elementtree is not a great solution if the XML files are going to be very large. One way they can be very large is an overly broad SynBioHub query. In that case SAX might be a more appropriate XML parsing strategy.
If an RDF/XML SBOL file is loaded that contains ownership relationships those relationships are not restored. There is currently code in
Document.parse_annotation_objects
that heuristically tries to determine whether an extension/annotation object is aTopLevel
by the existence of theSBOL_PERSISTENT_IDENTITY
property. But that property is onIdentified
(per the code and the spec), notTopLevel
.Another approach might be to parse the XML and build a list of top level object URIs, and then use that list to determine which annotation objects (whose builder has not been registered) are TopLevel and which are not. From there we can determine that an annotation object is not top level, and thus if the
object
of the relationship is aURIRef
it must be a parent/child relationship. We aren't sure this will work, but it is worth further exploration.For users of the library a better workaround is to register extension classes so that relationships are properly constructed.
The text was updated successfully, but these errors were encountered: