equal
deleted
inserted
replaced
868 return 'view' |
868 return 'view' |
869 |
869 |
870 def source_defs(self): |
870 def source_defs(self): |
871 return self.repo.source_defs() |
871 return self.repo.source_defs() |
872 |
872 |
873 def describe(self, eid): |
873 def describe(self, eid, asdict=False): |
874 """return a tuple (type, sourceuri, extid) for the entity with id <eid>""" |
874 """return a tuple (type, sourceuri, extid) for the entity with id <eid>""" |
875 return self.repo.type_and_source_from_eid(eid, self) |
875 metas = self.repo.type_and_source_from_eid(eid, self) |
|
876 if asdict: |
|
877 return dict(zip(('type', 'source', 'extid', 'asource'), metas)) |
|
878 # XXX :-1 for cw compat, use asdict=True for full information |
|
879 return metas[:-1] |
876 |
880 |
877 # db-api like interface ################################################### |
881 # db-api like interface ################################################### |
878 |
882 |
879 def source_from_eid(self, eid): |
883 def source_from_eid(self, eid): |
880 """return the source where the entity with id <eid> is located""" |
884 """return the source where the entity with id <eid> is located""" |