@@ -120,29 +120,37 @@ def __readMsgFile(self, depid, contentType, b_use_cache=True, test_folder=None):
120120 if ok :
121121 # Store the messages data directly - no conversion needed
122122 messages = pdbxMsgIo .getMessageInfo ()
123- if messages :
123+ messagesref = pdbxMsgIo .getFileReferenceInfo ()
124+ if messages or messagesref :
124125 # Create a simple container-like structure for compatibility
125126 class SimpleContainer :
126- def __init__ (self , data ):
127+ def __init__ (self , data , refdata ):
127128 self ._data = data
129+ self ._refdata = refdata
128130
129131 def getObj (self , category_name ):
130132 if category_name == "pdbx_deposition_message_info" :
131133 return SimpleCategory (self ._data )
134+ if category_name == "pdbx_deposition_message_file_reference" :
135+ return SimpleCategory (self ._refdata , True )
132136 return None
133137
134138 class SimpleCategory :
135- def __init__ (self , messages ):
139+ def __init__ (self , messages , refcontainer = False ):
136140 self ._messages = messages
137141 self ._attributes = list (messages [0 ].keys ()) if messages else []
142+ self ._refcont = refcontainer
138143
139144 def getItemNameList (self ):
140- return [f"_pdbx_deposition_message_info.{ attr } " for attr in self ._attributes ]
145+ if self ._refcont :
146+ return [f"_pdbx_deposition_message_file_reference.{ attr } " for attr in self ._attributes ]
147+ else :
148+ return [f"_pdbx_deposition_message_info.{ attr } " for attr in self ._attributes ]
141149
142150 def getRowList (self ):
143151 return [[str (msg .get (attr , "" )) for attr in self ._attributes ] for msg in self ._messages ]
144152
145- container = SimpleContainer (messages )
153+ container = SimpleContainer (messages , messagesref )
146154 self .__lc = [container ]
147155 else :
148156 self .__lc = []
0 commit comments