Commit fbfa7448 authored by Andy McKay's avatar Andy McKay

Add metadata and index object access from a given UID.

parent aa800392
......@@ -553,6 +553,16 @@ class ZCatalog(Folder, Persistent, Implicit):
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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment