avid.linkers.LinkerBase
- class avid.linkers.LinkerBase(allowOnlyFullLinkage=True)
Bases:
objectLinkers serve as delegate to generate secondary sub selections that have some semantic linkage (e.g. only seconadry selections that have the same case id or time point like the primary selection) to indicated primary selection (list of artefact; e.g. generated by splitter). Linker might alter a secondary selection before it is passed back as a linked selection (e.g. change the order of the artefact in the selection, its content or adding None elements to indicate that an artifact in the primary selection has no semantically linked counterpart in the linked selection.)
- __init__(allowOnlyFullLinkage=True)
@param allowOnlyFullLinkage If yes the linker returns only linked selection that contain no none elements and has the same size then the relvant primary selection.
Methods
__init__([allowOnlyFullLinkage])@param allowOnlyFullLinkage If yes the linker returns only linked selection that contain no none elements and has the same size then the relvant primary selection.
getLinkedSelection(primaryIndex, ...)Get the subset (splits) of secondary selections that has a meaningful semantic link to the primary selection/index.
- getLinkedSelection(primaryIndex, primarySelections, secondarySelections)
Get the subset (splits) of secondary selections that has a meaningful semantic link to the primary selection/index. To change the behavior reimplement self._getLinkedSelection(). The default implementation just passes through the secondarySelections (so everything gets linked). Linker might alter a secondary selections before they are passed back as linked selections (e.g. change the order of the artefact in the selection or its content) @result List of all valid selections (list) of linked artefacts. Therefore all selections of artefacts from secondarySelections that fullfill the link criterion in respect to the primary selection. @param primaryIndex index of the entry in the primarySelections that is defining for the link. @param primarySelections the list of all selections that contain sets of primary artefacts @param secondarySelections the list that is used to generate/pick the linked selections from.