Ignore:
Timestamp:
13/03/12 13:32:01 (8 years ago)
Author:
mnagni
Message:

This new DB library adds better hash algorithm and a bug fix for the classes eq method

Location:
mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_additioninformation.py

    r8091 r8160  
    2020 
    2121from ea_model.iso_19135_2005_procedures_for_registration.re_proposalmanagementinformation import  RE_ProposalManagementInformation  
    22 from ascore.utils import has_value 
     22from ascore.utils import has_value, collectionProofHash 
    2323 
    2424''' 
    25 Created on 16-Feb-2012 16:18:09 
     25Created on 13-Mar-2012 11:08:14 
    2626 
    2727@author: mnagni 
     
    4848        self._item_cl_classificationlegenditem = None 
    4949        self._item_re_subregisterdescription = None 
    50         self.disposition = None 
    5150        self.dateDisposed = None 
    5251        self.sponsor = None 
     52        self.disposition = None 
     53        self.status = None 
    5354        self.dateProposed = None 
    54         self.status = None 
    5555        self.registerManagerNotes = None 
    5656        self.controlBodyDecisionEvent = None 
     
    115115 
    116116    @property 
    117     def disposition(self):       
    118         return self._re_proposalmanagementinformation.disposition 
    119  
    120     @disposition.setter 
    121     def disposition(self, value):        
    122             self._re_proposalmanagementinformation.disposition = value 
    123  
    124     @property 
    125117    def dateDisposed(self):      
    126118        return self._re_proposalmanagementinformation.dateDisposed 
     
    139131 
    140132    @property 
    141     def dateProposed(self):      
    142         return self._re_proposalmanagementinformation.dateProposed 
     133    def disposition(self):       
     134        return self._re_proposalmanagementinformation.disposition 
    143135 
    144     @dateProposed.setter 
    145     def dateProposed(self, value):       
    146             self._re_proposalmanagementinformation.dateProposed = value 
     136    @disposition.setter 
     137    def disposition(self, value):        
     138            self._re_proposalmanagementinformation.disposition = value 
    147139 
    148140    @property 
     
    153145    def status(self, value):     
    154146            self._re_proposalmanagementinformation.status = value 
     147 
     148    @property 
     149    def dateProposed(self):      
     150        return self._re_proposalmanagementinformation.dateProposed 
     151 
     152    @dateProposed.setter 
     153    def dateProposed(self, value):       
     154            self._re_proposalmanagementinformation.dateProposed = value 
    155155 
    156156    @property 
     
    179179 
    180180    def __key(self): 
    181         return (self.controlBodyNotes, self.item, self.disposition, self.dateDisposed, self.sponsor, self.dateProposed, self.status, self.registerManagerNotes, self.controlBodyDecisionEvent, self.justification) 
     181        return (self.controlBodyNotes, self.item, self.dateDisposed, self.sponsor, self.disposition, self.status, self.dateProposed, self.registerManagerNotes, self.controlBodyDecisionEvent, self.justification) 
    182182 
    183183    def __eq__(self, y): 
     184        if type(self) != type(y): 
     185            return False 
    184186        ''' 
    185187        Cannot compare classes which do not define a "__key" attribute  
     
    190192 
    191193    def __hash__(self): 
    192         return hash(self.__key()) 
     194        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_alternativeexpression.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:08 
     24Created on 13-Mar-2012 11:08:08 
    2525 
    2626@author: mnagni 
     
    5050 
    5151    def __eq__(self, y): 
     52        if type(self) != type(y): 
     53            return False 
    5254        ''' 
    5355        Cannot compare classes which do not define a "__key" attribute  
     
    5860 
    5961    def __hash__(self): 
    60         return hash(self.__key()) 
     62        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_alternativename.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:06 
     24Created on 13-Mar-2012 11:08:08 
    2525 
    2626@author: mnagni 
     
    4848 
    4949    def __eq__(self, y): 
     50        if type(self) != type(y): 
     51            return False 
    5052        ''' 
    5153        Cannot compare classes which do not define a "__key" attribute  
     
    5658 
    5759    def __hash__(self): 
    58         return hash(self.__key()) 
     60        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_amendmentinformation.py

    r8091 r8160  
    2020 
    2121from ea_model.iso_19135_2005_procedures_for_registration.re_proposalmanagementinformation import  RE_ProposalManagementInformation  
    22 from ascore.utils import has_value 
     22from ascore.utils import has_value, collectionProofHash 
    2323 
    2424''' 
    25 Created on 16-Feb-2012 16:18:06 
     25Created on 13-Mar-2012 11:08:08 
    2626 
    2727@author: mnagni 
     
    4343 
    4444        self.controlBodyNotes = None 
     45        self.amendmentType = None 
    4546        self._item_cl_classificationlegenditem = None 
    4647        self._item_cl_classificationruleitem = None 
     
    4849        self._item_cl_classificationlegenditem = None 
    4950        self._item_re_subregisterdescription = None 
    50         self.amendmentType = None 
    51         self.disposition = None 
    5251        self.dateDisposed = None 
    5352        self.sponsor = None 
     53        self.disposition = None 
     54        self.status = None 
    5455        self.dateProposed = None 
    55         self.status = None 
    5656        self.registerManagerNotes = None 
    5757        self.controlBodyDecisionEvent = None 
     
    116116 
    117117    @property 
    118     def disposition(self):       
    119         return self._re_proposalmanagementinformation.disposition 
    120  
    121     @disposition.setter 
    122     def disposition(self, value):        
    123             self._re_proposalmanagementinformation.disposition = value 
    124  
    125     @property 
    126118    def dateDisposed(self):      
    127119        return self._re_proposalmanagementinformation.dateDisposed 
     
    140132 
    141133    @property 
    142     def dateProposed(self):      
    143         return self._re_proposalmanagementinformation.dateProposed 
     134    def disposition(self):       
     135        return self._re_proposalmanagementinformation.disposition 
    144136 
    145     @dateProposed.setter 
    146     def dateProposed(self, value):       
    147             self._re_proposalmanagementinformation.dateProposed = value 
     137    @disposition.setter 
     138    def disposition(self, value):        
     139            self._re_proposalmanagementinformation.disposition = value 
    148140 
    149141    @property 
     
    154146    def status(self, value):     
    155147            self._re_proposalmanagementinformation.status = value 
     148 
     149    @property 
     150    def dateProposed(self):      
     151        return self._re_proposalmanagementinformation.dateProposed 
     152 
     153    @dateProposed.setter 
     154    def dateProposed(self, value):       
     155            self._re_proposalmanagementinformation.dateProposed = value 
    156156 
    157157    @property 
     
    180180 
    181181    def __key(self): 
    182         return (self.controlBodyNotes, self.item, self.amendmentType, self.disposition, self.dateDisposed, self.sponsor, self.dateProposed, self.status, self.registerManagerNotes, self.controlBodyDecisionEvent, self.justification) 
     182        return (self.controlBodyNotes, self.amendmentType, self.item, self.dateDisposed, self.sponsor, self.disposition, self.status, self.dateProposed, self.registerManagerNotes, self.controlBodyDecisionEvent, self.justification) 
    183183 
    184184    def __eq__(self, y): 
     185        if type(self) != type(y): 
     186            return False 
    185187        ''' 
    186188        Cannot compare classes which do not define a "__key" attribute  
     
    191193 
    192194    def __hash__(self): 
    193         return hash(self.__key()) 
     195        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_amendmenttype.py

    r8091 r8160  
    2020 
    2121from ascore.asenumeration import  ASEnumeration  
    22 from ascore.utils import has_value 
     22from ascore.utils import has_value, collectionProofHash 
    2323 
    2424''' 
    25 Created on 16-Feb-2012 16:18:01 
     25Created on 13-Mar-2012 11:08:04 
    2626 
    2727@author: mnagni 
     
    3535        This class has been genererated automatically using the Apache Velocity project. 
    3636    ''' 
     37    en_retirement = "retirement"  
    3738    en_supersession = "supersession"  
    38     en_retirement = "retirement"  
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_clarificationinformation.py

    r8091 r8160  
    2020 
    2121from ea_model.iso_19135_2005_procedures_for_registration.re_proposalmanagementinformation import  RE_ProposalManagementInformation  
    22 from ascore.utils import has_value 
     22from ascore.utils import has_value, collectionProofHash 
    2323 
    2424''' 
    25 Created on 16-Feb-2012 16:18:03 
     25Created on 13-Mar-2012 11:08:10 
    2626 
    2727@author: mnagni 
     
    4848        self._item_cl_classificationlegenditem = None 
    4949        self._item_re_subregisterdescription = None 
    50         self.disposition = None 
    5150        self.dateDisposed = None 
    5251        self.sponsor = None 
     52        self.disposition = None 
     53        self.status = None 
    5354        self.dateProposed = None 
    54         self.status = None 
    5555        self.proposedChange = None 
    5656        self.registerManagerNotes = None 
     
    116116 
    117117    @property 
    118     def disposition(self):       
    119         return self._re_proposalmanagementinformation.disposition 
    120  
    121     @disposition.setter 
    122     def disposition(self, value):        
    123             self._re_proposalmanagementinformation.disposition = value 
    124  
    125     @property 
    126118    def dateDisposed(self):      
    127119        return self._re_proposalmanagementinformation.dateDisposed 
     
    140132 
    141133    @property 
    142     def dateProposed(self):      
    143         return self._re_proposalmanagementinformation.dateProposed 
     134    def disposition(self):       
     135        return self._re_proposalmanagementinformation.disposition 
    144136 
    145     @dateProposed.setter 
    146     def dateProposed(self, value):       
    147             self._re_proposalmanagementinformation.dateProposed = value 
     137    @disposition.setter 
     138    def disposition(self, value):        
     139            self._re_proposalmanagementinformation.disposition = value 
    148140 
    149141    @property 
     
    154146    def status(self, value):     
    155147            self._re_proposalmanagementinformation.status = value 
     148 
     149    @property 
     150    def dateProposed(self):      
     151        return self._re_proposalmanagementinformation.dateProposed 
     152 
     153    @dateProposed.setter 
     154    def dateProposed(self, value):       
     155            self._re_proposalmanagementinformation.dateProposed = value 
    156156 
    157157    @property 
     
    180180 
    181181    def __key(self): 
    182         return (self.controlBodyNotes, self.item, self.disposition, self.dateDisposed, self.sponsor, self.dateProposed, self.status, self.proposedChange, self.registerManagerNotes, self.controlBodyDecisionEvent, self.justification) 
     182        return (self.controlBodyNotes, self.item, self.dateDisposed, self.sponsor, self.disposition, self.status, self.dateProposed, self.proposedChange, self.registerManagerNotes, self.controlBodyDecisionEvent, self.justification) 
    183183 
    184184    def __eq__(self, y): 
     185        if type(self) != type(y): 
     186            return False 
    185187        ''' 
    186188        Cannot compare classes which do not define a "__key" attribute  
     
    191193 
    192194    def __hash__(self): 
    193         return hash(self.__key()) 
     195        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_decisionstatus.py

    r8091 r8160  
    2020 
    2121from ascore.asenumeration import  ASEnumeration  
    22 from ascore.utils import has_value 
     22from ascore.utils import has_value, collectionProofHash 
    2323 
    2424''' 
    25 Created on 16-Feb-2012 16:18:11 
     25Created on 13-Mar-2012 11:08:09 
    2626 
    2727@author: mnagni 
     
    3535        This class has been genererated automatically using the Apache Velocity project. 
    3636    ''' 
     37    en_final = "final"  
    3738    en_pending = "pending"  
    3839    en_tentative = "tentative"  
    39     en_final = "final"  
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_disposition.py

    r8091 r8160  
    2020 
    2121from ascore.asenumeration import  ASEnumeration  
    22 from ascore.utils import has_value 
     22from ascore.utils import has_value, collectionProofHash 
    2323 
    2424''' 
    25 Created on 16-Feb-2012 16:18:08 
     25Created on 13-Mar-2012 11:08:13 
    2626 
    2727@author: mnagni 
     
    3535        This class has been genererated automatically using the Apache Velocity project. 
    3636    ''' 
     37    en_notaccepted = "notAccepted"  
    3738    en_accepted = "accepted"  
    3839    en_withdrawn = "withdrawn"  
    39     en_notaccepted = "notAccepted"  
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_fieldofapplication.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:05 
     24Created on 13-Mar-2012 11:08:10 
    2525 
    2626@author: mnagni 
     
    4848 
    4949    def __eq__(self, y): 
     50        if type(self) != type(y): 
     51            return False 
    5052        ''' 
    5153        Cannot compare classes which do not define a "__key" attribute  
     
    5658 
    5759    def __hash__(self): 
    58         return hash(self.__key()) 
     60        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_itemclass.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:02 
     24Created on 13-Mar-2012 11:08:13 
    2525 
    2626@author: mnagni 
     
    4444        self._register_cl_classificationregister = [] 
    4545        self._register_cl_classificationregister = [] 
     46        self.technicalStandard = None 
    4647        self._describedItem_cl_classificationlegenditem = [] 
    4748        self._describedItem_cl_classificationruleitem = [] 
     
    4950        self._describedItem_cl_classificationlegenditem = [] 
    5051        self._describedItem_re_subregisterdescription = [] 
    51         self.technicalStandard = None 
    5252        self.subregister = [] 
    5353        super(RE_ItemClass, self).__init__() 
     
    118118 
    119119    def __key(self): 
    120         return (self.name, self.alternativeName, self.register, self.describedItem, self.technicalStandard, self.subregister) 
     120        return (self.name, self.alternativeName, self.register, self.technicalStandard, self.describedItem, self.subregister) 
    121121 
    122122    def __eq__(self, y): 
     123        if type(self) != type(y): 
     124            return False 
    123125        ''' 
    124126        Cannot compare classes which do not define a "__key" attribute  
     
    129131 
    130132    def __hash__(self): 
    131         return hash(self.__key()) 
     133        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_itemstatus.py

    r8091 r8160  
    2020 
    2121from ascore.asenumeration import  ASEnumeration  
    22 from ascore.utils import has_value 
     22from ascore.utils import has_value, collectionProofHash 
    2323 
    2424''' 
    25 Created on 16-Feb-2012 16:18:10 
     25Created on 13-Mar-2012 11:08:06 
    2626 
    2727@author: mnagni 
     
    3636    ''' 
    3737    en_valid = "valid"  
     38    en_retired = "retired"  
     39    en_superseded = "superseded"  
    3840    en_notvalid = "notValid"  
    39     en_superseded = "superseded"  
    40     en_retired = "retired"  
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_locale.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:04 
     24Created on 13-Mar-2012 11:08:13 
    2525 
    2626@author: mnagni 
     
    4242        self.name = [] 
    4343        self.characterEncoding = None 
     44        self.expression = [] 
    4445        self.language = None 
    45         self.expression = [] 
    4646        self.country = None 
    4747        self.citation = None 
     
    4949 
    5050    def __key(self): 
    51         return (self.name, self.characterEncoding, self.language, self.expression, self.country, self.citation) 
     51        return (self.name, self.characterEncoding, self.expression, self.language, self.country, self.citation) 
    5252 
    5353    def __eq__(self, y): 
     54        if type(self) != type(y): 
     55            return False 
    5456        ''' 
    5557        Cannot compare classes which do not define a "__key" attribute  
     
    6062 
    6163    def __hash__(self): 
    62         return hash(self.__key()) 
     64        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_proposalmanagementinformation.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:09 
     24Created on 13-Mar-2012 11:08:09 
    2525 
    2626@author: mnagni 
     
    4141 
    4242        self.controlBodyNotes = None 
    43         self.disposition = None 
    4443        self.dateDisposed = None 
    4544        self.sponsor = None 
     45        self.disposition = None 
    4646        self.status = None 
    4747        self.dateProposed = None 
     
    5252 
    5353    def __key(self): 
    54         return (self.controlBodyNotes, self.disposition, self.dateDisposed, self.sponsor, self.status, self.dateProposed, self.registerManagerNotes, self.controlBodyDecisionEvent, self.justification) 
     54        return (self.controlBodyNotes, self.dateDisposed, self.sponsor, self.disposition, self.status, self.dateProposed, self.registerManagerNotes, self.controlBodyDecisionEvent, self.justification) 
    5555 
    5656    def __eq__(self, y): 
     57        if type(self) != type(y): 
     58            return False 
    5759        ''' 
    5860        Cannot compare classes which do not define a "__key" attribute  
     
    6365 
    6466    def __hash__(self): 
    65         return hash(self.__key()) 
     67        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_reference.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:06 
     24Created on 13-Mar-2012 11:08:08 
    2525 
    2626@author: mnagni 
     
    150150 
    151151    def __eq__(self, y): 
     152        if type(self) != type(y): 
     153            return False 
    152154        ''' 
    153155        Cannot compare classes which do not define a "__key" attribute  
     
    158160 
    159161    def __hash__(self): 
    160         return hash(self.__key()) 
     162        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_referencesource.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:07 
     24Created on 13-Mar-2012 11:08:14 
    2525 
    2626@author: mnagni 
     
    7373 
    7474    def __eq__(self, y): 
     75        if type(self) != type(y): 
     76            return False 
    7577        ''' 
    7678        Cannot compare classes which do not define a "__key" attribute  
     
    8183 
    8284    def __hash__(self): 
    83         return hash(self.__key()) 
     85        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_register.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:04 
     24Created on 13-Mar-2012 11:08:08 
    2525 
    2626@author: mnagni 
     
    4141 
    4242        self.owner = None 
     43        self.manager = None 
    4344        self.version = None 
    44         self.manager = None 
    4545        self._containedItemClass_cl_classificationlegendclass = [] 
    4646        self._containedItemClass_cl_classificationruleclass = [] 
     
    139139 
    140140    def __key(self): 
    141         return (self.owner, self.version, self.manager, self.containedItemClass, self.dateOfLastChange, self.contentSummary, self.citation, self.submitter, self.name, self.uniformResourceIdentifier, self.alternativeLanguages, self.operatingLanguage, self.containedItem) 
     141        return (self.owner, self.manager, self.version, self.containedItemClass, self.dateOfLastChange, self.contentSummary, self.citation, self.submitter, self.name, self.uniformResourceIdentifier, self.alternativeLanguages, self.operatingLanguage, self.containedItem) 
    142142 
    143143    def __eq__(self, y): 
     144        if type(self) != type(y): 
     145            return False 
    144146        ''' 
    145147        Cannot compare classes which do not define a "__key" attribute  
     
    150152 
    151153    def __hash__(self): 
    152         return hash(self.__key()) 
     154        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_registeritem.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:08 
     24Created on 13-Mar-2012 11:08:07 
    2525 
    2626@author: mnagni 
     
    5757        self.itemIdentifier = None 
    5858        self.fieldOfApplication = [] 
     59        self.definition = None 
    5960        self._successor_cl_classificationlegenditem = [] 
    6061        self._successor_cl_classificationruleitem = [] 
     
    6263        self._successor_cl_classificationlegenditem = [] 
    6364        self._successor_re_subregisterdescription = [] 
    64         self.definition = None 
    6565        self.amendmentInformation = [] 
    6666        self.name = None 
    6767        self.status = None 
    6868        self.description = None 
     69        self.specificationSource = None 
    6970        self.dateAccepted = None 
    70         self.specificationSource = None 
    7171        self.clarificationInformation = [] 
    7272        super(RE_RegisterItem, self).__init__() 
     
    214214 
    215215    def __key(self): 
    216         return (self.alternativeExpressions, self.additionInformation, self.itemClass, self.register, self.dateAmended, self.specificationLineage, self.predecessor, self.itemIdentifier, self.fieldOfApplication, self.successor, self.definition, self.amendmentInformation, self.name, self.status, self.description, self.dateAccepted, self.specificationSource, self.clarificationInformation) 
     216        return (self.alternativeExpressions, self.additionInformation, self.itemClass, self.register, self.dateAmended, self.specificationLineage, self.predecessor, self.itemIdentifier, self.fieldOfApplication, self.definition, self.successor, self.amendmentInformation, self.name, self.status, self.description, self.specificationSource, self.dateAccepted, self.clarificationInformation) 
    217217 
    218218    def __eq__(self, y): 
     219        if type(self) != type(y): 
     220            return False 
    219221        ''' 
    220222        Cannot compare classes which do not define a "__key" attribute  
     
    225227 
    226228    def __hash__(self): 
    227         return hash(self.__key()) 
     229        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_registermanager.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:07 
     24Created on 13-Mar-2012 11:08:09 
    2525 
    2626@author: mnagni 
     
    7474 
    7575    def __eq__(self, y): 
     76        if type(self) != type(y): 
     77            return False 
    7678        ''' 
    7779        Cannot compare classes which do not define a "__key" attribute  
     
    8284 
    8385    def __hash__(self): 
    84         return hash(self.__key()) 
     86        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_registerowner.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:03 
     24Created on 13-Mar-2012 11:08:10 
    2525 
    2626@author: mnagni 
     
    7373 
    7474    def __eq__(self, y): 
     75        if type(self) != type(y): 
     76            return False 
    7577        ''' 
    7678        Cannot compare classes which do not define a "__key" attribute  
     
    8183 
    8284    def __hash__(self): 
    83         return hash(self.__key()) 
     85        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_similaritytosource.py

    r8091 r8160  
    2020 
    2121from ascore.ascodelist import  ASCodeList  
    22 from ascore.utils import has_value 
     22from ascore.utils import has_value, collectionProofHash 
    2323 
    2424''' 
    25 Created on 16-Feb-2012 16:17:59 
     25Created on 13-Mar-2012 11:08:09 
    2626 
    2727@author: mnagni 
     
    3535        This class has been genererated automatically using the Apache Velocity project. 
    3636    ''' 
     37    cl_unspecified = "unspecified"  
     38    cl_identical = "identical"  
     39    cl_contextadded = "contextAdded"  
    3740    cl_specialization = "specialization"  
    38     cl_identical = "identical"  
    39     cl_unspecified = "unspecified"  
     41    cl_restyled = "restyled"  
    4042    cl_generalization = "generalization"  
    41     cl_contextadded = "contextAdded"  
    42     cl_restyled = "restyled"  
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_submittingorganization.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:11 
     24Created on 13-Mar-2012 11:08:07 
    2525 
    2626@author: mnagni 
     
    4343        self._register_cl_classificationregister = [] 
    4444        self._register_cl_classificationregister = [] 
     45        self._proposalInformation_re_additioninformation = [] 
    4546        self._proposalInformation_re_clarificationinformation = [] 
    46         self._proposalInformation_re_additioninformation = [] 
    4747        self._proposalInformation_re_amendmentinformation = [] 
    4848        self.contact = None 
     
    7575    def proposalInformation(self):       
    7676        ret = [] 
     77        for item in self._proposalInformation_re_additioninformation: 
     78            ret.append(item) 
    7779        for item in self._proposalInformation_re_clarificationinformation: 
    78             ret.append(item) 
    79         for item in self._proposalInformation_re_additioninformation: 
    8080            ret.append(item) 
    8181        for item in self._proposalInformation_re_amendmentinformation: 
     
    8686    def proposalInformation(self, value):        
    8787        if isinstance(value, list): 
     88            self._proposalInformation_re_additioninformation[:] 
    8889            self._proposalInformation_re_clarificationinformation[:] 
    89             self._proposalInformation_re_additioninformation[:] 
    9090            self._proposalInformation_re_amendmentinformation[:] 
    9191            for item in value: 
    9292                valueClass = "%s.%s" % (type(item).__module__,type(item).__name__) 
     93                if valueClass == "ea_model.iso_19135_2005_procedures_for_registration.re_additioninformation.RE_AdditionInformation": 
     94                    self._proposalInformation_re_additioninformation.append(item) 
     95                    continue 
    9396                if valueClass == "ea_model.iso_19135_2005_procedures_for_registration.re_clarificationinformation.RE_ClarificationInformation": 
    9497                    self._proposalInformation_re_clarificationinformation.append(item) 
    95                     continue 
    96                 if valueClass == "ea_model.iso_19135_2005_procedures_for_registration.re_additioninformation.RE_AdditionInformation": 
    97                     self._proposalInformation_re_additioninformation.append(item) 
    9898                    continue 
    9999                if valueClass == "ea_model.iso_19135_2005_procedures_for_registration.re_amendmentinformation.RE_AmendmentInformation": 
     
    105105 
    106106    def __eq__(self, y): 
     107        if type(self) != type(y): 
     108            return False 
    107109        ''' 
    108110        Cannot compare classes which do not define a "__key" attribute  
     
    113115 
    114116    def __hash__(self): 
    115         return hash(self.__key()) 
     117        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_subregisterdescription.py

    r8091 r8160  
    2020 
    2121from ea_model.iso_19135_2005_procedures_for_registration.re_registeritem import  RE_RegisterItem  
    22 from ascore.utils import has_value 
     22from ascore.utils import has_value, collectionProofHash 
    2323 
    2424''' 
    25 Created on 16-Feb-2012 16:18:06 
     25Created on 13-Mar-2012 11:08:08 
    2626 
    2727@author: mnagni 
     
    6262        self._predecessor_cl_classificationlegenditem = [] 
    6363        self._predecessor_re_subregisterdescription = [] 
     64        self.itemIdentifier = None 
    6465        self.fieldOfApplication = [] 
    65         self.itemIdentifier = None 
    6666        self._successor_cl_classificationlegenditem = [] 
    6767        self._successor_cl_classificationruleitem = [] 
     
    7676        self.description = None 
    7777        self.operatingLanguage = None 
     78        self.specificationSource = None 
    7879        self.dateAccepted = None 
    79         self.specificationSource = None 
    8080        self.clarificationInformation = [] 
    8181        super(RE_SubregisterDescription, self).__init__() 
     
    173173 
    174174    @property 
     175    def itemIdentifier(self):    
     176        return self._re_registeritem.itemIdentifier 
     177 
     178    @itemIdentifier.setter 
     179    def itemIdentifier(self, value):     
     180            self._re_registeritem.itemIdentifier = value 
     181 
     182    @property 
    175183    def fieldOfApplication(self):        
    176184        return self._re_registeritem.fieldOfApplication 
     
    181189 
    182190    @property 
    183     def itemIdentifier(self):    
    184         return self._re_registeritem.itemIdentifier 
    185  
    186     @itemIdentifier.setter 
    187     def itemIdentifier(self, value):     
    188             self._re_registeritem.itemIdentifier = value 
    189  
    190     @property 
    191191    def successor(self):         
    192192        return self._re_registeritem.successor 
     
    237237 
    238238    @property 
     239    def specificationSource(self):       
     240        return self._re_registeritem.specificationSource 
     241 
     242    @specificationSource.setter 
     243    def specificationSource(self, value):        
     244            self._re_registeritem.specificationSource = value 
     245 
     246    @property 
    239247    def dateAccepted(self):      
    240248        return self._re_registeritem.dateAccepted 
     
    245253 
    246254    @property 
    247     def specificationSource(self):       
    248         return self._re_registeritem.specificationSource 
    249  
    250     @specificationSource.setter 
    251     def specificationSource(self, value):        
    252             self._re_registeritem.specificationSource = value 
    253  
    254     @property 
    255255    def clarificationInformation(self):  
    256256        return self._re_registeritem.clarificationInformation 
     
    261261 
    262262    def __key(self): 
    263         return (self.alternativeExpressions, self.additionInformation, self.itemClass, self.register, self.dateAmended, self.specificationLineage, self.subregisterManager, self.containedItemClass, self.predecessor, self.fieldOfApplication, self.itemIdentifier, self.successor, self.definition, self.amendmentInformation, self.name, self.uniformResourceIdentifier, self.status, self.description, self.operatingLanguage, self.dateAccepted, self.specificationSource, self.clarificationInformation) 
     263        return (self.alternativeExpressions, self.additionInformation, self.itemClass, self.register, self.dateAmended, self.specificationLineage, self.subregisterManager, self.containedItemClass, self.predecessor, self.itemIdentifier, self.fieldOfApplication, self.successor, self.definition, self.amendmentInformation, self.name, self.uniformResourceIdentifier, self.status, self.description, self.operatingLanguage, self.specificationSource, self.dateAccepted, self.clarificationInformation) 
    264264 
    265265    def __eq__(self, y): 
     266        if type(self) != type(y): 
     267            return False 
    266268        ''' 
    267269        Cannot compare classes which do not define a "__key" attribute  
     
    272274 
    273275    def __hash__(self): 
    274         return hash(self.__key()) 
     276        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_version.py

    r8091 r8160  
    1919 
    2020 
    21 from ascore.utils import has_value 
     21from ascore.utils import has_value, collectionProofHash 
    2222 
    2323''' 
    24 Created on 16-Feb-2012 16:18:08 
     24Created on 13-Mar-2012 11:08:08 
    2525 
    2626@author: mnagni 
     
    4848 
    4949    def __eq__(self, y): 
     50        if type(self) != type(y): 
     51            return False 
    5052        ''' 
    5153        Cannot compare classes which do not define a "__key" attribute  
     
    5658 
    5759    def __hash__(self): 
    58         return hash(self.__key()) 
     60        return collectionProofHash(self.__key()) 
Note: See TracChangeset for help on using the changeset viewer.