[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog - ZCatalog.py:1.121

Andy andy@agmweb.ca
Wed, 28 Aug 2002 13:07:24 -0400


Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv4279

Modified Files:
	ZCatalog.py 
Log Message:
Add metadata and index object access from a given UID.


=== Zope/lib/python/Products/ZCatalog/ZCatalog.py 1.120 => 1.121 ===
--- Zope/lib/python/Products/ZCatalog/ZCatalog.py:1.120	Thu Aug 15 09:10:16 2002
+++ Zope/lib/python/Products/ZCatalog/ZCatalog.py	Wed Aug 28 13:07:24 2002
@@ -553,6 +553,16 @@
             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))