equal
deleted
inserted
replaced
62 # if self is composed of the target type, create mode |
62 # if self is composed of the target type, create mode |
63 mode = 'create' |
63 mode = 'create' |
64 else: |
64 else: |
65 # link mode by default |
65 # link mode by default |
66 mode = 'link' |
66 mode = 'link' |
67 cls.rmode.tag_relation(mode, (X, rschema, Y), role) |
67 cls.rmode.tag_relation(X, rschema, Y, mode, tagged=role) |
68 |
68 |
69 @classmethod |
69 @classmethod |
70 def relation_mode(cls, rtype, etype, targettype, role='subject'): |
70 def relation_mode(cls, rtype, etype, targettype, role='subject'): |
71 """return a string telling if the given relation is usually created |
71 """return a string telling if the given relation is usually created |
72 to a new entity ('create' mode) or to an existant entity ('link' mode) |
72 to a new entity ('create' mode) or to an existant entity ('link' mode) |