Changeset 1216
- Timestamp:
- 10/30/07 23:30:13 (1 year ago)
- Files:
-
- PleiadesGeocoder/trunk/CHANGES.txt (modified) (1 diff)
- PleiadesGeocoder/trunk/configure.zcml (modified) (3 diffs)
- PleiadesGeocoder/trunk/interfaces/__init__.py (modified) (2 diffs)
- PleiadesGeocoder/trunk/interfaces/simple.py (modified) (3 diffs)
- PleiadesGeocoder/trunk/tests/test_simple.py (modified) (3 diffs)
- PleiadesGeocoder/trunk/version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
PleiadesGeocoder/trunk/CHANGES.txt
r630 r1216 3 3 4 4 All ticket numbers are relative to http://icon.stoa.org/trac/pleiades/tickets. 5 6 1.0a1 7 ----- 8 - Added a content georeferencing event. 9 - New content georeferencing form, with event notification. 10 - GML geometry serialization used in GeoRSS view. 11 - Added support for LineString and Polygon geometry types. 5 12 6 13 0.6.2 - 20 February, 2007 PleiadesGeocoder/trunk/configure.zcml
r1166 r1216 7 7 8 8 <adapter 9 for=".interfaces.I Georeferenceable"9 for=".interfaces.IItem" 10 10 provides=".interfaces.IGeoItemSimple" 11 11 factory=".geo.GeoItemSimple" … … 13 13 14 14 <adapter 15 for=".interfaces.I Geoserializable"15 for=".interfaces.ICollection" 16 16 provides=".interfaces.IGeoCollectionSimple" 17 17 factory=".geo.GeoCollectionSimple" 18 18 /> 19 19 20 <five:implements 21 class="Products.ATContentTypes.content.base.BaseContent" 22 interface=".interfaces.IItem" 23 /> 24 25 <five:implements 26 class="Products.ATContentTypes.content.base.BaseContent" 27 interface=".interfaces.ICollection" 28 /> 20 29 21 30 <five:implements … … 31 40 <five:implements 32 41 class="Products.ATContentTypes.content.folder.ATFolder" 42 interface=".interfaces.ICollection" 43 /> 44 45 <five:implements 46 class="Products.ATContentTypes.content.folder.ATFolder" 33 47 interface=".interfaces.IGeoserializable" 48 /> 49 50 <five:implements 51 class="Products.ATContentTypes.content.topic.ATTopic" 52 interface=".interfaces.ICollection" 34 53 /> 35 54 PleiadesGeocoder/trunk/interfaces/__init__.py
r1188 r1216 34 34 from zope.interface import Interface, Attribute 35 35 36 37 class IItem(Interface): 38 """Marker for items.""" 39 40 41 class ICollection(Interface): 42 """Marker for collections.""" 43 44 36 45 class IGeoreferencedEvent(Interface): 37 46 """An event fired when georeferenced. … … 40 49 context = Attribute("The content object that was saved.") 41 50 51 PleiadesGeocoder/trunk/interfaces/simple.py
r372 r1216 28 28 # =========================================================================== 29 29 30 from zope.interface import Interface 30 from zope.interface import Interface, Attribute 31 31 from zope.app.annotation.interfaces import IAttributeAnnotatable 32 32 … … 109 109 def setGeometry(type, coordinates): 110 110 """Set spatial coordinates, input is a tuple of (X, Y, Z) floats.""" 111 111 112 def setGeoInterface(type, coordinates): 113 """Set type and coordinates, following the geo interface spec.""" 114 112 115 def getInfo(dims): 113 116 """Returns a dict suitable for serialization to GeoRSS or KML. … … 119 122 has an SRS, geometry type, and coordinates.""" 120 123 124 def hasPoint(): 125 """Returns True if the item has a point geometry.""" 126 127 def hasLineString(): 128 """Returns True if the item has a linestring geometry.""" 129 130 def hasPolygon(): 131 """Returns True if the item has a polygon geometry.""" 132 133 __geo_interface__ = Attribute("Provides Python geo interface") 121 134 122 135 class IGeoCollectionSimple(Interface): PleiadesGeocoder/trunk/tests/test_simple.py
r459 r1216 11 11 from Products.PleiadesGeocoder.interfaces \ 12 12 import IGeoreferenceable, IGeoserializable \ 13 , IGeoItemSimple, IGeoCollectionSimple 13 , IGeoItemSimple, IGeoCollectionSimple \ 14 , IItem, ICollection 14 15 from Products.PleiadesGeocoder.geo import GeoItemSimple, GeoCollectionSimple 15 16 from Products.PleiadesGeocoder.utils import addSpatialMemberData … … 27 28 28 29 def testImplements(self): 29 self.failUnless(I Georeferenceable.implementedBy(BaseContent))30 self.failUnless(I Georeferenceable.implementedBy(ATDocument))30 self.failUnless(IItem.implementedBy(BaseContent)) 31 self.failUnless(IItem.implementedBy(ATDocument)) 31 32 32 33 class DocumentTest(PloneTestCase.PloneTestCase): … … 41 42 42 43 def testInterfaces(self): 43 self.failUnless(IGeoreferenceable.providedBy(self.document)) 44 self.failUnless(IItem.providedBy(self.document)) 45 self.failUnless(ICollection.providedBy(self.document)) 44 46 45 47 def testGeoreferenced(self): PleiadesGeocoder/trunk/version.txt
r630 r1216 1 0.6.2 2 1 1.0a1
