Changeset 1218

Show
Ignore:
Timestamp:
10/31/07 10:59:22 (1 year ago)
Author:
sgillies
Message:

Separate geo item and view markers interfaces and consoliodate all into interfaces.py

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • PleiadesGeocoder/trunk/CHANGES.txt

    r1216 r1218  
    33 
    44All ticket numbers are relative to http://icon.stoa.org/trac/pleiades/tickets. 
     5 
     61.0b1 
     7----- 
     8- IGeoserializeable and IGeoreferenceable are now markers for viewables only. 
     9- Interfaces consolidated in interfaces.py. 
    510 
    6111.0a1 
  • PleiadesGeocoder/trunk/configure.zcml

    r1216 r1218  
    66  <include package="zope.app.annotation"/> 
    77 
     8  <!--   
     9    PleiadesGeocoder.interfaces.IGeoAnnotatableContent and IGeoFolder are to 
     10    be used as markers for IGeoItemSimple and IGeoCollectionSimple adaptability 
     11    --> 
     12  
    813  <adapter 
    9     for=".interfaces.IItem
     14    for=".interfaces.IGeoAnnotatableContent
    1015    provides=".interfaces.IGeoItemSimple" 
    1116    factory=".geo.GeoItemSimple" 
     
    1318 
    1419  <adapter 
    15     for=".interfaces.ICollection
     20    for=".interfaces.IGeoFolder
    1621    provides=".interfaces.IGeoCollectionSimple" 
    1722    factory=".geo.GeoCollectionSimple" 
     
    2025  <five:implements 
    2126    class="Products.ATContentTypes.content.base.BaseContent" 
    22     interface=".interfaces.IItem
     27    interface=".interfaces.IGeoAnnotatableContent
    2328    /> 
    2429 
    2530  <five:implements 
    2631    class="Products.ATContentTypes.content.base.BaseContent" 
    27     interface=".interfaces.ICollection
     32    interface=".interfaces.IGeoFolder
    2833    /> 
     34 
     35  <five:implements 
     36    class="Products.ATContentTypes.content.folder.ATFolder" 
     37    interface=".interfaces.IGeoFolder" 
     38    /> 
     39 
     40  <five:implements 
     41    class="Products.ATContentTypes.content.topic.ATTopic" 
     42    interface=".interfaces.IGeoFolder" 
     43    /> 
     44 
     45  <!--  
     46    PleiadesGeocoder.interfaces.IGeoserializable and IGeoreferenceable are 
     47    markers for viewability through the @@geo view 
     48    --> 
    2949 
    3050  <five:implements 
     
    4060  <five:implements 
    4161    class="Products.ATContentTypes.content.folder.ATFolder" 
    42     interface=".interfaces.ICollection" 
    43     /> 
    44  
    45   <five:implements 
    46     class="Products.ATContentTypes.content.folder.ATFolder" 
    4762    interface=".interfaces.IGeoserializable" 
    48     /> 
    49  
    50   <five:implements 
    51     class="Products.ATContentTypes.content.topic.ATTopic" 
    52     interface=".interfaces.ICollection" 
    5363    /> 
    5464 
  • PleiadesGeocoder/trunk/geo.py

    r1189 r1218  
    3636from Products.ATContentTypes.interface.folder import IATFolder 
    3737 
    38 from Products.PleiadesGeocoder.interfaces \ 
    39     import IGeoreferenceable, IGeoserializable, \ 
    40         IGeoItemSimple, IGeoCollectionSimple, IGeoreferencedEvent 
     38from Products.PleiadesGeocoder.interfaces import IGeoItemSimple \ 
     39    , IGeoCollectionSimple, IGeoreferencedEvent 
    4140 
    4241 
  • PleiadesGeocoder/trunk/tests/Georeferencing.txt

    r1181 r1218  
    2929  'document' 
    3030  >>> document = folder.document 
    31  
     31  >>> from Products.PleiadesGeocoder.interfaces import IGeoAnnotatableContent 
     32  >>> IGeoAnnotatableContent.providedBy(document) 
     33  True 
    3234 
    3335Georeference via edit_geo 
     
    3739  >>> import simplejson 
    3840  >>> body = simplejson.dumps(gi) 
    39   >>> browser.open("%s/edit_geo?type=Point&coordinates=[-110,40]" % doc_url) 
     41  >>> browser.open("%s/@@edit_geo?type=Point&coordinates=[-110,40]" % doc_url) 
    4042  >>> item = IGeoItemSimple(document) 
    4143  >>> item.__geo_interface__ 
  • PleiadesGeocoder/trunk/tests/test_simple.py

    r1216 r1218  
    99from Products.ATContentTypes.content.document import ATDocument 
    1010 
    11 from Products.PleiadesGeocoder.interfaces
    12     import IGeoreferenceable, IGeoserializable \ 
    13         , IGeoItemSimple, IGeoCollectionSimple \ 
    14         , IItem, ICollection 
     11from Products.PleiadesGeocoder.interfaces import IGeoreferenceable
     12    , IGeoserializable , IGeoItemSimple, IGeoCollectionSimple \ 
     13    , IGeoAnnotatableContent, IGeoFolder 
     14 
    1515from Products.PleiadesGeocoder.geo import GeoItemSimple, GeoCollectionSimple 
    1616from Products.PleiadesGeocoder.utils import addSpatialMemberData 
     
    2828 
    2929    def testImplements(self): 
    30         self.failUnless(IItem.implementedBy(BaseContent)) 
    31         self.failUnless(IItem.implementedBy(ATDocument)) 
     30        self.failUnless(IGeoAnnotatableContent.implementedBy(BaseContent)) 
     31        self.failUnless(IGeoAnnotatableContent.implementedBy(ATDocument)) 
    3232         
    3333class DocumentTest(PloneTestCase.PloneTestCase): 
     
    4242 
    4343    def testInterfaces(self): 
    44         self.failUnless(IItem.providedBy(self.document)) 
    45         self.failUnless(ICollection.providedBy(self.document)) 
     44        self.failUnless(IGeoAnnotatableContent.providedBy(self.document)) 
     45        self.failUnless(IGeoFolder.providedBy(self.document)) 
    4646 
    4747    def testGeoreferenced(self): 
  • PleiadesGeocoder/trunk/tests/test_tool.py

    r1174 r1218  
    88PloneTestCase.setupPloneSite(products=['PleiadesGeocoder']) 
    99 
    10 from Products.PleiadesGeocoder.interfaces.simple import IGeoItemSimple 
     10from Products.PleiadesGeocoder.interfaces import IGeoItemSimple 
    1111from Products.PleiadesGeocoder import Geocoder 
    1212 
  • PleiadesGeocoder/trunk/version.txt

    r1216 r1218  
    1 1.0a
     11.0b