diff --git a/interfaces.py b/interfaces.py index 7c834f2..dc644db 100644 --- a/interfaces.py +++ b/interfaces.py @@ -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 diff --git a/predicate.py b/predicate.py index a5189aa..79cf138 100644 --- a/predicate.py +++ b/predicate.py @@ -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) diff --git a/tests/setup.py b/tests/setup.py index 765b522..2102d1d 100644 --- a/tests/setup.py +++ b/tests/setup.py @@ -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)