ccpnmodel.ccpncore.memops.format.compatibility package

Submodules

ccpnmodel.ccpncore.memops.format.compatibility.Converters1 module

Module Documentation here

ccpnmodel.ccpncore.memops.format.compatibility.Converters1.fixElementMap(newGuid, action, prefix, globalMapping, newElementsByGuid, typeName=None, elemName=None, overrideGuidMap=False, valueTypeGuid=None, elemMap=None)[source]

insert/modify I/O map in mapping - newGuid is the guid to use in the new map (new guid if element exists, old guid otherwise) - prefix is the package shortname - typeName is the name of the class/DataObjType (if any) - elemName is the name of the ClassElement (if any) - overrideGuidMap controls if an existing map should be overridden - valueTypeGuid is the guid for a new valueType (for attr) - elemMap is a passed-in ({typ, proc, name, eType}) I/O map for the element

ccpnmodel.ccpncore.memops.format.compatibility.Converters1.fixExoLinkMap(newGuid, action, prefix, globalMapping, typeName)[source]

Fix exoLink maps if action == ‘rename’ enter newGuid map under (prefix, typeName) name if action == ‘skip’, enter skip record for guid under (prefix, typeName) name

ccpnmodel.ccpncore.memops.format.compatibility.Converters1.getElementsByGuid(rootPackage)[source]

get guid:obj dictionary for MetaModelElements in MetaModel corresponding to rootPackage

Used in mapping of reference data. NBNB may need version-specific expansion later to handle difficult reference data modifications.

ccpnmodel.ccpncore.memops.format.compatibility.Converters1.minorPostProcess(fromVersion, topObj, delayDataDict, toNewObjDict, mapping=None)[source]

postProcess - update newRoot object tree May be used to postprocess a file load (minor upgrade)

topObj is a TopObject in the new tree delayDataDict is a {newobj:{tag:value}} dictionary of delayed set elements and children toNewObjDict is _ID:newObj for minor upgrades mapping is the IO mapping

ccpnmodel.ccpncore.memops.format.compatibility.Converters1.modifyIoMap(fromVersionStr, globalMapping)[source]

Adapt globalMapping to read oldVersion data

ccpnmodel.ccpncore.memops.format.compatibility.Converters1.removeElementName(guid, globalMapping, newElementsByGuid)[source]

Remove element from name lists used for selecting input and remove element from loadMaps (in case another element with the same signature needs the slot).