Diff for /ECHO_content/ECHO_collection.py between versions 1.142 and 1.143

version 1.142, 2004/07/18 14:14:42 version 1.143, 2004/07/18 14:38:11
Line 59  def getRDFDescription(self,linkURL,urn=N Line 59  def getRDFDescription(self,linkURL,urn=N
             urn="urn:"+re.sub('/',':',self.absolute_url())              urn="urn:"+re.sub('/',':',self.absolute_url())
   
         about2=about%urn          about2=about%urn
           
         if hasattr(self,'label') and not (self.label==""):          if hasattr(self,'label') and not (self.label==""):
             name2=name%urllib.quote(self.label)              name2=name%urllib.quote(self.label)
         elif not self.title=="":          elif not self.title=="":
Line 515  class ECHO_resource(Folder,Persistent): Line 516  class ECHO_resource(Folder,Persistent):
     getSubCols = ECHO_helpers.getSubCols      getSubCols = ECHO_helpers.getSubCols
   
     security.declareProtected('View','index_html')      security.declareProtected('View','index_html')
     def getRDF(self):      def getRDF(self,urn=None):
         """rdf"""          """rdf"""
         return getRDFDescription(self,self.link)          return getRDFDescription(self,self.link,urn=urn)
                   
                   
     def getAccessRightSelectorHTML(self,outlook="select"):      def getAccessRightSelectorHTML(self,outlook="select"):
Line 1510  class ECHO_collection(Folder, Persistent Line 1511  class ECHO_collection(Folder, Persistent
         """showrdf"""          """showrdf"""
             self.REQUEST.RESPONSE.setHeader('Content-Type','text/xml')              self.REQUEST.RESPONSE.setHeader('Content-Type','text/xml')
         ret="""<?xml encoding="utf-8"?>\n<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  xmlns:ECHONAVIGATION="http://www.echo.eu/rdf#">\n"""          ret="""<?xml encoding="utf-8"?>\n<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  xmlns:ECHONAVIGATION="http://www.echo.eu/rdf#">\n"""
         ret+=self.getRDF(urn="echo:collectionroot")+"\n"          ret+=self.getRDF(urn="urn:echo:collectionroot")+"\n"
         ret+="""</RDF:RDF>"""          ret+="""</RDF:RDF>"""
             return ret               return ret 
   
     def getRDF(self,urn=None):      def getRDF(self,urn=None):
         """rdf of the collection"""          """rdf of the collection"""
   
         contents=self.ZopeFind(self,obj_metatypes=['ECHO_group','ECHO_resource','ECHO_collection'])          contents=self.ZopeFind(self,obj_metatypes=['ECHO_group','ECHO_resource','ECHO_collection'])
   
         ret=getRDFDescription(self,self.absolute_url(),urn)          ret=getRDFDescription(self,self.absolute_url(),urn=urn)
   
         if not urn:          if not urn:
             urn="urn:"+re.sub('/',':',self.absolute_url())              urn="urn:"+re.sub('/',':',self.absolute_url())
         else:  
             urn="urn:"+urn  
                           
         li="""<RDF:li resource="%s" />\n"""          li="""<RDF:li resource="%s" />\n"""
   
Line 2241  class ECHO_group(ECHO_collection): Line 2241  class ECHO_group(ECHO_collection):
           
     security.declareProtected('View','index_html')      security.declareProtected('View','index_html')
   
     def getRDF(self):      def getRDF(self,urn=None):
         """rdf of the collection"""          """rdf of the collection"""
         contents=self.ZopeFind(self,obj_metatypes=['ECHO_group','ECHO_resource','ECHO_collection'])          contents=self.ZopeFind(self,obj_metatypes=['ECHO_group','ECHO_resource','ECHO_collection'])
   
         ret=getRDFDescription(self,self.absolute_url())          ret=getRDFDescription(self,self.absolute_url(),urn)
   
                   
   
Line 2482  class ECHO_root(Folder,Persistent,Implic Line 2482  class ECHO_root(Folder,Persistent,Implic
         """showrdf"""          """showrdf"""
             self.REQUEST.RESPONSE.setHeader('Content-Type','text/xml')              self.REQUEST.RESPONSE.setHeader('Content-Type','text/xml')
         ret="""<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  xmlns:ECHONAVIGATION="http://www.echo.eu/rdf#">\n"""          ret="""<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  xmlns:ECHONAVIGATION="http://www.echo.eu/rdf#">\n"""
         ret+=self.getRDF()+"\n"          ret+=self.getRDF(urn="echo:collectionroot")+"\n"
   
         ret+="""</RDF:RDF>"""          ret+="""</RDF:RDF>"""
             return ret              return ret
   
     def getRDF(self):      def getRDF(self,urn=None):
         """rdf of the collection"""          """rdf of the collection"""
         contents=self.ZopeFind(self,obj_metatypes=['ECHO_group','ECHO_resource','ECHO_collection'])  
   
         about="""<RDF:Description about="%s">"""  
         name="""<ECHONAVIGATION:name>%s</ECHONAVIGATION:name>"""  
           
         urn="urn:"+re.sub('/',':',self.absolute_url())  
   
         about2=about%urn  
         name2=name%self.getId()  
                   
           contents=self.ZopeFind(self,obj_metatypes=['ECHO_group','ECHO_resource','ECHO_collection'])
   
         ret=about2+"\n"+name2+"\n"+"</RDF:Description>"          ret=getRDFDescription(self,self.absolute_url(),urn=urn)
   
         li="""<RDF:li resource="%s" />\n"""          li="""<RDF:li resource="%s" />\n"""
   

Removed from v.1.142  
changed lines
  Added in v.1.143


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