Package bmrblib :: Package citations :: Module citations
[hide private]
[frames] | no frames]

Source Code for Module bmrblib.citations.citations

  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 citations 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/SaveFramePage.html#citations. 
 28  """ 
 29   
 30  # relax module imports. 
 31  from bmrblib.base_classes import BaseSaveframe, TagCategory, TagCategoryFree 
 32   
 33   
34 -class CitationsSaveframe(BaseSaveframe):
35 """The citations saveframe class.""" 36 37 # Class variables. 38 label = 'citation' 39 sf_label = 'citations' 40
41 - def add_tag_categories(self):
42 """Create the tag categories.""" 43 44 # The tag category objects. 45 self.tag_categories.append(Citations(self)) 46 self.tag_categories.append(CitationsAuthor(self))
47 48 49
50 -class Citations(TagCategoryFree):
51 """Base class for the Citations tag category.""" 52
53 - def __init__(self, sf):
54 """Setup the Citations tag category. 55 56 @param sf: The saveframe object. 57 @type sf: saveframe instance 58 """ 59 60 # Initialise the baseclass. 61 super(Citations, self).__init__(sf) 62 63 # Add the tag info. 64 self.add(key='CitationID', tag_name='ID', var_name='count_str') 65 self.add(key='CASAbstractCode', tag_name='CAS_abstract_code', var_name='cas_abstract_code') 66 self.add(key='MEDLINEUICode', tag_name='MEDLINE_UI_code', var_name='medline_ui_code') 67 self.add(key='DOI', tag_name='DOI', var_name='doi') 68 self.add(key='PubMedID', tag_name='PubMed_ID', var_name='pubmed_id') 69 self.add(key='FullCitation', tag_name='Full_citation', var_name='full_citation') 70 self.add(key='Title', tag_name='Title', var_name='title') 71 self.add(key='Status', tag_name='Status', var_name='status') 72 self.add(key='Type', tag_name='Type', var_name='type') 73 self.add(key='JournalAbbrev', tag_name='Journal_abbrev', var_name='journal_abbrev') 74 self.add(key='JournalNameFull', tag_name='Journal_name_full', var_name='journal_full') 75 self.add(key='JournalVolume', tag_name='Journal_volume', var_name='volume') 76 self.add(key='JournalIssue', tag_name='Journal_issue', var_name='issue') 77 self.add(key='JournalASTM', tag_name='Journal_ASTM', var_name=None) 78 self.add(key='JournalISSN', tag_name='Journal_ISSN', var_name=None) 79 self.add(key='JournalCSD', tag_name='Journal_CSD', var_name=None) 80 self.add(key='BookTitle', tag_name='Book_title', var_name=None) 81 self.add(key='BookChapterTitle', tag_name='Book_chapter_title', var_name=None) 82 self.add(key='BookVolume', tag_name='Book_volume', var_name=None) 83 self.add(key='BookSeries', tag_name='Book_series', var_name=None) 84 self.add(key='BookPublisher', tag_name='Book_publisher', var_name=None) 85 self.add(key='BookPublisherCity', tag_name='Book_publisher_city', var_name=None) 86 self.add(key='BookISBN', tag_name='Book_ISBN', var_name=None) 87 self.add(key='ConferenceTitle', tag_name='Conference_title', var_name=None) 88 self.add(key='ConferenceSite', tag_name='Conference_site', var_name=None) 89 self.add(key='ConferenceStateProvince', tag_name='Conference_state_province', var_name=None) 90 self.add(key='ConferenceCountry', tag_name='Conference_country', var_name=None) 91 self.add(key='ConferenceStartDate', tag_name='Conference_start_date', var_name=None) 92 self.add(key='ConferenceEndDate', tag_name='Conference_end_date', var_name=None) 93 self.add(key='ConferenceAbstractNumber', tag_name='Conference_abstract_number', var_name=None) 94 self.add(key='ThesisInstitution', tag_name='Thesis_institution', var_name=None) 95 self.add(key='ThesisInstitutionCity', tag_name='Thesis_institution_city', var_name=None) 96 self.add(key='ThesisInstitutionCountry', tag_name='Thesis_institution_country', var_name=None) 97 self.add(key='WWWURL', tag_name='WWW_URL', var_name=None) 98 self.add(key='PageFirst', tag_name='Page_first', var_name='page_first') 99 self.add(key='PageLast', tag_name='Page_last', var_name='page_last') 100 self.add(key='Year', tag_name='Year', var_name='year') 101 self.add(key='Details', tag_name='Details', var_name=None)
102 103 104
105 -class CitationsAuthor(TagCategory):
106 """Base class for the CitationsAuthor tag category.""" 107
108 - def __init__(self, sf):
109 """Setup the CitationsAuthor tag category. 110 111 @param sf: The saveframe object. 112 @type sf: saveframe instance 113 """ 114 115 # Initialise the baseclass. 116 super(CitationsAuthor, self).__init__(sf) 117 118 # Add the tag info. 119 self.add(key='Ordinal', tag_name='Ordinal', var_name='data_ids') 120 self.add(key='GivenName', tag_name='Given_name', var_name='author_given_name') 121 self.add(key='FamilyName', tag_name='Family_name', var_name='author_family_name') 122 self.add(key='FirstInitial', tag_name='First_initial', var_name='author_first_init') 123 self.add(key='MiddleInitials', tag_name='Middle_initials', var_name='author_mid_init') 124 self.add(key='FamilyTitle', tag_name='Family_title', var_name='author_family_title') 125 self.add(key='SfID', tag_name='Sf_ID', var_name=None) 126 self.add(key='EntryID', tag_name='Entry_ID', var_name=None) 127 self.add(key='CitationID', tag_name='Citation_ID', var_name='count_str')
128