def testExecute(self):
        """
        Runs the plugin and then compares expected output with obtained output to verify that it executed correctly. 
        """
        self.run()

        # Checks the obtained result against the expected result
        edStringExpectedOutput = self.readAndParseFile (self.getReferenceDataOutputFile())
        edStringObtainedOutput = self.readAndParseFile(self.m_edObtainedOutputDataFile)

        xsDataResultISPyBExpected = XSDataResultISPyB.parseString(edStringExpectedOutput)
        xsDataResultISPyBObtained = XSDataResultISPyB.parseString(edStringObtainedOutput)

        self.DEBUG("Checking obtained result...")

        xsDataIntegerExpDataCollectionId = xsDataResultISPyBExpected.getDataCollectionId()
        xsDataResultStatusExpScreening = xsDataResultISPyBExpected.getScreeningStatus()
        xsDataResultStatusExpScreeningInputs = xsDataResultISPyBExpected.getScreeningInputStatus()
        xsDataResultStatusExpScreeningOutputs = xsDataResultISPyBExpected.getScreeningOutputStatus()
        xsDataResultStatusExpScreeningOutputLattices = xsDataResultISPyBExpected.getScreeningOutputLatticeStatus()
        xsDataResultStatusExpScreeningStrategies = xsDataResultISPyBExpected.getScreeningStrategyStatus()
        xsDataResultStatusExpScreeningRanks = xsDataResultISPyBExpected.getScreeningRankStatus()
        xsDataResultStatusExpScreeningRankSet = xsDataResultISPyBExpected.getScreeningRankSetStatus()

        xsDataIntegerDataCollectionId = xsDataResultISPyBObtained.getDataCollectionId()
        xsDataResultStatusScreening = xsDataResultISPyBObtained.getScreeningStatus()
        xsDataResultStatusScreeningInputs = xsDataResultISPyBObtained.getScreeningInputStatus()
        xsDataResultStatusScreeningOutputs = xsDataResultISPyBObtained.getScreeningOutputStatus()
        xsDataResultStatusScreeningOutputLattices = xsDataResultISPyBObtained.getScreeningOutputLatticeStatus()
        xsDataResultStatusScreeningStrategies = xsDataResultISPyBObtained.getScreeningStrategyStatus()
        xsDataResultStatusScreeningRanks = xsDataResultISPyBObtained.getScreeningRankStatus()
        xsDataResultStatusScreeningRankSet = xsDataResultISPyBObtained.getScreeningRankSetStatus()

        if xsDataIntegerExpDataCollectionId != None:
            self.DEBUG("Checking dataCollectionId ...")
            EDAssert.equal(xsDataIntegerDataCollectionId.getValue(), xsDataIntegerExpDataCollectionId.getValue())
        if xsDataResultStatusExpScreening != None:
            self.DEBUG("Checking screening ...")
            EDAssert.equal(xsDataResultStatusScreening.getCode().getValue(), "ok")
            iId = xsDataResultStatusScreening.getId().getValue()
            EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusExpScreeningInputs != None:
            self.DEBUG("Checking inputs...")
            for xsDataResultStatusScreeningInput in xsDataResultStatusScreeningInputs:
                EDAssert.equal(xsDataResultStatusScreeningInput.getCode().getValue(), "ok")
                iId = xsDataResultStatusScreeningInput.getId().getValue()
                EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusExpScreeningOutputs != None:
            self.DEBUG("Checking outputs ...")
            for xsDataResultStatusScreeningOutput in xsDataResultStatusScreeningOutputs:
                EDAssert.equal(xsDataResultStatusScreeningOutput.getCode().getValue(), "ok")
                iId = xsDataResultStatusScreeningOutput.getId().getValue()
                EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusExpScreeningOutputLattices != None:
            self.DEBUG("Checking output lattices...")
            for xsDataResultStatusScreeningOutputLattice in xsDataResultStatusScreeningOutputLattices:
                EDAssert.equal(xsDataResultStatusScreeningOutputLattice.getCode().getValue(), "ok")
                iId = xsDataResultStatusScreeningOutputLattice.getId().getValue()
                EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusExpScreeningStrategies != None:
            self.DEBUG("Checking strategies...")
            for xsDataResultStatusScreeningStrategy in xsDataResultStatusScreeningStrategies:
                EDAssert.equal(xsDataResultStatusScreeningStrategy.getCode().getValue(), "ok")
                iId = xsDataResultStatusScreeningStrategy.getId().getValue()
                EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusExpScreeningRanks != None:
            self.DEBUG("Checking ranks...")
            for xsDataResultStatusScreeningRank in xsDataResultStatusScreeningRanks:
                EDAssert.equal(xsDataResultStatusScreeningRank.getCode().getValue(), "ok")
                iId = xsDataResultStatusScreeningRank.getId().getValue()
                EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusScreeningRankSet != None:
            self.DEBUG("Checking rank sets...")
            EDAssert.equal(xsDataResultStatusScreeningRankSet.getCode().getValue(), "ok")
            iId = xsDataResultStatusScreeningRankSet.getId().getValue()
            EDAssert.equal((iId >= 0), True)
    def process(self, _edObject=None):
        """
        Sends a store request and the screening object to the dbserver. Returns success or failure.
        
        Note that:
        * Any objects referred to by the object returned by self.getDataInput() will be stored. 
        * Primary key attributes should not be set.
        * If a foreign key attribute is not set, this method will attempt to find the foreign object among those 
        referred to by the self.getDataInput() object, and use the primary key attribute of this object when it 
        has been stored. If such an object is not found, the method fails.
        * The method will not attempt to store any more objects once an error is encountered
        """

        EDPluginExec.process(self)
        EDVerbose.DEBUG("*** EDPluginISPyBv1_1.process")

        xsDataInputISPyB = self.getDataInput()
        self.m_xsDataResultISPyB = XSDataResultISPyB()

        xsDataISPyBScreening = xsDataInputISPyB.getScreening()
        if xsDataISPyBScreening == None:
            xsDataISPyBScreening = XSDataISPyBScreening()

        xsDataISPyBImage = xsDataInputISPyB.getImage()

        if xsDataISPyBScreening.getDataCollectionId() == None:
            if (
                (xsDataISPyBImage == None)
                or (xsDataISPyBImage.getFileName() == None)
                or (xsDataISPyBImage.getFileLocation() == None)
            ):
                pyStrErrorMessage = EDMessage.ERROR_EXECUTION_03 % (
                    "EDPluginISPyBv1_1",
                    "process",
                    "Neither a dataCollectionId nor a image filename + path are provided.",
                )
                EDVerbose.error(pyStrErrorMessage)
                self.addErrorMessage(pyStrErrorMessage)
                return

            pyStrXML = EDUtilsXML.dnaMarshal(xsDataISPyBImage)

            # Send the XML to request the dataCollectionId from the dbserver:
            pyStrResponse = self.httpPost(
                self.getDbserverHost(), self.getDbserverPort(), "/get_datacollectionid", pyStrXML
            )

            if pyStrResponse != None:
                # Handle response:
                xsDatadbstatus = XSDatadbstatus.parseString(pyStrResponse)
                pyStrCode = xsDatadbstatus.getCode()
                pyStrMessage = xsDatadbstatus.getMessage()
                EDVerbose.DEBUG("dbserver returns code: " + pyStrCode)
                EDVerbose.DEBUG("dbserver returns message: " + pyStrMessage)

                if (pyStrCode == "error") or (xsDatadbstatus.getDataCollectionId() == -1):
                    if xsDatadbstatus.getDataCollectionId() == -1:
                        pyStrMessage = "An image corresponding to the given fileName and fileLocation was not found."
                    pyStrErrorMessage = EDMessage.ERROR_EXECUTION_03 % ("EDPluginISPyBv1_1", "process", pyStrMessage)
                    EDVerbose.error(pyStrErrorMessage)
                    self.addErrorMessage(pyStrErrorMessage)
                    return

                if xsDatadbstatus.getDataCollectionId() != -1:
                    xsDataISPyBScreening.setDataCollectionId(XSDataInteger(xsDatadbstatus.getDataCollectionId()))
                    self.m_xsDataResultISPyB.setDataCollectionId(XSDataInteger(xsDatadbstatus.getDataCollectionId()))

        xsDataISPyBScreeningInputs = xsDataInputISPyB.getScreeningInput()
        xsDataISPyBScreeningOutputContainers = xsDataInputISPyB.getScreeningOutputContainer()
        xsDataISPyBScreeningRanks = xsDataInputISPyB.getScreeningRank()
        xsDataISPyBScreeningRankSet = xsDataInputISPyB.getScreeningRankSet()

        xsDataIntegerScreeningId = self.store(xsDataISPyBScreening)

        if xsDataISPyBScreeningInputs != None:
            for xsDataISPyBScreeningInput in xsDataISPyBScreeningInputs:
                xml = xsDataISPyBScreeningInput.marshal()
                xsDataISPyBScreeningInput.setScreeningId(xsDataIntegerScreeningId)
                self.store(xsDataISPyBScreeningInput)

        if xsDataISPyBScreeningRankSet != None:
            xsDataIntegerScreeningRankSetId = self.store(xsDataISPyBScreeningRankSet)

            for xsDataISPyBScreeningRank in xsDataISPyBScreeningRanks:
                xsDataISPyBScreeningRank.setScreeningId(xsDataIntegerScreeningId)
                xsDataISPyBScreeningRank.setScreeningRankSetId(xsDataIntegerScreeningRankSetId)
                self.store(xsDataISPyBScreeningRank)

        if xsDataISPyBScreeningOutputContainers != None:
            for xsDataISPyBScreeningOutputContainer in xsDataISPyBScreeningOutputContainers:
                xsDataISPyBScreeningOutput = xsDataISPyBScreeningOutputContainer.getScreeningOutput()
                xsDataISPyBScreeningOutput.setScreeningId(xsDataIntegerScreeningId)
                xsDataIntegerScreeningOutputId = self.store(xsDataISPyBScreeningOutput)

            xsDataISPyBScreeningOutputLattices = xsDataISPyBScreeningOutputContainer.getScreeningOutputLattice()
            if xsDataISPyBScreeningOutputLattices != None:
                for xsDataISPyBScreeningOutputLattice in xsDataISPyBScreeningOutputLattices:
                    xsDataISPyBScreeningOutputLattice.setScreeningOutputId(xsDataIntegerScreeningOutputId)
                    self.store(xsDataISPyBScreeningOutputLattice)

            xsDataISPyBScreeningStrategies = xsDataISPyBScreeningOutputContainer.getScreeningStrategy()
            if xsDataISPyBScreeningStrategies != None:
                for xsDataISPyBScreeningStrategy in xsDataISPyBScreeningStrategies:
                    xsDataISPyBScreeningStrategy.setScreeningOutputId(xsDataIntegerScreeningOutputId)
                    self.store(xsDataISPyBScreeningStrategy)
class EDPluginISPyBv1_1(EDPluginExec):
    """
    Plugin to store results in an ISPyB database using the DNA/ISPyB dbserver 
    """

    def __init__(self):
        """
        Sets default values for dbserver parameters 
        """
        EDPluginExec.__init__(self)
        self.setXSDataInputClass(XSDataInputISPyB)
        self.m_edStrDbserverHost = "localhost"
        self.m_iDbserverPort = 9090

    def getDbserverHost(self):
        return self.m_edStrDbserverHost

    def setDbserverHost(self, _edStrDbserverHost):
        self.m_edStrDbserverHost = _edStrDbserverHost

    def getDbserverPort(self):
        return self.m_iDbserverPort

    def setDbserverPort(self, _iDbserverPort):
        self.m_iDbserverPort = _iDbserverPort

    def configure(self):
        """
        Gets the dbserver parameters from the config file and stores them in class member attributes.
        """
        EDPluginExec.configure(self)
        pluginConfiguration = self.getConfiguration()

        if pluginConfiguration == None:
            EDVerbose.DEBUG("*** EDPluginISPyBv1_1.configure: pluginConfiguration is None, using default settings")
        else:
            EDVerbose.DEBUG("*** EDPluginISPyBv1_1.configure: pluginConfiguration found, using settings from there")
            pyStrDbserverHost = EDConfiguration.getStringParamValue(pluginConfiguration, "dbserverHost")
            if pyStrDbserverHost == None:
                pyStrErrorMessage = EDMessage.ERROR_EXECUTION_03 % (
                    "EDPluginISPyBv1_1.configure",
                    self.getClassName(),
                    "Configuration parameter missing: dbserverHost",
                )
                EDVerbose.error(pyStrErrorMessage)
                self.addErrorMessage(pyStrErrorMessage)
                raise RuntimeError, pyStrErrorMessage
            else:
                self.setDbserverHost(pyStrDbserverHost)

            pyStrDbserverPort = EDConfiguration.getStringParamValue(pluginConfiguration, "dbserverPort")
            if pyStrDbserverPort == None:
                pyStrErrorMessage = EDMessage.ERROR_EXECUTION_03 % (
                    "EDPluginISPyBv1_1.configure",
                    self.getClassName(),
                    "Configuration parameter missing: dbserverPort",
                )
                EDVerbose.error(pyStrErrorMessage)
                self.addErrorMessage(pyStrErrorMessage)
                raise RuntimeError, pyStrErrorMessage
            else:
                self.setDbserverPort(int(pyStrDbserverPort))

    def process(self, _edObject=None):
        """
        Sends a store request and the screening object to the dbserver. Returns success or failure.
        
        Note that:
        * Any objects referred to by the object returned by self.getDataInput() will be stored. 
        * Primary key attributes should not be set.
        * If a foreign key attribute is not set, this method will attempt to find the foreign object among those 
        referred to by the self.getDataInput() object, and use the primary key attribute of this object when it 
        has been stored. If such an object is not found, the method fails.
        * The method will not attempt to store any more objects once an error is encountered
        """

        EDPluginExec.process(self)
        EDVerbose.DEBUG("*** EDPluginISPyBv1_1.process")

        xsDataInputISPyB = self.getDataInput()
        self.m_xsDataResultISPyB = XSDataResultISPyB()

        xsDataISPyBScreening = xsDataInputISPyB.getScreening()
        if xsDataISPyBScreening == None:
            xsDataISPyBScreening = XSDataISPyBScreening()

        xsDataISPyBImage = xsDataInputISPyB.getImage()

        if xsDataISPyBScreening.getDataCollectionId() == None:
            if (
                (xsDataISPyBImage == None)
                or (xsDataISPyBImage.getFileName() == None)
                or (xsDataISPyBImage.getFileLocation() == None)
            ):
                pyStrErrorMessage = EDMessage.ERROR_EXECUTION_03 % (
                    "EDPluginISPyBv1_1",
                    "process",
                    "Neither a dataCollectionId nor a image filename + path are provided.",
                )
                EDVerbose.error(pyStrErrorMessage)
                self.addErrorMessage(pyStrErrorMessage)
                return

            pyStrXML = EDUtilsXML.dnaMarshal(xsDataISPyBImage)

            # Send the XML to request the dataCollectionId from the dbserver:
            pyStrResponse = self.httpPost(
                self.getDbserverHost(), self.getDbserverPort(), "/get_datacollectionid", pyStrXML
            )

            if pyStrResponse != None:
                # Handle response:
                xsDatadbstatus = XSDatadbstatus.parseString(pyStrResponse)
                pyStrCode = xsDatadbstatus.getCode()
                pyStrMessage = xsDatadbstatus.getMessage()
                EDVerbose.DEBUG("dbserver returns code: " + pyStrCode)
                EDVerbose.DEBUG("dbserver returns message: " + pyStrMessage)

                if (pyStrCode == "error") or (xsDatadbstatus.getDataCollectionId() == -1):
                    if xsDatadbstatus.getDataCollectionId() == -1:
                        pyStrMessage = "An image corresponding to the given fileName and fileLocation was not found."
                    pyStrErrorMessage = EDMessage.ERROR_EXECUTION_03 % ("EDPluginISPyBv1_1", "process", pyStrMessage)
                    EDVerbose.error(pyStrErrorMessage)
                    self.addErrorMessage(pyStrErrorMessage)
                    return

                if xsDatadbstatus.getDataCollectionId() != -1:
                    xsDataISPyBScreening.setDataCollectionId(XSDataInteger(xsDatadbstatus.getDataCollectionId()))
                    self.m_xsDataResultISPyB.setDataCollectionId(XSDataInteger(xsDatadbstatus.getDataCollectionId()))

        xsDataISPyBScreeningInputs = xsDataInputISPyB.getScreeningInput()
        xsDataISPyBScreeningOutputContainers = xsDataInputISPyB.getScreeningOutputContainer()
        xsDataISPyBScreeningRanks = xsDataInputISPyB.getScreeningRank()
        xsDataISPyBScreeningRankSet = xsDataInputISPyB.getScreeningRankSet()

        xsDataIntegerScreeningId = self.store(xsDataISPyBScreening)

        if xsDataISPyBScreeningInputs != None:
            for xsDataISPyBScreeningInput in xsDataISPyBScreeningInputs:
                xml = xsDataISPyBScreeningInput.marshal()
                xsDataISPyBScreeningInput.setScreeningId(xsDataIntegerScreeningId)
                self.store(xsDataISPyBScreeningInput)

        if xsDataISPyBScreeningRankSet != None:
            xsDataIntegerScreeningRankSetId = self.store(xsDataISPyBScreeningRankSet)

            for xsDataISPyBScreeningRank in xsDataISPyBScreeningRanks:
                xsDataISPyBScreeningRank.setScreeningId(xsDataIntegerScreeningId)
                xsDataISPyBScreeningRank.setScreeningRankSetId(xsDataIntegerScreeningRankSetId)
                self.store(xsDataISPyBScreeningRank)

        if xsDataISPyBScreeningOutputContainers != None:
            for xsDataISPyBScreeningOutputContainer in xsDataISPyBScreeningOutputContainers:
                xsDataISPyBScreeningOutput = xsDataISPyBScreeningOutputContainer.getScreeningOutput()
                xsDataISPyBScreeningOutput.setScreeningId(xsDataIntegerScreeningId)
                xsDataIntegerScreeningOutputId = self.store(xsDataISPyBScreeningOutput)

            xsDataISPyBScreeningOutputLattices = xsDataISPyBScreeningOutputContainer.getScreeningOutputLattice()
            if xsDataISPyBScreeningOutputLattices != None:
                for xsDataISPyBScreeningOutputLattice in xsDataISPyBScreeningOutputLattices:
                    xsDataISPyBScreeningOutputLattice.setScreeningOutputId(xsDataIntegerScreeningOutputId)
                    self.store(xsDataISPyBScreeningOutputLattice)

            xsDataISPyBScreeningStrategies = xsDataISPyBScreeningOutputContainer.getScreeningStrategy()
            if xsDataISPyBScreeningStrategies != None:
                for xsDataISPyBScreeningStrategy in xsDataISPyBScreeningStrategies:
                    xsDataISPyBScreeningStrategy.setScreeningOutputId(xsDataIntegerScreeningOutputId)
                    self.store(xsDataISPyBScreeningStrategy)

    def postProcess(self, _edObject=None):
        """
        """
        EDPluginExec.postProcess(self)
        EDVerbose.DEBUG("*** EDPluginISPyBv1_1.postProcess")
        if self.m_xsDataResultISPyB is not None:
            self.setDataOutput(self.m_xsDataResultISPyB)

    def httpPost(self, _pyStrHost, _iPort, _pyStrPath, _pyStrXML):
        """
        Sends XML to the dbserver on the specified host and port with the specified path.
        Returns the response XML from the dbserver.
        """
        pyStrData = None
        try:
            pyHTTPConnection = PyHttplib.HTTPConnection(_pyStrHost, _iPort)
            pyHTTPConnection.putrequest("POST", _pyStrPath)
            pyHTTPConnection.putheader("Content-type", "text/xml")
            pyHTTPConnection.putheader("Content-length", "%d" % len(_pyStrXML))
            pyHTTPConnection.putheader("Accept", "text/plain")
            if "HOSTNAME" in PyOs.environ.keys():
                pyHTTPConnection.putheader("Host", PyOs.environ["HOSTNAME"])
            pyHTTPConnection.endheaders()
            pyHTTPConnection.send(_pyStrXML)
            pyHTTPResponse = pyHTTPConnection.getresponse()
            pyStrMsg = pyHTTPResponse.msg
            pyStrHeaders = pyHTTPResponse.getheaders()
            pyStrReply = str(pyHTTPResponse.status) + " - " + pyHTTPResponse.reason

            pyStrContentLength = pyHTTPResponse.getheader("Content-Length")
            if pyStrContentLength is None:
                pyStrErrorMessage = EDMessage.ERROR_EXECUTION_03 % (
                    "EDPluginISPyBv1_1",
                    "httpPost",
                    "No header returned for %s, host %s, port %d. HTTP resonse was: %s"
                    % (_pyStrPath, _pyStrHost, _iPort, pyStrReply),
                )
                EDVerbose.error(pyStrErrorMessage)
                self.addErrorMessage(pyStrErrorMessage)
                raise RuntimeError, pyStrErrorMessage
            try:
                ilength = PyString.atoi(pyStrContentLength)
            except:
                pyStrErrorMessage = EDMessage.ERROR_EXECUTION_03 % (
                    "EDPluginISPyBv1_1",
                    "httpPost",
                    "Cannot convert Content-Length %s to integer for %s, host %s, port %d!"
                    % (pyStrContentLength, _pyStrPath, _pyStrHost, _iPort),
                )
                EDVerbose.error(pyStrErrorMessage)
                self.addErrorMessage(pyStrErrorMessage)
                raise RuntimeError, pyStrErrorMessage

            pyStrData = pyHTTPResponse.read()
        except (PySocket.error, PyHttplib.BadStatusLine), (msg):
            pyStrErrorMessage = EDMessage.ERROR_EXECUTION_03 % (
                "EDPluginISPyBv1_1",
                "httpPost",
                "Have you set up a connection to the dbserver? Error is: %s" % (msg),
            )
            EDVerbose.error(pyStrErrorMessage)
            self.addErrorMessage(pyStrErrorMessage)
            self.setFailure()
            raise RuntimeError, pyStrErrorMessage

        return pyStrData
Ejemplo n.º 4
0
    def testExecute(self):
        """
        Runs the plugin and then compares expected output with obtained output to verify that it executed correctly. 
        """
        self.run()

        # Checks the obtained result against the expected result
        edStringExpectedOutput = self.readAndParseFile(
            self.getReferenceDataOutputFile())
        edStringObtainedOutput = self.readAndParseFile(
            self.m_edObtainedOutputDataFile)

        xsDataResultISPyBExpected = XSDataResultISPyB.parseString(
            edStringExpectedOutput)
        xsDataResultISPyBObtained = XSDataResultISPyB.parseString(
            edStringObtainedOutput)

        self.DEBUG("Checking obtained result...")

        xsDataIntegerExpDataCollectionId = xsDataResultISPyBExpected.getDataCollectionId(
        )
        xsDataResultStatusExpScreening = xsDataResultISPyBExpected.getScreeningStatus(
        )
        xsDataResultStatusExpScreeningInputs = xsDataResultISPyBExpected.getScreeningInputStatus(
        )
        xsDataResultStatusExpScreeningOutputs = xsDataResultISPyBExpected.getScreeningOutputStatus(
        )
        xsDataResultStatusExpScreeningOutputLattices = xsDataResultISPyBExpected.getScreeningOutputLatticeStatus(
        )
        xsDataResultStatusExpScreeningStrategies = xsDataResultISPyBExpected.getScreeningStrategyStatus(
        )
        xsDataResultStatusExpScreeningRanks = xsDataResultISPyBExpected.getScreeningRankStatus(
        )
        xsDataResultStatusExpScreeningRankSet = xsDataResultISPyBExpected.getScreeningRankSetStatus(
        )

        xsDataIntegerDataCollectionId = xsDataResultISPyBObtained.getDataCollectionId(
        )
        xsDataResultStatusScreening = xsDataResultISPyBObtained.getScreeningStatus(
        )
        xsDataResultStatusScreeningInputs = xsDataResultISPyBObtained.getScreeningInputStatus(
        )
        xsDataResultStatusScreeningOutputs = xsDataResultISPyBObtained.getScreeningOutputStatus(
        )
        xsDataResultStatusScreeningOutputLattices = xsDataResultISPyBObtained.getScreeningOutputLatticeStatus(
        )
        xsDataResultStatusScreeningStrategies = xsDataResultISPyBObtained.getScreeningStrategyStatus(
        )
        xsDataResultStatusScreeningRanks = xsDataResultISPyBObtained.getScreeningRankStatus(
        )
        xsDataResultStatusScreeningRankSet = xsDataResultISPyBObtained.getScreeningRankSetStatus(
        )

        if xsDataIntegerExpDataCollectionId != None:
            self.DEBUG("Checking dataCollectionId ...")
            EDAssert.equal(xsDataIntegerDataCollectionId.getValue(),
                           xsDataIntegerExpDataCollectionId.getValue())
        if xsDataResultStatusExpScreening != None:
            self.DEBUG("Checking screening ...")
            EDAssert.equal(xsDataResultStatusScreening.getCode().getValue(),
                           "ok")
            iId = xsDataResultStatusScreening.getId().getValue()
            EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusExpScreeningInputs != None:
            self.DEBUG("Checking inputs...")
            for xsDataResultStatusScreeningInput in xsDataResultStatusScreeningInputs:
                EDAssert.equal(
                    xsDataResultStatusScreeningInput.getCode().getValue(),
                    "ok")
                iId = xsDataResultStatusScreeningInput.getId().getValue()
                EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusExpScreeningOutputs != None:
            self.DEBUG("Checking outputs ...")
            for xsDataResultStatusScreeningOutput in xsDataResultStatusScreeningOutputs:
                EDAssert.equal(
                    xsDataResultStatusScreeningOutput.getCode().getValue(),
                    "ok")
                iId = xsDataResultStatusScreeningOutput.getId().getValue()
                EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusExpScreeningOutputLattices != None:
            self.DEBUG("Checking output lattices...")
            for xsDataResultStatusScreeningOutputLattice in xsDataResultStatusScreeningOutputLattices:
                EDAssert.equal(
                    xsDataResultStatusScreeningOutputLattice.getCode().
                    getValue(), "ok")
                iId = xsDataResultStatusScreeningOutputLattice.getId(
                ).getValue()
                EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusExpScreeningStrategies != None:
            self.DEBUG("Checking strategies...")
            for xsDataResultStatusScreeningStrategy in xsDataResultStatusScreeningStrategies:
                EDAssert.equal(
                    xsDataResultStatusScreeningStrategy.getCode().getValue(),
                    "ok")
                iId = xsDataResultStatusScreeningStrategy.getId().getValue()
                EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusExpScreeningRanks != None:
            self.DEBUG("Checking ranks...")
            for xsDataResultStatusScreeningRank in xsDataResultStatusScreeningRanks:
                EDAssert.equal(
                    xsDataResultStatusScreeningRank.getCode().getValue(), "ok")
                iId = xsDataResultStatusScreeningRank.getId().getValue()
                EDAssert.equal((iId >= 0), True)
        if xsDataResultStatusScreeningRankSet != None:
            self.DEBUG("Checking rank sets...")
            EDAssert.equal(
                xsDataResultStatusScreeningRankSet.getCode().getValue(), "ok")
            iId = xsDataResultStatusScreeningRankSet.getId().getValue()
            EDAssert.equal((iId >= 0), True)