Commit 84636182 authored by Amir Mohammadi's avatar Amir Mohammadi Committed by Pavel KORSHUNOV

convert annotation files to filesets too

parent 769aeb47
......@@ -190,5 +190,8 @@ class TestDatabase(PadDatabase):
fileset += [TestFile(dummy_test_list[1], 6)]
return fileset
def annotations(self, file):
return None
database = TestDatabase(original_directory=data_dir, original_extension='')
......@@ -56,4 +56,7 @@ class TestDatabaseSql (bob.pad.base.database.PadDatabase, bob.db.base.SQLiteData
def objects(self, groups=None, protocol=None, purposes=None, model_ids=None, **kwargs):
return list(self.query(TestFileSql))
def annotations(self, file):
return None
database = TestDatabaseSql()
\ No newline at end of file
......@@ -149,7 +149,11 @@ class FileSelector(object):
def annotation_list(self, groups=None):
"""Returns the list of annotations objects."""
return self.database.all_files(groups=groups)
files = self.database.all_files(groups=groups)
if len(files) != 2:
return files
else:
return files[0] + files[1]
def get_annotations(self, annotation_file):
"""Returns the annotations of the given file."""
......
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