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:
parent
9615d4a21a
commit
133b901996
3 changed files with 12 additions and 11 deletions
|
@ -657,7 +657,8 @@ class IPredicate(IConceptSchema):
|
||||||
required=False)
|
required=False)
|
||||||
|
|
||||||
|
|
||||||
class IMappingAttributeRelation(IConceptSchema):
|
# probably not useful
|
||||||
|
class xxIMappingAttributeRelation(IConceptSchema):
|
||||||
""" A relation based on a predicate ('mappingAttribute') that provides
|
""" A relation based on a predicate ('mappingAttribute') that provides
|
||||||
values for an attribute name on a parent and a corresponding
|
values for an attribute name on a parent and a corresponding
|
||||||
identifiers on the the child objects that will be used as keys
|
identifiers on the the child objects that will be used as keys
|
||||||
|
|
10
predicate.py
10
predicate.py
|
@ -31,7 +31,7 @@ from zope.security.proxy import removeSecurityProxy
|
||||||
from zope.traversing.api import getName
|
from zope.traversing.api import getName
|
||||||
|
|
||||||
from loops.interfaces import ILoopsObject, IConcept, IResource
|
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.concept import Concept
|
||||||
from loops.common import AdapterBase
|
from loops.common import AdapterBase
|
||||||
from loops.type import TypeInterfaceSourceList
|
from loops.type import TypeInterfaceSourceList
|
||||||
|
@ -59,11 +59,11 @@ class PredicateInterfaceSourceList(TypeInterfaceSourceList):
|
||||||
|
|
||||||
# standard relation adapters
|
# 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)
|
||||||
|
|
|
@ -54,7 +54,7 @@ from loops.interfaces import ILoopsObject, IIndexAttributes
|
||||||
from loops.interfaces import IDocument, IFile, ITextDocument
|
from loops.interfaces import IDocument, IFile, ITextDocument
|
||||||
from loops.organize.memberinfo import MemberInfoProvider
|
from loops.organize.memberinfo import MemberInfoProvider
|
||||||
from loops.organize.stateful.base import StatefulResourceIndexInfo, handleTransition
|
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.query import QueryConcept
|
from loops.query import QueryConcept
|
||||||
from loops.resource import Resource, FileAdapter, TextDocumentAdapter
|
from loops.resource import Resource, FileAdapter, TextDocumentAdapter
|
||||||
|
@ -95,9 +95,9 @@ class TestSite(object):
|
||||||
component.provideUtility(IntIdsStub())
|
component.provideUtility(IntIdsStub())
|
||||||
relations = RelationRegistry()
|
relations = RelationRegistry()
|
||||||
relations.setupIndexes()
|
relations.setupIndexes()
|
||||||
for idx in ('_attrName', '_attrIdentifier'):
|
#for idx in ('_attrName', '_attrIdentifier'):
|
||||||
if idx not in relations:
|
# if idx not in relations:
|
||||||
relations[idx] = FieldIndex(idx, IIndexableRelation)
|
# relations[idx] = FieldIndex(idx, IIndexableRelation)
|
||||||
component.provideUtility(relations, IRelationRegistry)
|
component.provideUtility(relations, IRelationRegistry)
|
||||||
|
|
||||||
component.provideUtility(PrincipalAnnotationUtility(), IPrincipalAnnotationUtility)
|
component.provideUtility(PrincipalAnnotationUtility(), IPrincipalAnnotationUtility)
|
||||||
|
@ -115,7 +115,7 @@ class TestSite(object):
|
||||||
component.provideAdapter(LoopsType)
|
component.provideAdapter(LoopsType)
|
||||||
component.provideAdapter(ConceptType)
|
component.provideAdapter(ConceptType)
|
||||||
component.provideAdapter(Predicate)
|
component.provideAdapter(Predicate)
|
||||||
component.provideAdapter(MappingAttributeRelation)
|
#component.provideAdapter(MappingAttributeRelation)
|
||||||
component.provideAdapter(ResourceType, (IDocument,))
|
component.provideAdapter(ResourceType, (IDocument,))
|
||||||
component.provideAdapter(TypeConcept)
|
component.provideAdapter(TypeConcept)
|
||||||
component.provideAdapter(QueryConcept)
|
component.provideAdapter(QueryConcept)
|
||||||
|
|
Loading…
Add table
Reference in a new issue