Diff for /ECHO_content/ECHO_collection.py between versions 1.301 and 1.304

version 1.301, 2008/12/17 12:12:26 version 1.304, 2009/04/14 16:31:27
Line 1 Line 1
 """New version of the product started February, 8th. Without scientific classification, use content-type for further classification."""  """New version of the produc started February, 8th. Without scientific classification, use content-type for further classification."""
 """Echo collection provides the classes for the ECHO content web-site.  """Echo collection provides the classes for the ECHO content web-site.
   
 class ECHO_collection is the basis class for an ECHO collection.  class ECHO_collection is the basis class for an ECHO collection.
Line 106  def setECHO_collectionInformation(self,t Line 106  def setECHO_collectionInformation(self,t
         self.weight=weight          self.weight=weight
   
 import ECHO_resource  import ECHO_resource
   from ECHO_resource import manage_addECHO_resource
   
 class ECHO_resource(ECHO_resource.ECHO_resource):  class ECHO_resource(ECHO_resource.ECHO_resource):
     """depricated use class in ECHO_resource.py"""      """depricated use class in ECHO_resource.py"""
Line 721  class ECHO_collection(CatalogAware, Fold Line 722  class ECHO_collection(CatalogAware, Fold
         ret=None          ret=None
                   
         for name in zf.namelist():          for name in zf.namelist():
                fn=tempfile.mkstemp()[1]                 ds,fn=tempfile.mkstemp()
                tf=file(fn,"w")                 tf=file(fn,"w")
                x=zf.read(name)                 x=zf.read(name)
                tf.write(x)                 tf.write(x)
Line 732  class ECHO_collection(CatalogAware, Fold Line 733  class ECHO_collection(CatalogAware, Fold
                    if not ret:                     if not ret:
                        ret=""                         ret=""
                    ret+="Cannot import: %s (Already existing?)<br>"%name                     ret+="Cannot import: %s (Already existing?)<br>"%name
              os.close(ds)
                os.remove(fn)                 os.remove(fn)
                   
           zf.close()
   
         if ret:          if ret:
             return """<html><body>%s</body></html>"""%ret              return """<html><body>%s</body></html>"""%ret
         if RESPONSE:          if RESPONSE:
Line 856  class ECHO_collection(CatalogAware, Fold Line 860  class ECHO_collection(CatalogAware, Fold
   
                           
             for content in contents:              for content in contents:
           try:
                     ret+=content[1].getRDF()+"\n"                      ret+=content[1].getRDF()+"\n"
                                       except:
               logging.error("getRDF: "+repr(content[1].getRDF()))
               ret+=self.unicodify(content[1].getRDF())+"\n"
             ret+="""<RDF:Seq RDF:about="%s">\n"""%urn              ret+="""<RDF:Seq RDF:about="%s">\n"""%urn
             for content in contents:              for content in contents:
                     nurn=content[1].absolute_url()                      nurn=content[1].absolute_url()

Removed from v.1.301  
changed lines
  Added in v.1.304


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>