# ~*~ coding: utf-8 import cElementTree from OFS.SimpleItem import SimpleItem from zope.interface import implements from Globals import Persistent, InitializeClass from zope.component import getUtility, queryUtility, queryAdapter from AccessControl import getSecurityManager from zope.component import getSiteManager from interfaces import IResource from interfaces import IWaramu, iMDPortal, ITranslator, IVocabulary from waramulib.Resource import Resource as BaseResource class Resource(BaseResource, Persistent, SimpleItem): """ resource """ meta_type = 'Resource' implements(IResource) def _getConnection(self): pr = getUtility(iMDPortal, context=self.context) w = getUtility(IWaramu, context=self.context).__of__(pr) return w InitializeClass(Resource)