ccpnmodel.ccpncore.memops.scripts.xmlio package¶
Submodules¶
ccpnmodel.ccpncore.memops.scripts.xmlio.CompatibilityGen module¶
Module Documentation here
- class ccpnmodel.ccpncore.memops.scripts.xmlio.CompatibilityGen.LocalXmlGen(**kw)[source]¶
Bases:
ccpnmodel.ccpncore.memops.format.xml.XmlGen.XmlGen
- ccpnmodel.ccpncore.memops.scripts.xmlio.CompatibilityGen.dirNameFromVersionString(versionString)[source]¶
generate directory name from version string
- ccpnmodel.ccpncore.memops.scripts.xmlio.CompatibilityGen.makeCompatibility(fromModel, toModel, modelPortal=None, elementPairings=None, fileName='CompatibilityMapInfo.py')[source]¶
Make compatibility info for converting fromModel to toModel. elementPairings is a list of (oldGuid, newGuid) pairs that map elements from the two models. Note that several old guids can map to a single new guid and vice versa.
- ccpnmodel.ccpncore.memops.scripts.xmlio.CompatibilityGen.makeUpgrade(fromVersionTag, toVersionTag, toTopPackage=None, modelPortal=None, includePackageNames=(), excludePackageNames=(), infoFileName=None)[source]¶
Make upgrade or downgrade map code from fromVersion to toVersion Will look for the models in ccpnmodel.versionDir and place the compatibility code in e.g. ccpncore/memops/format/compatibility/upgrade/v_2_0_3/MapInfo.py ccpncore/memops/format/compatibility/downgrade/v_2_2_1/MapInfo.py
ccpnmodel.ccpncore.memops.scripts.xmlio.PyXmlMapWrite module¶
Module Documentation here
- class ccpnmodel.ccpncore.memops.scripts.xmlio.PyXmlMapWrite.PyXmlMapWrite(**kw)[source]¶
Bases:
ccpnmodel.ccpncore.memops.scripts.core.PyLanguage.PyLanguage
,ccpnmodel.ccpncore.memops.scripts.core.PyType.PyType
,ccpnmodel.ccpncore.memops.scripts.xmlio.XmlMapWrite.XmlMapWrite
- addDefaultValues(dictName, elemMap, elem)[source]¶
write default values. NB individual languages may choose to skip some of the more difficult ones. The value is compared with the stored value in XmlIo, look there for exact format.
- addXmlStringFunctions(dictName, typeCode)[source]¶
Write info for conversion to and from string Must be overridden in subclasses
- raiseApiError(errorMsg, obj=None, obj2=None, obj3=None)[source]¶
NB obj and obj2 and obj3 must evaluate to a single Python object More specifically you can pass in a tuple, like ‘(a,b,c)’ but not a comma-separated list, like ‘a,b,c’
ccpnmodel.ccpncore.memops.scripts.xmlio.XmlMapWrite module¶
Module Documentation here
- class ccpnmodel.ccpncore.memops.scripts.xmlio.XmlMapWrite.XmlMapWrite(**kw)[source]¶
Bases:
ccpnmodel.ccpncore.memops.scripts.core.LanguageInterface.LanguageInterface
,ccpnmodel.ccpncore.memops.scripts.core.TypeInterface.TypeInterface
,ccpnmodel.ccpncore.memops.metamodel.TextWriter.TextWriter
,ccpnmodel.ccpncore.memops.format.xml.XmlGen.XmlGen
- addDefaultValues(dictName, elemMap, elem)[source]¶
write default values. NB individual languages may choose to skip some of the more difficult ones. The value is compared with the stored value in XmlIo, look there for exact format.
- addXmlStringFunctions(dictName, typeCode)[source]¶
Write info for conversion to and from string Must be overridden in subclasses
- codeDirName = 'xml'¶
- localVarNames = {'aDict': 'aDict', 'aList': 'aList', 'abstractTypes': 'abstractTypes', 'contentMap': 'contentMap', 'currentMap': 'currentMap', 'exolinks': 'exolinks', 'globalMap': 'globalMap', 'loadMaps': 'loadMaps', 'mapsByGuid': 'mapsByGuid'}¶