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-2013 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  This file is part of the U{BMRB library<https://sourceforge.net/projects/bmrblib>}. 
 26   
 27  For example, see http://www.bmrb.wisc.edu/dictionary/3.1html_frame/frame_SaveFramePage.html#software 
 28  """ 
 29   
 30  # relax module imports. 
 31  from bmrblib.experimental_details.software import SoftwareSaveframe, Software, SoftwareCitation, Task, Vendor 
 32   
 33   
34 -class SoftwareSaveframe_v3_1(SoftwareSaveframe):
35 """The software saveframe class.""" 36 37 # Class variables. 38 sf_label = 'software' 39
40 - def add_tag_categories(self):
41 """Create the tag categories.""" 42 43 # The tag category objects. 44 self.tag_categories.append(Software_v3_1(self)) 45 self.tag_categories.append(SoftwareCitation_v3_1(self)) 46 self.tag_categories.append(Task_v3_1(self)) 47 self.tag_categories.append(Vendor_v3_1(self))
48 49 50
51 -class Software_v3_1(Software):
52 """Base class for the Software tag category.""" 53
54 - def __init__(self, sf):
55 """Setup the Software tag category. 56 57 @param sf: The saveframe object. 58 @type sf: saveframe instance 59 """ 60 61 # Initialise the baseclass. 62 super(Software_v3_1, self).__init__(sf) 63 64 # The category name. 65 self.tag_category_label = 'Software' 66 67 # Change tag names. 68 self['SfCategory'].tag_name = 'Sf_category' 69 self['SfFramecode'].tag_name = 'Sf_framecode'
70 71 72
73 -class SoftwareCitation_v3_1(SoftwareCitation):
74 """Base class for the SoftwareCitation tag category.""" 75 76
77 - def __init__(self, sf):
78 """Setup the SoftwareCitation tag category. 79 80 @param sf: The saveframe object. 81 @type sf: saveframe instance 82 """ 83 84 # Initialise the baseclass. 85 super(SoftwareCitation_v3_1, self).__init__(sf) 86 87 # The category name. 88 self.tag_category_label = 'Software_citation'
89 90 91
92 -class Task_v3_1(Task):
93 """Base class for the Task tag category.""" 94
95 - def __init__(self, sf):
96 """Setup the Task tag category. 97 98 @param sf: The saveframe object. 99 @type sf: saveframe instance 100 """ 101 102 # Initialise the baseclass. 103 super(Task_v3_1, self).__init__(sf) 104 105 # The category name. 106 self.tag_category_label = 'Task'
107 108 109
110 -class Vendor_v3_1(Vendor):
111 """Base class for the Vendor tag category.""" 112
113 - def __init__(self, sf):
114 """Setup the Vendor tag category. 115 116 @param sf: The saveframe object. 117 @type sf: saveframe instance 118 """ 119 120 # Initialise the baseclass. 121 super(Vendor_v3_1, self).__init__(sf) 122 123 # The category name. 124 self.tag_category_label = 'Vendor'
125