|
|
| version 1.4, 2003/12/09 14:29:53 | version 1.7, 2004/01/08 17:01:35 |
|---|---|
| Line 30 import urllib | Line 30 import urllib |
| import xml.dom.minidom | import xml.dom.minidom |
| #List of different types for the graphical linking viewer | |
| viewClassificationListMaster=['view point','area'] | |
| def toList(field): | def toList(field): |
| """Einzelfeld in Liste umwandeln""" | """Einzelfeld in Liste umwandeln""" |
| if type(field)==StringType: | if type(field)==StringType: |
| Line 90 def readMetadata(url): | Line 94 def readMetadata(url): |
| return metadict,"" | return metadict,"" |
| def setECHO_CollectionInformation(self,context,science,practice,source_type,period,id,title,label,description,content_type,responsible,credits,weight,coords): | 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""" | """Allegemeine Informationen zu einer ECHO Collection""" |
| self.viewClassification=viewClassification | |
| self.label = label | self.label = label |
| self.title=title | self.title=title |
| self.description=description | self.description=description |
| Line 108 def setECHO_CollectionInformation(self,c | Line 114 def setECHO_CollectionInformation(self,c |
| self.scientific_Information.scientific_Classification.science=science | self.scientific_Information.scientific_Classification.science=science |
| self.scientific_Information.scientific_Classification.practice=practice | self.scientific_Information.scientific_Classification.practice=practice |
| coords=[] | |
| #coordinates of for rectangles | #coordinates of for rectangles |
| self.coords=coords | for coordstr in coordstrs: |
| temco=coordstr.split(",") | |
| #temco.append(angle) | |
| coords.append(temco) | |
| self.coords=coords[0:] | |
| class scientificClassification(SimpleItem,Persistent,Implicit): | class scientificClassification(SimpleItem,Persistent,Implicit): |
| Line 163 class ECHO_resource(Folder): | Line 174 class ECHO_resource(Folder): |
| """ECHO Ressource""" | """ECHO Ressource""" |
| meta_type='ECHO_resource' | 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): | def __init__(self,id,link,metalink,title,label,description,content_type,responsible,credits,weight,coords): |
| Line 202 class ECHO_resource(Folder): | Line 220 class ECHO_resource(Folder): |
| return pt() | 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""" | """Ä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 | self.link=link |
| Line 286 def manage_AddECHO_resourceForm(self): | Line 304 def manage_AddECHO_resourceForm(self): |
| return pt() | return pt() |
| def manage_AddECHO_resource(self,context,science,practice,source_type,period,id,title,label,description,content_type,responsible,link,metalink,credits,weight,coords,RESPONSE=None): | def manage_AddECHO_resource(self,context,science,practice,source_type,period,id,title,label,description,content_type,responsible,link,metalink,credits,weight,coords=[],RESPONSE=None): |
| """nothing yet""" | """nothing yet""" |
| scientificClassificationObj=scientificClassification(context,science,practice) | scientificClassificationObj=scientificClassification(context,science,practice) |