Skip to content

Commit

Permalink
Add metadata and index object access from a given UID.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy McKay committed Aug 28, 2002
1 parent 4b97522 commit dddcb01
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ZCatalog.py
Expand Up @@ -553,6 +553,16 @@ def getobject(self, rid, REQUEST=None):
obj = self.resolve_url(self.getpath(rid), REQUEST)
return obj

def getMetadataForUID(self, uid):
"""return the correct metadata given the uid, usually the path"""
rid = self._catalog.uids[uid]
return self._catalog.getMetadataForRID(rid)

def getIndexDataForUID(self, uid):
"""return the current index contents given the uid, usually the path"""
rid = self._catalog.uids[uid]
return self._catalog.getIndexDataForRID(rid)

def getMetadataForRID(self, rid):
"""return the correct metadata for the cataloged record id"""
return self._catalog.getMetadataForRID(int(rid))
Expand Down

0 comments on commit dddcb01

Please sign in to comment.