Beispiel #1
0
    def dataset(self, args):
        assert len(args) in (1,2)
        namespace, name = args[0]
        dataset = DBDataset.get(self.DB, namespace, name)

        meta_expression = None if len(args) < 2 else args[1]
        condition = None if not meta_expression else self.meta_exp_to_sql(meta_expression)
        
        files = dataset.list_files(condition=condition, with_metadata=True)
        return files
Beispiel #2
0
 def dataset(self, args, meta, provenance=None):
     assert len(args) == 2
     dataset_name, meta_exp = args
     namespace, name = dataset_name.M
     dataset = DBDataset.get(self.DB, namespace, name)
     keep_meta = meta["keep_meta"]
     files = dataset.list_files(condition=meta_exp, 
         relationship="self" if provenance is None else provenance, 
         with_metadata=keep_meta)
     #print ("Evaluator.dataset: files:", files)
     assert isinstance(files, DBFileSet)
     return files
Beispiel #3
0
 def dataset(self, args, value, provenance=None):
     assert len(args) == 2
     dataset_name, meta_exp = args
     namespace, name = dataset_name.V
     dataset = DBDataset.get(self.DB, namespace, name)
     condition = None if meta_exp is None else self.meta_exp_to_sql(
         meta_exp)
     #print("dataset: condition:", condition)
     files = dataset.list_files(
         condition=condition,
         relationship="self" if provenance is None else provenance,
         with_metadata=True)
     #print ("Evaluator.dataset: files:", files)
     assert isinstance(files, DBFileSet)
     return files