Open tramyn opened 3 years ago
I don't think the copy
method is the culprit here. The following returns dotnames:
# dotname is present before copy
protocol_interfaces = [top_level for top_level in opil_doc.objects if isinstance(top_level, opil.ProtocolInterface)]
for parameter in protocol_interfaces[0].has_parameter:
if parameter.dotname:
print(parameter.dotname)
# dotname is dropped after copy
protocol_interface_copy = protocol_interfaces[0].copy()
for parameter in protocol_interface_copy.has_parameter:
parameter.dotname = sbol3.TextProperty(parameter, 'http://strateos.com/dotname', 0, 1)
if parameter.dotname:
print(parameter.dotname)
When I perform copy() on a Strateos ProtocolInterface, the custom annotations needed for specifying dotnames are dropped. Here is reproducible code: