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