99#### Options ####
1010utcOffSetBounds = (- 12 , 12 )
1111NULL = "NULL"
12- NEW = "[New Qualifier ]"
12+ NEW = "[New Annotation ]"
1313
1414class CellEdit ():
1515 def __init__ (self , parent , serviceManager , recordService ):
@@ -18,21 +18,22 @@ def __init__(self, parent, serviceManager, recordService):
1818 self .serviceManager = serviceManager
1919 if self .serviceManager :
2020 self .series_service = self .serviceManager .get_series_service ()
21- self .qualifierChoices = OrderedDict ((x .code + ':' + x .description , x .id )
22- for x in self .series_service .get_all_qualifiers () if x .code and x .description )
23- self .qualifierCodeChoices = [NULL ] + self .qualifierChoices .keys () + [NEW ]
24-
21+ self .annotationChoices = self .fetch_annotations ()
22+ self .censorCodeChoices = self .fetchCensorCodeChoices ()
23+ self .qualityCodeChoices = self .fetchQualityCodeChoices ()
24+ self .timeAggregationInterval = - 1
25+ self .timeAggretaionUnitChoices = self .fetchTimeUnitChoices ()
2526 else :
2627 self .censorCodeChoices = [NULL ] + ['SampleCensorCode1' ] + ['SampleCensorCode2' ] + ['SampleCensorCode3' ]
2728 self .labSampleChoices = [NULL ] + ['SampleLabSample1' ] + ['SampleLabSample2' ] + ['SampleLabSample3' ]
2829 self .offSetTypeChoices = [NULL ] + ['SampleOffsetType1' ] + ['SampleOffsetType2' ] + ['SampleOffsetType3' ]
29- self .qualifierCodeChoices = [NULL ] + ['SampleQualifierCode1 ' ] + ['SampleQualifierCode2 ' ] + ['SampleQualifierCode3 ' ]
30+ self .annotationChoices = [NULL ] + ['SampleAnnotation1 ' ] + ['SampleAnnotation2 ' ] + ['SampleAnnotation3 ' ]
3031
31- self . qualityCodeChoices = self . fetchQualityCodeChoices ()
32- self . censorCodeChoices = self . fetchCensorCodeChoices ( )
33- self .timeAggregationInterval = - 1
34- self . timeAggretaionUnitChoices = self . fetchTimeUnitChoices ()
35- self . annotationChoices = [ NULL ]
32+ def fetch_annotations ( self ):
33+ qualifierChoices = OrderedDict (( x . AnnotationCode + ':' + x . AnnotationText , x . AnnotationID )
34+ for x in self .series_service . get_all_qualifiers () if x . AnnotationCode and x . AnnotationText )
35+ qualifierCodeChoices = [ NULL ] + qualifierChoices . keys () + [ NEW ]
36+ return qualifierCodeChoices
3637
3738 def fetchCensorCodeChoices (self ):
3839 if not self .serviceManager :
0 commit comments