suppress 'mapping attribute' stuff - should better be implemented by specialized predicates

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2839 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2008-08-23 08:00:51 +00:00
parent 9615d4a21a
commit 133b901996
3 changed files with 12 additions and 11 deletions

View file

@ -657,7 +657,8 @@ class IPredicate(IConceptSchema):
required=False)
class IMappingAttributeRelation(IConceptSchema):
# probably not useful
class xxIMappingAttributeRelation(IConceptSchema):
""" A relation based on a predicate ('mappingAttribute') that provides
values for an attribute name on a parent and a corresponding
identifiers on the the child objects that will be used as keys

View file

@ -31,7 +31,7 @@ from zope.security.proxy import removeSecurityProxy
from zope.traversing.api import getName
from loops.interfaces import ILoopsObject, IConcept, IResource
from loops.interfaces import IPredicate, IMappingAttributeRelation
from loops.interfaces import IPredicate #, IMappingAttributeRelation
from loops.concept import Concept
from loops.common import AdapterBase
from loops.type import TypeInterfaceSourceList
@ -59,11 +59,11 @@ class PredicateInterfaceSourceList(TypeInterfaceSourceList):
# standard relation adapters
PredicateInterfaceSourceList.typeInterfaces += (IMappingAttributeRelation,)
#PredicateInterfaceSourceList.typeInterfaces += (IMappingAttributeRelation,)
class MappingAttributeRelation(AdapterBase):
#class MappingAttributeRelation(AdapterBase):
implements(IMappingAttributeRelation)
#implements(IMappingAttributeRelation)
_contextAttributes = list(IMappingAttributeRelation)
#_contextAttributes = list(IMappingAttributeRelation)

View file

@ -54,7 +54,7 @@ from loops.interfaces import ILoopsObject, IIndexAttributes
from loops.interfaces import IDocument, IFile, ITextDocument
from loops.organize.memberinfo import MemberInfoProvider
from loops.organize.stateful.base import StatefulResourceIndexInfo, handleTransition
from loops.predicate import Predicate, MappingAttributeRelation
from loops.predicate import Predicate #, MappingAttributeRelation
from loops.query import QueryConcept
from loops.query import QueryConcept
from loops.resource import Resource, FileAdapter, TextDocumentAdapter
@ -95,9 +95,9 @@ class TestSite(object):
component.provideUtility(IntIdsStub())
relations = RelationRegistry()
relations.setupIndexes()
for idx in ('_attrName', '_attrIdentifier'):
if idx not in relations:
relations[idx] = FieldIndex(idx, IIndexableRelation)
#for idx in ('_attrName', '_attrIdentifier'):
# if idx not in relations:
# relations[idx] = FieldIndex(idx, IIndexableRelation)
component.provideUtility(relations, IRelationRegistry)
component.provideUtility(PrincipalAnnotationUtility(), IPrincipalAnnotationUtility)
@ -115,7 +115,7 @@ class TestSite(object):
component.provideAdapter(LoopsType)
component.provideAdapter(ConceptType)
component.provideAdapter(Predicate)
component.provideAdapter(MappingAttributeRelation)
#component.provideAdapter(MappingAttributeRelation)
component.provideAdapter(ResourceType, (IDocument,))
component.provideAdapter(TypeConcept)
component.provideAdapter(QueryConcept)