Package Ganga :: Package GPIDev :: Package Lib :: Package Dataset :: Module Dataset'
[hide private]
[frames] | no frames]

Source Code for Module Ganga.GPIDev.Lib.Dataset.Dataset'

 1  from Ganga.GPIDev.Base import GangaObject 
 2  from Ganga.GPIDev.Schema import * 
 3   
 4  # Dataset class represents the empty dataset and is a base class for specific, non-empty datasets. 
 5  # 
 6  # Derived dataset classes may be freely defined and may be either specific to applications or more generic. 
 7  # The schema and internal interface is a convention between the dataset provider and the application provider. 
 8  # 
 9  # Applications are encouraged to test and handle empty datasets with the isEmpty() method. 
10   
11 -class Dataset(GangaObject):
12 _schema = Schema(Version(1,0), {}) 13 _category = 'datasets' 14 _name = "EmptyDataset" 15
16 - def __init__(self):
17 super(Dataset, self).__init__()
18 19 # Return true if the dataset is an instance of the default base class. 20 # You may override it in your dataset definition but it is not mandatory.
21 - def isEmpty(self):
22 return self._name == Dataset._name
23 24 # 25 # 26 # 27 # $Log: not supported by cvs2svn $ 28 # Revision 1.2 2005/08/10 14:35:57 andrew 29 # Bugfix, wrong object used in return statement 30 # 31 # 32 # 33