Changeset 1188
- Timestamp:
- 10/19/07 16:28:39 (1 year ago)
- Files:
-
- PleiadesGeocoder/trunk/geo.py (modified) (6 diffs)
- PleiadesGeocoder/trunk/geocode.py (modified) (1 diff)
- PleiadesGeocoder/trunk/interfaces/__init__.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
PleiadesGeocoder/trunk/geo.py
r1185 r1188 30 30 from zope.interface import implements 31 31 from zope.app.annotation.interfaces import IAnnotations 32 33 from zope.event import notify 32 34 from persistent.dict import PersistentDict 33 35 … … 37 39 from Products.PleiadesGeocoder.interfaces \ 38 40 import IGeoreferenceable, IGeoserializable, \ 39 IGeoItemSimple, IGeoCollectionSimple 41 IGeoItemSimple, IGeoCollectionSimple, IGeoreferencedEvent 42 43 44 class GeoreferencedEvent(object): 45 """Event to notify that object has been georeferenced. 46 """ 47 implements(IGeoreferencedEvent) 48 49 def __init__(self, context): 50 self.context = context 51 40 52 41 53 ANNO_KEY = 'geocoder.simple.item' … … 90 102 """%s is invalid. Supported geometry types are: 'point', 'line', 'polygon', 'box'""" % (geomtype) 91 103 self.georef['geometryType'] = geomtype 104 notify(GeoreferencedEvent(self)) 92 105 93 106 def getSpatialCoordinates(self): … … 157 170 "Insufficient number of ordinates: %s" % str(point) 158 171 self.georef['spatialCoordinates'] = value.lstrip() 172 notify(GeoreferencedEvent(self)) 159 173 160 174 def setGeoInterface(self, geomtype, coordinates): … … 185 199 "Insufficient number of ordinates: %s" % str(point) 186 200 self.georef['spatialCoordinates'] = value.lstrip() 201 notify(GeoreferencedEvent(self)) 187 202 188 203 def isGeoreferenced(self): … … 303 318 def getBoundingBox(self): 304 319 raise NotImplementedError 305 320 321 322 PleiadesGeocoder/trunk/geocode.py
r1161 r1188 28 28 # =========================================================================== 29 29 30 from Globals import InitializeClass31 30 from OFS.SimpleItem import SimpleItem 32 31 from OFS.PropertyManager import PropertyManager PleiadesGeocoder/trunk/interfaces/__init__.py
r206 r1188 32 32 from simple import IGeoItemSimple, IGeoCollectionSimple 33 33 34 from zope.interface import Interface, Attribute 35 36 class IGeoreferencedEvent(Interface): 37 """An event fired when georeferenced. 38 """ 39 40 context = Attribute("The content object that was saved.") 41
