[Erp5-report] r10512 - /erp5/trunk/products/ERP5OOo/Document/OOoDocument.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Oct 3 14:10:17 CEST 2006


Author: jp
Date: Tue Oct  3 14:10:16 2006
New Revision: 10512

URL: http://svn.erp5.org?rev=10512&view=rev
Log:
Added formal representation of data and mime types so that synchronisation can be supported.

Modified:
    erp5/trunk/products/ERP5OOo/Document/OOoDocument.py

Modified: erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/Document/OOoDocument.py?rev=10512&r1=10511&r2=10512&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/Document/OOoDocument.py (original)
+++ erp5/trunk/products/ERP5OOo/Document/OOoDocument.py Tue Oct  3 14:10:16 2006
@@ -100,6 +100,7 @@
   property_sheets = ( PropertySheet.Base
                     , PropertySheet.CategoryCore
                     , PropertySheet.DublinCore
+                    , PropertySheet.Data
                     , PropertySheet.Version
                     , PropertySheet.Reference
                     , PropertySheet.Document
@@ -111,9 +112,12 @@
   rx_strip=re.compile('<[^>]*?>',re.DOTALL|re.MULTILINE)
   rx_compr=re.compile('\s+')
 
-  searchable_attrs=DMSFile.searchable_attrs+('text_content',)
-
-  def _getServerCoordinates(self):
+  searchable_attrs=DMSFile.searchable_attrs+('text_content',) # XXX - good idea - should'n this be made more general ?
+
+  def _getServerCoordinates(self):    # XXX - Naming - should be _getServerCoordinate or _getServerCoordinateList
+                                      # the reason why plural is not so good is because one never
+                                      # knows is plural returns a count (ie. the server has 3 coordinates)
+                                      # or if plural returns a list
     """
     Returns OOo conversion server data from 
     preferences
@@ -275,7 +279,8 @@
     #self.setReference(meta.get('reference',''))
 
   #security.declareProtected(Permissions.View,'getOOfile')
-  def getOOfile(self):
+  def getOOfile(self): # We must be consistent - OOoDocument and OOoFile is OK
+                       # XXX                     OODocument and OOFile is OK
     """
     Return the converted OOo document.
 
@@ -287,7 +292,8 @@
     return data
 
   security.declareProtected(Permissions.View,'hasOOfile')
-  def hasOOfile(self):
+  def hasOOfile(self): # We must be consistent - OOoDocument and OOoFile is OK
+                       # XXX                     OODocument and OOFile is OK
     """
     Checks whether we have an OOo converted file
     """




More information about the Erp5-report mailing list