server/sources/__init__.py
branch3.5
changeset 3041 782fa7566a22
parent 3040 e4dc22040f5f
child 3633 2d81178bea5f
child 3647 2941f4a0aab9
equal deleted inserted replaced
3040:e4dc22040f5f 3041:782fa7566a22
   179             else:
   179             else:
   180                 return False
   180                 return False
   181         if write:
   181         if write:
   182             return wsupport
   182             return wsupport
   183         return True
   183         return True
       
   184 
       
   185     def may_cross_relation(self, rtype):
       
   186         """return True if the relation may be crossed among sources. Rules are:
       
   187 
       
   188         * if this source support the relation, can't be crossed unless explicitly
       
   189           specified in .cross_relations
       
   190 
       
   191         * if this source doesn't support the relation, can be crossed unless
       
   192           explicitly specified in .dont_cross_relations
       
   193         """
       
   194         if self.support_relation(rtype):
       
   195             return rtype in self.cross_relations
       
   196         return rtype not in self.dont_cross_relations
   184 
   197 
   185     def eid2extid(self, eid, session=None):
   198     def eid2extid(self, eid, session=None):
   186         return self.repo.eid2extid(self, eid, session)
   199         return self.repo.eid2extid(self, eid, session)
   187 
   200 
   188     def extid2eid(self, value, etype, session=None, **kwargs):
   201     def extid2eid(self, value, etype, session=None, **kwargs):