Thanks for this, Jacek
Yes, the original idea with this template was to be quite fuzzy about how 'the same' element in two repositories should be identified. However, you have pointed out a very good case where this simply doesn't work.
Your suggestions are good to use alternative matching functions from standardFunctions.py.
I've just uploaded a
new version of the import transform that uses a much more recent instance-finding function: EssentialGetInstance()
This function encodes a strategy that attempts to find the instance by:
- First the Protege instance ID (so instances that are shared across repositories can be kept in step)
- Second by a match on the external repository reference (which in this case is the Protege instance ID from the source data)
- Third by a precise match on the name, case-sensitive and complete matches only.
- If no instance is found by any of these matching strategies, then a new instance is created.
I've done some testing with your sample data, which I extended slightly to test importing instance slots (relationships) values and all seems to be working.
Jonathan