本文整理汇总了Python中EDConfiguration.EDConfiguration.get方法的典型用法代码示例。如果您正苦于以下问题:Python EDConfiguration.get方法的具体用法?Python EDConfiguration.get怎么用?Python EDConfiguration.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EDConfiguration.EDConfiguration
的用法示例。
在下文中一共展示了EDConfiguration.get方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testRasterConfiguration
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
def testRasterConfiguration(self):
strPathToTestConfigFile = os.path.join(self.strUnitTestDataHome, "XSConfiguration_raster.xml")
edConfiguration = EDConfiguration(strPathToTestConfigFile)
dictItem = edConfiguration.get(self.getPluginName())
xsDataMOSFLMInput = XSDataMOSFLMInput()
xsDataMOSFLMBeam = XSDataMOSFLMBeamPosition()
xsDataMOSFLMBeam.setX(XSDataLength(1.0))
xsDataMOSFLMBeam.setY(XSDataLength(2.0))
xsDataMOSFLMInput.setBeam(xsDataMOSFLMBeam)
xsDataMOSFLMDetector = XSDataMOSFLMDetector()
xsDataMOSFLMDetector.setType(XSDataString("ADSC"))
xsDataMOSFLMInput.setDetector(xsDataMOSFLMDetector)
xsDataMOSFLMInput.setDirectory(XSDataString("/tmp"))
xsDataMOSFLMInput.setTemplate(XSDataString("testdata_1_###.img"))
xsDataMOSFLMInput.setWavelength(XSDataWavelength(1.1111))
xsDataMOSFLMInput.setDistance(XSDataLength(222.22))
edPluginMOSFLMv10 = self.createPlugin()
edPluginMOSFLMv10.setScriptExecutable("cat")
edPluginMOSFLMv10.setConfig(dictItem, _bLocal = True)
edPluginMOSFLMv10.configure()
edPluginMOSFLMv10.setXSDataInputClass(XSDataMOSFLMInput)
edPluginMOSFLMv10.setDataInput(xsDataMOSFLMInput)
edPluginMOSFLMv10.generateMOSFLMCommands()
edListCommands = edPluginMOSFLMv10.getListCommandExecution()
edListCommandsReference = ['WAVELENGTH 1.1111', 'DISTANCE 222.22', 'BEAM 1.0 2.0', 'DETECTOR ADSC', 'DIRECTORY /tmp', 'TEMPLATE testdata_1_###.img', 'RASTER 15 15 3 3 3']
EDAssert.equal(edListCommandsReference, edListCommands, "MOSFLM commands with ratser configured")
示例2: testConfigureOK
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
def testConfigureOK(self):
edPluginStrategy = self.createPlugin()
strPathToTestConfigFile = os.path.join(self.getPluginTestsDataHome(), "XSConfiguration_ESRF.xml")
edConfiguration = EDConfiguration(strPathToTestConfigFile)
dictItem = edConfiguration.get(edPluginStrategy.getPluginName())
edPluginStrategy.setConfig(dictItem)
edPluginStrategy.configure()
示例3: testConfigureOK
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
def testConfigureOK(self):
edPluginControlIndexingv10 = self.createPlugin()
strPathToTestConfigFile = os.path.join(self.getPluginTestsDataHome(), "XSConfiguration.xml")
edConfiguration = EDConfiguration(strPathToTestConfigFile)
dictItem = edConfiguration.get(edPluginControlIndexingv10.getPluginName())
edPluginControlIndexingv10.setConfig(dictItem)
edPluginControlIndexingv10.configure()
示例4: testSetDataModelInput
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
def testSetDataModelInput(self):
edPluginBest = self.createPlugin()
edConfigurationGood01 = EDConfiguration(os.path.join(self.m_pyStrDataPath, "XSConfiguration.xml"))
dictItemGood01 = edConfigurationGood01.get(self.getPluginName())
edPluginBest.setConfig(dictItemGood01, _bLocal = True)
edPluginBest.setScriptExecutable("cat")
edPluginBest.configure()
from XSDataBestv1_2 import XSDataInputBest
xsDataInputBest = XSDataInputBest()
from XSDataCommon import XSDataAbsorbedDoseRate
from XSDataCommon import XSDataDouble
from XSDataCommon import XSDataString
from XSDataCommon import XSDataTime
from XSDataCommon import XSDataFile
from XSDataCommon import XSDataAngularSpeed
from XSDataCommon import XSDataString
from XSDataCommon import XSDataAngle
from XSDataCommon import XSDataBoolean
xsDataInputBest.setCrystalAbsorbedDoseRate(XSDataAbsorbedDoseRate(0.22E+06))
xsDataInputBest.setCrystalShape(XSDataDouble(1))
xsDataInputBest.setCrystalSusceptibility(XSDataDouble(1.5))
xsDataInputBest.setDetectorType(XSDataString("q210-2x"))
xsDataInputBest.setBeamExposureTime(XSDataTime(1))
xsDataInputBest.setBeamMaxExposureTime(XSDataTime(10000))
xsDataInputBest.setBeamMinExposureTime(XSDataTime(0.1))
xsDataInputBest.setGoniostatMinRotationWidth(XSDataAngle(0.1))
xsDataInputBest.setGoniostatMaxRotationSpeed(XSDataAngularSpeed(10))
xsDataInputBest.setAimedResolution(XSDataDouble(2))
xsDataInputBest.setAimedRedundancy(XSDataDouble(6.5))
xsDataInputBest.setAimedCompleteness(XSDataDouble(0.9))
xsDataInputBest.setAimedIOverSigma(XSDataDouble(3))
xsDataInputBest.setComplexity(XSDataString("min"))
xsDataInputBest.setAnomalousData(XSDataBoolean(False))
fileDirectory = edPluginBest.getWorkingDirectory()
bestFileContentDat = EDUtilsFile.readFile(os.path.join(self.m_pyStrDataPath, "bestfile.dat"))
xsDataInputBest.setBestFileContentDat(XSDataString(bestFileContentDat))
bestFileContentPar = EDUtilsFile.readFile(os.path.join(self.m_pyStrDataPath, "bestfile.par"))
xsDataInputBest.setBestFileContentPar(XSDataString(bestFileContentPar))
bestFileContentHKL = EDUtilsFile.readFile(os.path.join(self.m_pyStrDataPath, "bestfile1.hkl"))
xsDataInputBest.addBestFileContentHKL(XSDataString(bestFileContentHKL))
xsDataInputBest.exportToFile(self.m_edObtainedInputFile)
pyStrExpectedInput = self.readAndParseFile (self.m_edReferenceInputFile)
pyStrObtainedInput = self.readAndParseFile (self.m_edObtainedInputFile)
xsDataInputExpected = XSDataInputBest.parseString(pyStrExpectedInput)
xsDataInputObtained = XSDataInputBest.parseString(pyStrObtainedInput)
EDAssert.equal(xsDataInputExpected.marshal(), xsDataInputObtained.marshal())
EDUtilsFile.deleteFile(self.m_edObtainedInputFile)
self.cleanUp(edPluginBest)
示例5: testConfigureOK
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
def testConfigureOK(self):
edPluginStrategy = self.createPlugin()
strPathToTestConfigFile = os.path.join(self.getPluginTestsDataHome(), "XSConfiguration_ESRF.xml")
edConfiguration = EDConfiguration(strPathToTestConfigFile)
dictItem = edConfiguration.get(edPluginStrategy.getPluginName())
edPluginStrategy.setConfig(dictItem)
edPluginStrategy.configure()
EDAssert.equal("/opt/pxsoft/ccp4-6.0.2/lib/data", edPluginStrategy.getSymopHome())
示例6: testGenerateMOSFLMIntegrationCommands
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
def testGenerateMOSFLMIntegrationCommands(self):
strPathToTestConfigFile = os.path.join(self.strUnitTestDataHome, "XSConfiguration_unitTest.xml")
edConfiguration = EDConfiguration(strPathToTestConfigFile)
dictItem = edConfiguration.get(self.getPluginName())
pluginIntegration = self.createPlugin()
pluginIntegration.setScriptExecutable("cat")
pluginIntegration.setConfig(dictItem, _bLocal = True)
pluginIntegration.configure()
strXMLInputData = self.readAndParseFile (self.strReferenceDataInputFile)
pluginIntegration.setDataInput(strXMLInputData)
pluginIntegration.generateMOSFLMCommands()
listCommandExecution = pluginIntegration.getListCommandExecution()
listCommandReference = ['WAVELENGTH 0.934', 'DISTANCE 198.440994', 'BEAM 102.478996 104.8862', 'DETECTOR ADSC', 'DIRECTORY ' + self.strDataImagePath, 'TEMPLATE ref-testscale_1_###.img', 'SYMMETRY P222', 'MATRIX ' + pluginIntegration.getScriptBaseName() + '_matrix.mat', 'MOSAIC 0.75', 'HKLOUT process_1_1.mtz', 'PROCESS 1 TO 1 START 0.000000 ANGLE 1.000000', 'BEST ON', 'GO', 'BEST OFF']
EDAssert.equal(listCommandReference, listCommandExecution)
示例7: testSetDataInput
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
def testSetDataInput(self):
edPluginControlIntegrationv10 = self.createPlugin()
strPathToTestConfigFile = os.path.join(self.getPluginTestsDataHome(), "XSConfiguration.xml")
edConfiguration = EDConfiguration(strPathToTestConfigFile)
dictItem = edConfiguration.get(edPluginControlIntegrationv10.getPluginName())
edPluginControlIntegrationv10.setConfig(dictItem)
edPluginControlIntegrationv10.configure()
xmlInputReference = self.readAndParseFile(self.strReferenceInputFile)
from XSDataMXv1 import XSDataIntegrationInput
xsDataIntegrationInputReference = XSDataIntegrationInput.parseString(xmlInputReference)
edPluginControlIntegrationv10.setDataInput(xmlInputReference)
xsDataIntegrationv10Input = edPluginControlIntegrationv10.getDataInput()
EDAssert.equal(xsDataIntegrationInputReference.marshal(), xsDataIntegrationv10Input.marshal())
self.cleanUp(edPluginControlIntegrationv10)
示例8: testConfigureOK
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
def testConfigureOK(self):
edPluginRaddose = self.createPlugin()
edConfigurationGood01 = EDConfiguration(os.path.join(self.strDataPath, "XSConfiguration.xml"))
dictItemGood01 = edConfigurationGood01.get(self.getPluginName())
edPluginRaddose.setConfig(dictItemGood01, _bLocal = True)
edPluginRaddose.setScriptExecutable("cat")
edPluginRaddose.configure()
EDAssert.equal("/bin/bash", edPluginRaddose.getScriptShell())
EDAssert.equal("cat", edPluginRaddose.getScriptExecutable())
EDAssert.equal("/opt/pxsoft/ccp4-6.0.2/include/ccp4.setup-bash.orig", edPluginRaddose.getSetupCCP4())
EDAssert.equal("Verion of Raddose to be tested", edPluginRaddose.getStringVersion())
#EDAssert.equal(600, edPluginMessage.getTimeOut())
self.cleanUp(edPluginRaddose)
示例9: testConfigureOK
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
def testConfigureOK(self):
edPluginBest = self.createPlugin()
edConfigurationGood01 = EDConfiguration(os.path.join(self.m_pyStrDataPath, "XSConfiguration.xml"))
dictItemGood01 = edConfigurationGood01.get(self.getPluginName())
edPluginBest.setConfig(dictItemGood01, _bLocal = True)
edPluginBest.setScriptExecutable("cat")
edPluginBest.configure()
EDAssert.equal("/bin/bash", edPluginBest.getScriptShell())
EDAssert.equal("cat", edPluginBest.getScriptExecutable())
EDAssert.equal("/opt/pxsoft/ccp4-6.0.2/include/ccp4.setup-bash.orig", edPluginBest.getSetupCCP4())
EDAssert.equal("Version of Best to be tested", edPluginBest.getStringVersion())
EDAssert.equal(600, edPluginBest.getTimeOut())
EDAssert.equal("/home/sweet/home", edPluginBest.getBestHome())
EDAssert.equal("export besthome=/home/sweet/home", edPluginBest.getCommandBestHome())
self.cleanUp(edPluginBest)
示例10: testUpdateChemicalCompositionWithNativeSulfurAtom
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
def testUpdateChemicalCompositionWithNativeSulfurAtom(self):
edPluginStrategy = self.createPlugin()
strPathToTestConfigFile = os.path.join(self.getPluginTestsDataHome(), "XSConfiguration_ESRF.xml")
edConfiguration = EDConfiguration(strPathToTestConfigFile)
dictItem = edConfiguration.get(edPluginStrategy.getPluginName())
edPluginStrategy.setConfig(dictItem)
edPluginStrategy.configure()
xsDataStructure = XSDataStructure()
xsDataComposition = XSDataChemicalCompositionMM()
xsDataChain = XSDataChain()
xsDataChain.setType(XSDataString("protein"))
xsDataChain.setNumberOfCopies(XSDataDouble(2))
xsDataChain.setNumberOfMonomers(XSDataDouble(60))
xsDataStructure.addChain(xsDataChain)
xsDataComposition.setStructure(xsDataStructure)
updatedChemicalComposition = edPluginStrategy.updateChemicalComposition(xsDataComposition)
EDAssert.equal(3, updatedChemicalComposition.getStructure().getChain()[0].getHeavyAtoms().getAtom()[0].getNumberOf().getValue())
EDAssert.equal("S", updatedChemicalComposition.getStructure().getChain()[0].getHeavyAtoms().getAtom()[0].getSymbol().getValue())
xsDataStructure = XSDataStructure()
xsDataComposition = XSDataChemicalCompositionMM()
xsDataChain = XSDataChain()
xsDataChain.setType(XSDataString("protein"))
xsDataChain.setNumberOfCopies(XSDataDouble(2))
xsDataChain.setNumberOfMonomers(XSDataDouble(60))
xsDataAtom1 = XSDataAtom()
xsDataAtom1.setSymbol(XSDataString("Se"))
xsDataAtom1.setNumberOf(XSDataDouble(4))
xsDataAtomicComposition = XSDataAtomicComposition()
xsDataAtomicComposition.addAtom(xsDataAtom1)
xsDataChain.setHeavyAtoms(xsDataAtomicComposition)
xsDataStructure.addChain(xsDataChain)
xsDataComposition.setStructure(xsDataStructure)
updatedChemicalComposition = edPluginStrategy.updateChemicalComposition(xsDataComposition)
heavyAtoms = updatedChemicalComposition.getStructure().getChain()[0].getHeavyAtoms().getAtom()
for heavyAtom in heavyAtoms:
self.unitTest(heavyAtom.getSymbol().getValue() + " : " + str(heavyAtom.getNumberOf().getValue()))
if(heavyAtom.getSymbol().getValue() == "S"):
EDAssert.equal(3, heavyAtom.getNumberOf().getValue())
示例11: testSetDataModelInput
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
def testSetDataModelInput(self):
edPluginStrategy = self.createPlugin()
strPathToTestConfigFile = os.path.join(self.getPluginTestsDataHome(), "XSConfiguration_ESRF.xml")
edConfiguration = EDConfiguration(strPathToTestConfigFile)
dictItem = edConfiguration.get(edPluginStrategy.getPluginName())
edPluginStrategy.setConfig(dictItem)
edPluginStrategy.configure()
xsDataStrategy = XSDataInputStrategy()
# Beam
xsExperimentalCondition = XSDataExperimentalCondition()
xsBeam = XSDataBeam()
xsBeam.setFlux(XSDataFlux(1e+12))
xsBeam.setWavelength(XSDataWavelength(2.41))
xsBeam.setSize(XSDataSize(x=XSDataLength(0.1), y=XSDataLength(0.1)))
xsBeam.setExposureTime(XSDataTime(1))
xsExperimentalCondition.setBeam(xsBeam)
# Detector and Exposure Time
xsDataDetector = XSDataDetector()
xsDataDetector.setType(XSDataString("q210-2x"))
xsExperimentalCondition.setDetector(xsDataDetector)
xsDataGoniostat = XSDataGoniostat()
xsDataGoniostat.setRotationAxis(XSDataString("phi"))
xsExperimentalCondition.setGoniostat(xsDataGoniostat)
xsDataStrategy.setExperimentalCondition(xsExperimentalCondition)
# Best Files
bestFileContentDat = EDUtilsFile.readFile(os.path.join(self.strDataPath, "bestfile.dat"))
xsDataStrategy.setBestFileContentDat(XSDataString(bestFileContentDat))
bestFileContentPar = EDUtilsFile.readFile(os.path.join(self.strDataPath, "bestfile.par"))
xsDataStrategy.setBestFileContentPar(XSDataString(bestFileContentPar))
bestFileContentHKL = EDUtilsFile.readFile(os.path.join(self.strDataPath, "bestfile1.hkl"))
xsDataStrategy.addBestFileContentHKL(XSDataString(bestFileContentHKL))
# Crystal
xsDataSampleCrystalMM = XSDataSampleCrystalMM()
xsDataStructure = XSDataStructure()
xsDataComposition = XSDataChemicalCompositionMM()
xsDataChain = XSDataChain()
xsDataChain.setType(XSDataString("protein"))
xsDataChain.setNumberOfCopies(XSDataDouble(2))
xsDataAtomicComposition = XSDataAtomicComposition()
xsDataAtom1 = XSDataAtom()
xsDataAtom1.setSymbol(XSDataString("Se"))
xsDataAtom1.setNumberOf(XSDataDouble(4))
xsDataAtomicComposition.addAtom(xsDataAtom1)
xsDataChain.setHeavyAtoms(xsDataAtomicComposition)
xsDataChain.setNumberOfMonomers(XSDataDouble(100))
xsDataStructure.addChain(xsDataChain)
xsDataChain2 = XSDataChain()
xsDataChain2.setType(XSDataString("rna"))
xsDataChain2.setNumberOfCopies(XSDataDouble(1))
xsDataChain2.setNumberOfMonomers(XSDataDouble(60))
xsDataStructure.addChain(xsDataChain2)
xsDataLigand = XSDataLigand()
xsDataLigand.setNumberOfCopies(XSDataDouble(2))
xsDataLigand.setNumberOfLightAtoms(XSDataDouble(42))
xsDataAtomicComposition = XSDataAtomicComposition()
xsDataAtom2 = XSDataAtom()
xsDataAtom2.setSymbol(XSDataString("Fe"))
xsDataAtom2.setNumberOf(XSDataDouble(1))
xsDataAtomicComposition.addAtom(xsDataAtom2)
xsDataLigand.setHeavyAtoms(xsDataAtomicComposition)
xsDataStructure.addLigand(xsDataLigand)
xsDataStructure.setNumberOfCopiesInAsymmetricUnit(XSDataDouble(0.25))
xsDataSolvent = XSDataSolvent()
xsDataAtomicComposition = XSDataAtomicComposition()
xsDataAtom3 = XSDataAtom()
xsDataAtom3.setSymbol(XSDataString("Na"))
xsDataAtom3.setConcentration(XSDataDouble(1000))
xsDataAtom4 = XSDataAtom()
xsDataAtom4.setSymbol(XSDataString("Cl"))
xsDataAtom4.setConcentration(XSDataDouble(1000))
xsDataAtomicComposition.addAtom(xsDataAtom3)
xsDataAtomicComposition.addAtom(xsDataAtom4)
xsDataSolvent.setAtoms(xsDataAtomicComposition)
xsDataComposition.setStructure(xsDataStructure)
xsDataComposition.setSolvent(xsDataSolvent)
xsDataSampleCrystalMM.setChemicalComposition(xsDataComposition)
xsDataSampleCrystalMM.setSize(XSDataSize(XSDataLength(0.1), XSDataLength(0.1), XSDataLength(0.1)))
#.........这里部分代码省略.........
示例12: EDPlugin
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import get [as 别名]
class EDPlugin(EDAction):
"""
This is the EDNA plugin main class
An EDNA plugin class:
- is a configurable entity
- has a base name (<date>-<random number>-<base name>)
- handles input/output data (setter, getter, checker)
- has warning and error messages
- has a base and a working directory (both are configurable)
The working directory is the folder from which the plugin is launched
and should contain all associated files with the plugin execution (edna xml input/output, 3rd party output files)
The base directory is the parent directory of the working directory.
Example: the working directory of a control plugin is the base directory of the plugins that it invokes,
i.e. the plugins working directories has the control plugin working directory as parent.
- defines the method that generates an executive summary (user-related output summary) that sub-classes should implement
"""
CONF_BASE_DIR_LABEL = "baseDirectory"
CONF_WORKING_DIR_LABEL = "workingDirectory"
CONF_TIME_OUT = "timeOut"
CONF_WRITE_XML_INPUT_OUTPUT = "writeXMLInputOutput"
CONF_WRITE_XML_OUTPUT = "writeXMLOutput"
CONF_WRITE_XML_INPUT = "writeXMLInput"
def __init__ (self):
"""
Initializes plugin related attributes described above
"""
EDAction.__init__(self)
self.__xsPluginItem = None
self.__dictXSDataInputClass = {}
self.__dictXSDataInput = {}
self.__dictXSDataOutput = {}
self.__strDefaultInputDataKey = "defaultInputData"
self.__strDefaultOutputDataKey = "defaultOutputData"
self.__edSlotExportDataOutput = EDSlot()
self.__strBaseDirectory = None
self.__strWorkingDirectory = None
self.__strBaseName = None
self.__listExecutiveSummaryLines = []
self.__strExecutiveSummarySeparator = "-" * 80
self.__listErrorMessages = []
self.__listWarningMessages = []
self.__isRequiredToHaveConfiguration = False
self.__bWriteDataXMLInputOutput = True
self.__bWriteDataXMLOutput = True
self.__bWriteDataXMLInput = True
self.__strPluginId = "%s-%08i" % (self.getClassName(), self.getId())
self.strPathDataInput = None
self.strPathDataOutput = None
self.__bUseWarningInsteadOfError = False
self.__edConfiguration = EDConfigurationStatic()
def preProcess(self, _edObject=None):
"""
Writes xml data input in the working dir (if required)
Connects a slot for generating the executive summary after the plugin execution
Connects a slot for checking output data to the finally process
Initialize the base directory
Configures the plugin
Checks the input data
"""
EDAction.preProcess(self, _edObject)
self.DEBUG("EDPlugin.preProcess")
self.connectPostProcess(self.exportDataOutput)
if self.__bWriteDataXMLInputOutput:
if self.__bWriteDataXMLInput:
self.connectPreProcess(self.writeDataInput)
self.connectPostProcess(self.generateExecutiveSummary)
self.connectFinallyProcess(self.checkDataOutput)
if (self.__strBaseName is None):
self.setBaseName(self.createBaseName())
EDStatus.tellRunning(self.__strPluginId)
self.connectFinallyProcess(self.tellFinished)
self.checkParameters()
def tellFinished(self, _edObject=None):
"""
Tell EDStatus that the plugin has finished, either in success either in error
"""
if self.isFailure():
EDStatus.tellFailure(self.__strPluginId)
else:
EDStatus.tellSuccess(self.__strPluginId)
def checkDataOutput(self, _edObject=None):
"""
Checks if output data is available, if not issues a warning and sets an empty XSDataResult as output data
Writes xml data output in the working dir (if required)
"""
EDAction.finallyProcess(self, _edObject)
if self.__dictXSDataOutput == {}:
strWarningMessage = "Output data for plugin %s not set, using XSDataResult as output" % self.getPluginName()
self.WARNING(strWarningMessage)
self.addWarningMessage(strWarningMessage)
self.setDataOutput(XSDataResult())
if self.__bWriteDataXMLInputOutput:
if self.__bWriteDataXMLOutput:
self.writeDataOutput()
#.........这里部分代码省略.........