mailr9815 - /branches/bmrb/bmrblib/citations/citations.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 27, 2009 - 21:20:
Author: bugman
Date: Tue Oct 27 21:20:21 2009
New Revision: 9815

URL: http://svn.gna.org/viewcvs/relax?rev=9815&view=rev
Log:
The SfFramecode tag is now being created for the citation saveframes.

This fixes deposition issues due to all citations having the same 
entry_citation name.


Modified:
    branches/bmrb/bmrblib/citations/citations.py

Modified: branches/bmrb/bmrblib/citations/citations.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/citations/citations.py?rev=9815&r1=9814&r2=9815&view=diff
==============================================================================
--- branches/bmrb/bmrblib/citations/citations.py (original)
+++ branches/bmrb/bmrblib/citations/citations.py Tue Oct 27 21:20:21 2009
@@ -37,7 +37,7 @@
     """The citations saveframe class."""
 
     # Saveframe variables.
-    label = 'citations'
+    label = 'citation'
 
 
     def __init__(self, datanodes):
@@ -106,6 +106,7 @@
         self.page_first = translate(page_first)
         self.page_last = translate(page_last)
         self.year = translate(year)
+        self.citation_label = translate(citation_label)
 
         # The author info.
         self.author_given_name = []
@@ -130,10 +131,12 @@
         self.citation_num = self.citation_num + 1
         self.citation_id_num = [str(translate(self.citation_num))]
 
+        # Modify the citation label.
+        if self.citation_label == 'citation':
+            self.citation_label = 'citation ' + repr(self.citation_num)
+
         # Initialise the save frame.
-        if citation_label == 'citation':
-            citation_label = 'citation_' + repr(self.citation_num)
-        self.frame = SaveFrame(title=citation_label)
+        self.frame = SaveFrame(title=self.label)
 
         # Create the tag categories.
         self.citations.create()
@@ -163,6 +166,7 @@
 
         # All the tags.
         self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['SfCategory']], tagvalues=[[self.label]]))
+        self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['SfFramecode']], 
tagvalues=[[self.sf.citation_label]]))
         self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['CitationID']], 
tagvalues=[[str(self.sf.citation_num)]]))
         #self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['CASAbstractCode']], 
tagvalues=[[self.sf.cas_abstract_code]]))
         #self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['MEDLINEUICode']], 
tagvalues=[[self.sf.medline_ui_code]]))
@@ -199,6 +203,7 @@
 
         # Tag names for the citations.
         self.tag_names['SfCategory'] =                  'Sf_category'
+        self.tag_names['SfFramecode'] =                 'Sf_framecode'
         self.tag_names['CitationID'] =                  'ID'
         self.tag_names['CASAbstractCode'] =             'CAS_abstract_code'
         self.tag_names['MEDLINEUICode'] =               'MEDLINE_UI_code'




Related Messages


Powered by MHonArc, Updated Tue Oct 27 21:40:02 2009