Exemple #1
0
    def __getattr__(self, attr):
        type = DynamicRelationshipType.withName(attr)

        def create_relationship(node):
            rel = self._element.createRelationshipTo(node._element, type)
            return Relationship(rel)

        return create_relationship
Exemple #2
0
 def __relationship(self, direction, type):
     if type:
         type = DynamicRelationshipType.withName(type)
         iterator = self._node.getRelationships(direction, type)
         iterator = iterator.iterator()
     else:
         iterator = self._node.getRelationships(direction)
         iterator = iterator.iterator()
     return imap(Relationship, iterator)
 def __relationship(self, direction, type):
     if type:
         type = DynamicRelationshipType.withName(type)
         iterator = self._node.getRelationships(direction, type)
         iterator = iterator.iterator()
     else:
         iterator = self._node.getRelationships(direction)
         iterator = iterator.iterator()
     return imap(Relationship, iterator)
 def __getattr__(self, attr):
     type = DynamicRelationshipType.withName(attr)
     def create_relationship(node):
         rel = self._element.createRelationshipTo(node._element, type)
         return Relationship(rel)
     return create_relationship