<?xml version="1.0"?>
<configure
  xmlns="http://namespaces.zope.org/zope"
  xmlns:five="http://namespaces.zope.org/five"
  xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
  xmlns:browser="http://namespaces.zope.org/browser"
  i18n_domain="collective.geo.geographer" >

  <includeDependencies package="." />
  <include package="zope.security"/>


  <adapter
    factory=".geo.GeoreferencingAnnotator"
    provides=".interfaces.IWriteGeoreferenced"
    trusted="true"
    />


  <class class=".geo.GeoreferencingAnnotator">
    <require
      permission="zope.View"
      interface=".interfaces.IGeoreferenced"
      />
    <require
      permission="zope.ManageContent"
      interface=".interfaces.IWritableGeoreference"
      />
  </class>


  <adapter
    factory='.zgeo_geometry_value'
    name='zgeo_geometry' />


  <adapter
    factory='.geocoder.GeoCoder'
    provides=".interfaces.IGeoCoder"
    for= '*'/>


  <utility
    provides=".interfaces.IGeoCoder"
    factory=".geocoder.get_geocoder"
    />


  <browser:page
    name="geoview"
    for="*"
    class=".geoview.GeoView"
    permission="zope2.View"
    allowed_attributes="isGeoreferenceable"
  />


  <browser:page
    name="geocoderview"
    for="Products.CMFPlone.interfaces.IPloneSiteRoot"
    class=".geocoder.GeoCoderView"
    permission="zope2.View"
  />


  <genericsetup:registerProfile
    name="default"
    title="Collective Geo Geographer"
    directory="profiles/default"
    description="Geographic annotation for Plone"
    provides="Products.GenericSetup.interfaces.EXTENSION"
  />

</configure>
