From ffd8843605001babfd3992ccf0368685525d26e6 Mon Sep 17 00:00:00 2001
From: Tiago Freitas Pereira <tiagofrepereira@gmail.com>
Date: Sat, 12 May 2018 15:43:31 +0200
Subject: [PATCH] Exposing the method groups in our FileDatabase API

---
 bob/bio/base/database/database.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/bob/bio/base/database/database.py b/bob/bio/base/database/database.py
index 97d73e47..4867bd43 100644
--- a/bob/bio/base/database/database.py
+++ b/bob/bio/base/database/database.py
@@ -293,6 +293,20 @@ class BioDatabase(six.with_metaclass(abc.ABCMeta, bob.db.base.FileDatabase)):
         """
         raise NotImplementedError("Please implement this function in derived classes")
 
+
+    def groups(self):
+        """
+        Returns the names of all registered groups in the database
+
+        Keyword parameters:
+
+        protocol: str
+          The protocol for which the groups should be retrieved.
+          If you do not have protocols defined, just ignore this field. 
+        """
+        raise NotImplementedError("This function must be implemented in your derived class.")
+
+
     @abc.abstractmethod
     def objects(self, groups=None, protocol=None, purposes=None, model_ids=None, **kwargs):
         """This function returns a list of :py:class:`bob.bio.base.database.BioFile` objects or the list
-- 
GitLab