forEachTrackedElement method iterates through related (tracked) elements in 2 imodels and invokes a callback on each pair.
There are 2 scenarios for iterating through tracked elements during transformer initialization.
Provenance is stored in target: Source ----> Target (prov)
Provenance is stored in source: Source (prov) ----> Target
These 2 scenarios only matter when the provenance is tracked by ExternalSourceAspects since depending on the provenance location the element.id and identifier fields will be switched.
When provenance is tracked by federation guids we don't care where the provenance is, because the callback should always be invoked in the data flow direction and not the provenance direction.
Methods that depend on the remap table (e.g. findTargetElementId) will only ever by called with the element id in the sourceDb to get element id in targetDb.
forEachTrackedElement
method iterates through related (tracked) elements in 2 imodels and invokes a callback on each pair. There are 2 scenarios for iterating through tracked elements during transformer initialization.These 2 scenarios only matter when the provenance is tracked by
ExternalSourceAspects
since depending on the provenance location theelement.id
andidentifier
fields will be switched.When provenance is tracked by federation guids we don't care where the provenance is, because the callback should always be invoked in the data flow direction and not the provenance direction. Methods that depend on the remap table (e.g.
findTargetElementId
) will only ever by called with the element id in the sourceDb to get element id in targetDb.