source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19115_2006_metadata_corrigendum/content_information/md_imagedescription.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19115_2006_metadata_corrigendum/content_information/md_imagedescription.py@8457
Revision 8457, 2.8 KB checked in by mnagni, 7 years ago (diff)

Corrected an error in the generation of the classes "synchronize" method.

  • Property svn:mime-type set to text/plain
Line 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21from ea_model.iso_19115_2006_metadata_corrigendum.content_information.md_coveragedescription import  MD_CoverageDescription
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:10
26
27@author: mnagni
28'''
29
30class MD_ImageDescription(MD_CoverageDescription):
31        '''
32                Represents a data entity defined in a UML diagram and supposed to
33                be persisted in a relational database.
34 
35                This class has been genererated automatically using the Apache Velocity project.
36        '''
37        '''
38                Please note that any access to the inner attributes should be done using
39                the given get/set methods and NOT accessing them directly.
40        '''
41        def __init__(self):
42                self._md_coveragedescription = MD_CoverageDescription()         
43
44                self.cloudCoverPercentage = None
45                self.triangulationIndicator = None
46                self.imageQualityCode = None
47                self.contentType = None
48                self.processingLevelCode = None
49                self.lensDistortionInformationAvailability = None
50                self.illuminationAzimuthAngle = None
51                self.compressionGenerationQuantity = None
52                self.attributeDescription = None
53                self.imagingCondition = None
54                self.radiometricCalibrationDataAvailability = None
55                self.filmDistortionInformationAvailability = None
56                self.illuminationElevationAngle = None
57                self.cameraCalibrationInformationAvailability = None
58                super(MD_ImageDescription, self).__init__()
59        @property
60        def dimension(self):   
61                return self._md_coveragedescription.dimension
62
63        @dimension.setter
64        def dimension(self, value):     
65                        self._md_coveragedescription.dimension = value
66        @property
67        def contentType(self): 
68                return self._md_coveragedescription.contentType
69
70        @contentType.setter
71        def contentType(self, value):   
72                        self._md_coveragedescription.contentType = value
73        @property
74        def attributeDescription(self):
75                return self._md_coveragedescription.attributeDescription
76
77        @attributeDescription.setter
78        def attributeDescription(self, value): 
79                        self._md_coveragedescription.attributeDescription = value
80
81        def synchronize(self):
82                pass
83
84        def __key(self):
85                return (self.cloudCoverPercentage, self.dimension, self.triangulationIndicator, self.imageQualityCode, self.contentType, self.processingLevelCode, self.lensDistortionInformationAvailability, self.illuminationAzimuthAngle, self.compressionGenerationQuantity, self.attributeDescription, self.imagingCondition, self.radiometricCalibrationDataAvailability, self.filmDistortionInformationAvailability, self.illuminationElevationAngle, self.cameraCalibrationInformationAvailability)
86
87        def __eq__(self, y):
88                if type(self) != type(y):
89                        return False
90                '''
91                Cannot compare classes which do not define a "__key" attribute
92                '''
93                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
94                        return self.__key() == y.__key()
95                return id(self) == id(y)
96
97        def __hash__(self):
98                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.