--- ECHO_content/ECHO_collection.py 2004/07/14 14:48:59 1.138
+++ ECHO_content/ECHO_collection.py 2004/07/16 17:49:44 1.139
@@ -486,6 +486,23 @@ class ECHO_resource(Folder,Persistent):
getSubCols = ECHO_helpers.getSubCols
+ security.declareProtected('View','index_html')
+ def getRDF(self):
+ """rdf"""
+ ret=""
+ about=""""""
+ name="""%s"""
+ link="""%s"""
+ urn="urn:"+re.sub('/',':',self.absolute_url())
+
+ about2=about%urn
+ name2=name%self.getId()
+ link2=link%self.link
+
+ ret=about2+"\n"+name2+"\n"+link2+"\n"+""
+ return ret
+
+
def getAccessRightSelectorHTML(self,outlook="select"):
"""htmlselector"""
values=['free','mpiwg']
@@ -1472,6 +1489,34 @@ class ECHO_collection(Folder, Persistent
path="/mpiwg/online/permanent/shipbuilding"
+ def getRDF(self):
+ """rdf of the collection"""
+ contents=self.ZopeFind(self,obj_metatypes=['ECHO_group','ECHO_resource','ECHO_collection'])
+
+ about=""""""
+ name="""%s"""
+
+ urn="urn:"+re.sub('/',':',self.absolute_url())
+
+ about2=about%urn
+ name2=name%self.getId()
+
+
+ ret=about2+"\n"+name2+"\n"+""
+ urn="urn:"+re.sub('/',':',self.absolute_url())
+ li="""\n"""
+
+
+ for content in contents:
+ ret+=content[1].getRDF()+"\n"
+
+ ret+="""\n"""%urn
+ for content in contents:
+ nurn="urn:"+re.sub('/',':',content[1].absolute_url())
+ ret+=li%nurn
+ return ret+""
+
+
def changeLabels(self):
"""change form"""
pt=PageTemplateFile('Products/ECHO_content/zpt/changeLabelsForm').__of__(self)
@@ -2174,6 +2219,24 @@ class ECHO_group(ECHO_collection):
)
security.declareProtected('View','index_html')
+
+ def getRDF(self):
+ """rdf of the collection"""
+ contents=self.ZopeFind(self,obj_metatypes=['ECHO_group','ECHO_resource','ECHO_collection'])
+
+ urn="urn:"+re.sub('/',':',self.absolute_url())
+ li="""\n"""
+ ret=""
+
+ for content in contents:
+ ret+=content[1].getRDF()+"\n"
+
+ ret+="""\n"""%urn
+ for content in contents:
+ nurn="urn:"+re.sub('/',':',content[1].absolute_url())
+ ret+=li%nurn
+ return ret+""
+
def index_html(self):
"""standard page"""
displayedObjects=self.ZopeFind(self,obj_metatypes=displayTypes)