Author: bugman Date: Fri Oct 9 21:19:02 2009 New Revision: 9716 URL: http://svn.gna.org/viewcvs/relax?rev=9716&view=rev Log: Expanded the experimental information data container to include all the software info. Modified: branches/bmrb/data/exp_info.py Modified: branches/bmrb/data/exp_info.py URL: http://svn.gna.org/viewcvs/relax/branches/bmrb/data/exp_info.py?rev=9716&r1=9715&r2=9716&view=diff ============================================================================== --- branches/bmrb/data/exp_info.py (original) +++ branches/bmrb/data/exp_info.py Fri Oct 9 21:19:02 2009 @@ -24,7 +24,7 @@ """Module holding the experimental information data container.""" # relax module imports. -from data_classes import Element +from data_classes import ContainerList, Element class ExpInfo(Element): @@ -34,7 +34,59 @@ """Initialise the data container.""" # The name of the container. - self.name = 'exp_info' + self.element_name = 'exp_info' # The description of the container. - self.desc = 'Experimental information' + self.element_desc = 'Experimental information' + + # Blacklisted objects. + self.blacklist = ['software'] + + + def software_setup(self, name, url=None, version=None): + """Set up the software information.""" + + # Initialise the container if needed. + if not hasattr(self, 'software'): + self.software = SoftwareList() + + # Append a container. + self.software.append(Software()) + + # Set the attributes. + self.software[-1].name = name + if url: + self.software[-1].url = url + if version: + self.software[-1].version = version + + + +class SoftwareList(ContainerList): + """The software data container list.""" + + def __init__(self): + """Initialise the data container.""" + + # The name of the container. + self.container_name = 'software_list' + + # The description of the container. + self.container_desc = 'List of software programs used in the analysis' + + + +class Software(Element): + """The individual software data container.""" + + def __init__(self): + """Initialise the data container.""" + + # The name of the container. + self.element_name = 'software' + + # The description of the container. + self.element_desc = 'Software program used in the analysis' + + +