def parse(self):
        """
        Parse a result directory to extract the pieces information to be
        stored in NIDM-Results.
        """

        try:
            # Methods: find_software, find_model_fitting, find_contrasts and
            # find_inferences should be defined in the children classes and
            # return a list of NIDM Objects as specified in the objects module

            # Object of type Software describing the neuroimaging software
            # package used for the analysis
            self.software = self._find_software()

            # List of objects of type ModelFitting describing the
            # model fitting step in NIDM-Results (main activity: Model
            # Parameters Estimation)
            self.model_fittings = self._find_model_fitting()

            # Dictionary of (key, value) pairs where where key is a tuple
            # containing the identifier of a ModelParametersEstimation object
            # and a tuple of identifiers of ParameterEstimateMap objects and
            # value is an object of type Contrast describing the contrast
            # estimation step in NIDM-Results (main activity: Contrast
            # Estimation)
            self.contrasts = self._find_contrasts()

            # Inference activity and entities
            # Dictionary of (key, value) pairs where key is the identifier of a
            # ContrastEstimation object and value is an object of type
            # Inference describing the inference step in NIDM-Results (main
            # activity: Inference)
            self.inferences = self._find_inferences()
        except Exception:
            self.cleanup()
            raise
Parse a result directory to extract the pieces information to be
        stored in NIDM-Results.