40 keys.remove((rtype, tagged, '*', otype)) |
40 keys.remove((rtype, tagged, '*', otype)) |
41 if otype == '*': |
41 if otype == '*': |
42 keys.remove((rtype, tagged, stype, '*')) |
42 keys.remove((rtype, tagged, stype, '*')) |
43 return keys |
43 return keys |
44 |
44 |
|
45 def tag_attribute(self, tag, stype, attr): |
|
46 self._tagdefs[(str(attr), 'subject', str(stype), '*')] = tag |
|
47 |
45 def tag_relation(self, tag, relation, tagged): |
48 def tag_relation(self, tag, relation, tagged): |
46 assert tagged in ('subject', 'object'), tagged |
49 assert tagged in ('subject', 'object'), tagged |
47 stype, rtype, otype = relation |
50 stype, rtype, otype = relation |
48 self._tagdefs[(str(rtype), tagged, str(stype), str(otype))] = tag |
51 self._tagdefs[(str(rtype), tagged, str(stype), str(otype))] = tag |
49 |
52 |