Package bmrblib :: Package experimental_details :: Module software_v3_1
[hide private]
[frames] | no frames]

Source Code for Module bmrblib.experimental_details.software_v3_1

  1  ############################################################################# 
  2  #                                                                           # 
  3  # The BMRB library.                                                         # 
  4  #                                                                           # 
  5  # Copyright (C) 2009-2011 Edward d'Auvergne                                 # 
  6  #                                                                           # 
  7  # This program is free software: you can redistribute it and/or modify      # 
  8  # it under the terms of the GNU General Public License as published by      # 
  9  # the Free Software Foundation, either version 3 of the License, or         # 
 10  # (at your option) any later version.                                       # 
 11  #                                                                           # 
 12  # This program is distributed in the hope that it will be useful,           # 
 13  # but WITHOUT ANY WARRANTY; without even the implied warranty of            # 
 14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             # 
 15  # GNU General Public License for more details.                              # 
 16  #                                                                           # 
 17  # You should have received a copy of the GNU General Public License         # 
 18  # along with this program.  If not, see <http://www.gnu.org/licenses/>.     # 
 19  #                                                                           # 
 20  ############################################################################# 
 21   
 22  # Module docstring. 
 23  """The software saveframe category. 
 24   
 25  For example, see http://www.bmrb.wisc.edu/dictionary/3.1html_frame/frame_SaveFramePage.html#software 
 26  """ 
 27   
 28  # relax module imports. 
 29  from bmrblib.experimental_details.software import SoftwareSaveframe, Software, SoftwareCitation, Task, Vendor 
 30   
 31   
32 -class SoftwareSaveframe_v3_1(SoftwareSaveframe):
33 """The software saveframe class.""" 34 35 # Class variables. 36 sf_label = 'software' 37
38 - def add_tag_categories(self):
39 """Create the tag categories.""" 40 41 # The tag category objects. 42 self.tag_categories.append(Software_v3_1(self)) 43 self.tag_categories.append(SoftwareCitation_v3_1(self)) 44 self.tag_categories.append(Task_v3_1(self)) 45 self.tag_categories.append(Vendor_v3_1(self))
46 47 48
49 -class Software_v3_1(Software):
50 """Base class for the Software tag category.""" 51
52 - def __init__(self, sf):
53 """Setup the Software tag category. 54 55 @param sf: The saveframe object. 56 @type sf: saveframe instance 57 """ 58 59 # Initialise the baseclass. 60 super(Software_v3_1, self).__init__(sf) 61 62 # The category name. 63 self.tag_category_label = 'Software' 64 65 # Change tag names. 66 self['SfCategory'].tag_name = 'Sf_category' 67 self['SfFramecode'].tag_name = 'Sf_framecode'
68 69 70
71 -class SoftwareCitation_v3_1(SoftwareCitation):
72 """Base class for the SoftwareCitation tag category.""" 73 74
75 - def __init__(self, sf):
76 """Setup the SoftwareCitation tag category. 77 78 @param sf: The saveframe object. 79 @type sf: saveframe instance 80 """ 81 82 # Initialise the baseclass. 83 super(SoftwareCitation_v3_1, self).__init__(sf) 84 85 # The category name. 86 self.tag_category_label = 'Software_citation'
87 88 89
90 -class Task_v3_1(Task):
91 """Base class for the Task tag category.""" 92
93 - def __init__(self, sf):
94 """Setup the Task tag category. 95 96 @param sf: The saveframe object. 97 @type sf: saveframe instance 98 """ 99 100 # Initialise the baseclass. 101 super(Task_v3_1, self).__init__(sf) 102 103 # The category name. 104 self.tag_category_label = 'Task'
105 106 107
108 -class Vendor_v3_1(Vendor):
109 """Base class for the Vendor tag category.""" 110
111 - def __init__(self, sf):
112 """Setup the Vendor tag category. 113 114 @param sf: The saveframe object. 115 @type sf: saveframe instance 116 """ 117 118 # Initialise the baseclass. 119 super(Vendor_v3_1, self).__init__(sf) 120 121 # The category name. 122 self.tag_category_label = 'Vendor'
123