--- ECHO_content/ECHO_collection.py 2003/12/10 10:53:55 1.5 +++ ECHO_content/ECHO_collection.py 2003/12/11 11:35:38 1.6 @@ -30,6 +30,10 @@ import urllib import xml.dom.minidom +#List of different types for the graphical linking viewer +viewClassificationListMaster=['view point','area'] + + def toList(field): """Einzelfeld in Liste umwandeln""" if type(field)==StringType: @@ -90,10 +94,12 @@ def readMetadata(url): return metadict,"" -def setECHO_CollectionInformation(self,context,science,practice,source_type,period,id,title,label,description,content_type,responsible,credits,weight,coordstrs): +def setECHO_CollectionInformation(self,context,science,practice,source_type,period,id,title,label,description,content_type,responsible,credits,weight,coordstrs,viewClassification=""): """Allegemeine Informationen zu einer ECHO Collection""" + self.viewClassification=viewClassification + self.label = label self.title=title self.description=description @@ -168,7 +174,14 @@ class ECHO_resource(Folder): """ECHO Ressource""" meta_type='ECHO_resource' + viewClassificationList=viewClassificationListMaster + def getViewClassification(self): + if hasattr(self,'viewClassification'): + return self.viewClassification + else: + return "" + def __init__(self,id,link,metalink,title,label,description,content_type,responsible,credits,weight,coords): self.id = id @@ -207,12 +220,12 @@ class ECHO_resource(Folder): return pt() - def changeECHO_resource(self,metalink,link,context,science,practice,source_type,period,title,label,description,content_type,responsible,credits,weight,coords,RESPONSE=None): + def changeECHO_resource(self,metalink,link,context,science,practice,source_type,period,title,label,description,content_type,responsible,credits,weight,coords,viewClassification,RESPONSE=None): """Änderung der Properties""" - setECHO_CollectionInformation(self,context,science,practice,source_type,period,id,title,label,description,content_type,responsible,credits,weight,coords) + setECHO_CollectionInformation(self,context,science,practice,source_type,period,id,title,label,description,content_type,responsible,credits,weight,coords,viewClassification) self.link=link