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

Source Code for Module bmrblib.experimental_details.method_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 method saveframe category. 
 24   
 25  For example, see http://www.bmrb.wisc.edu/dictionary/3.1html_frame/frame_SaveFramePage.html#method 
 26  """ 
 27   
 28  # relax module imports. 
 29  from bmrblib.experimental_details.method import MethodSaveframe, Method, MethodCitation, MethodFile, MethodParam 
 30   
 31   
32 -class MethodSaveframe_v3_1(MethodSaveframe):
33 """The method saveframe class.""" 34 35 # Class variables. 36 sf_label = 'method' 37
38 - def add_tag_categories(self):
39 """Create the tag categories.""" 40 41 # The tag category objects. 42 self.tag_categories.append(Method_v3_1(self)) 43 self.tag_categories.append(MethodCitation_v3_1(self)) 44 self.tag_categories.append(MethodFile_v3_1(self)) 45 self.tag_categories.append(MethodParam_v3_1(self))
46 47 48
49 -class Method_v3_1(Method):
50 """Base class for the Method tag category.""" 51
52 - def __init__(self, sf):
53 """Setup the Method tag category. 54 55 @param sf: The saveframe object. 56 @type sf: saveframe instance 57 """ 58 59 # Initialise the baseclass. 60 super(Method_v3_1, self).__init__(sf) 61 62 # The category name. 63 self.tag_category_label = 'Method' 64 65 # Change tag names. 66 self['SfCategory'].tag_name = 'Sf_category' 67 self['SfFramecode'].tag_name = 'Sf_framecode' 68 69 # Change the variable names. 70 self['SfFramecode'].var_name = 'name'
71 72 73
74 -class MethodCitation_v3_1(MethodCitation):
75 """Base class for the MethodCitation tag category.""" 76
77 - def __init__(self, sf):
78 """Setup the MethodCitation tag category. 79 80 @param sf: The saveframe object. 81 @type sf: saveframe instance 82 """ 83 84 # Initialise the baseclass. 85 super(MethodCitation_v3_1, self).__init__(sf) 86 87 # The category name. 88 self.tag_category_label = 'Method_citation'
89 90 91
92 -class MethodFile_v3_1(MethodFile):
93 """Base class for the MethodFile tag category.""" 94
95 - def __init__(self, sf):
96 """Setup the MethodFile tag category. 97 98 @param sf: The saveframe object. 99 @type sf: saveframe instance 100 """ 101 102 # Initialise the baseclass. 103 super(MethodFile_v3_1, self).__init__(sf) 104 105 # The category name. 106 self.tag_category_label = 'Method_file'
107 108 109
110 -class MethodParam_v3_1(MethodParam):
111 """Base class for the MethodParam tag category.""" 112
113 - def __init__(self, sf):
114 """Setup the MethodParam tag category. 115 116 @param sf: The saveframe object. 117 @type sf: saveframe instance 118 """ 119 120 # Initialise the baseclass. 121 super(MethodParam_v3_1, self).__init__(sf) 122 123 # The category name. 124 self.tag_category_label = 'Method_param'
125