--- ECHO_content/ECHO_collection.py 2003/12/09 11:20:31 1.3 +++ ECHO_content/ECHO_collection.py 2003/12/10 10:53:55 1.5 @@ -90,7 +90,7 @@ def readMetadata(url): 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): """Allegemeine Informationen zu einer ECHO Collection""" @@ -108,9 +108,14 @@ def setECHO_CollectionInformation(self,c self.scientific_Information.scientific_Classification.science=science self.scientific_Information.scientific_Classification.practice=practice - + coords=[] #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): @@ -184,7 +189,8 @@ class ECHO_resource(Folder): def getCoords(self): try: - return [ string.join(x,",") for x in self.coords] + print + return [string.join(x,",") for x in self.coords] except: return [] @@ -230,10 +236,13 @@ class ECHO_resource(Folder): else: return "NO OVERVIEW GRAPHICS" - def ECHO_enterCoords(self,coordstr,RESPONSE=None): + def ECHO_enterCoords(self,coordstr,angle="",RESPONSE=None): """Enter coords""" coords=self.coords - coords.append(coordstr.split(",")) + temco=coordstr.split(",") + temco.append(angle) + coords.append(temco) + self.coords=coords[0:] #pt=PageTemplateFile('Products/ECHO_content/ECHO_draw.zpt').__of__(self) if RESPONSE is not None: @@ -440,7 +449,10 @@ class ECHO_collection(Folder, Persistent def getCoords(self): try: - return [ string.join(x,",") for x in self.coords] + print self.coords + return [string.join(x,",") for x in self.coords] + + except: return [] @@ -477,10 +489,12 @@ class ECHO_collection(Folder, Persistent else: return "NO OVERVIEW GRAPHICS" - def ECHO_enterCoords(self,coordstr,RESPONSE=None): + def ECHO_enterCoords(self,coordstr,angle="",RESPONSE=None): """Enter coords""" coords=self.coords - coords.append(coordstr.split(",")) + temco=coordstr.split(",") + temco.append(angle) + coords.append(temco) self.coords=coords[0:] #pt=PageTemplateFile('Products/ECHO_content/ECHO_draw.zpt').__of__(self) if RESPONSE is not None: @@ -551,8 +565,9 @@ class ECHO_collection(Folder, Persistent #print "MT:",object.meta_type if object.meta_type in subColTypes: #print "MT:",object.meta_type,object.getId() - for coord in object.coords: - if len(coord)==4: + for coordtemp in object.coords: + if len(coordtemp)>3: + coord=coordtemp[0:4] if hasattr(object,'title'): if not object.title=="": ids.append([string.join(coord,", "),object.getId(),object.title])