| Trees | Indices | Help |
|
|---|
|
|
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 method 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#method
28 """
29
30 # relax module imports.
31 from bmrblib.base_classes import BaseSaveframe, TagCategory, TagCategoryFree
32
33
35 """The method saveframe class."""
36
37 # Class variables.
38 sf_label = 'method'
39
41 """Create the tag categories."""
42
43 # The tag category objects.
44 self.tag_categories.append(Method(self))
45 self.tag_categories.append(MethodCitation(self))
46 self.tag_categories.append(MethodFile(self))
47 self.tag_categories.append(MethodParam(self))
48
49
50
52 """Base class for the Method tag category."""
53
55 """Setup the Method tag category.
56
57 @param sf: The saveframe object.
58 @type sf: saveframe instance
59 """
60
61 # Initialise the baseclass.
62 super(Method, self).__init__(sf)
63
64 # Add the tag info.
65 self.add(key='MethodID', tag_name='ID', var_name='count_str')
66 self.add(key='Details', tag_name='Details', var_name='details')
67
68
69
71 """Base class for the MethodCitation tag category."""
72
74 """Setup the MethodCitation tag category.
75
76 @param sf: The saveframe object.
77 @type sf: saveframe instance
78 """
79
80 # Initialise the baseclass.
81 super(MethodCitation, self).__init__(sf)
82
83 # Add the tag info.
84 self.add(key='CitationID', tag_name='Citation_ID', var_name='cite_ids')
85 self.add(key='MethodID', tag_name='Method_ID', var_name='count_str')
86
87
101
102
104 """Base class for the MethodFile tag category."""
105
107 """Setup the MethodFile tag category.
108
109 @param sf: The saveframe object.
110 @type sf: saveframe instance
111 """
112
113 # Initialise the baseclass.
114 super(MethodFile, self).__init__(sf)
115
116 # Add the tag info.
117 self.add(key='Name', tag_name='Name', var_name='file_name', missing=False)
118 self.add(key='TextFormat', tag_name='Text_format', var_name='text_format')
119 self.add(key='Text', tag_name='Text', var_name='file_text', missing=False)
120 self.add(key='MethodID', tag_name='Method_ID', var_name='count_str')
121
122
123
125 """Base class for the MethodParam tag category."""
126
128 """Setup the MethodParam tag category.
129
130 @param sf: The saveframe object.
131 @type sf: saveframe instance
132 """
133
134 # Initialise the baseclass.
135 super(MethodParam, self).__init__(sf)
136
137 # Add the tag info.
138 self.add(key='FileName', tag_name='File_name', var_name='param_file_name')
139 self.add(key='TextFormat', tag_name='Text_format', var_name='text_format')
140 self.add(key='Text', tag_name='Text', var_name='param_file_text')
141 self.add(key='MethodID', tag_name='Method_ID', var_name='count_str')
142
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Nov 26 19:05:16 2013 | http://epydoc.sourceforge.net |