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_19115_2006_metadata_corrigendum/constraint_information
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19115_2006_metadata_corrigendum/constraint_information/md_classificationcode.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:18:11 
     25Created on 13-Mar-2012 11:08:07 
    2626 
    2727@author: mnagni 
     
    3535        This class has been genererated automatically using the Apache Velocity project. 
    3636    ''' 
     37    cl_topsecret = "topSecret"  
    3738    cl_secret = "secret"  
     39    cl_unclassified = "unclassified"  
    3840    cl_restricted = "restricted"  
    3941    cl_confidential = "confidential"  
    40     cl_unclassified = "unclassified"  
    41     cl_topsecret = "topSecret"  
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19115_2006_metadata_corrigendum/constraint_information/md_constraints.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:13 
    2525 
    2626@author: mnagni 
     
    4747 
    4848    def __eq__(self, y): 
     49        if type(self) != type(y): 
     50            return False 
    4951        ''' 
    5052        Cannot compare classes which do not define a "__key" attribute  
     
    5557 
    5658    def __hash__(self): 
    57         return hash(self.__key()) 
     59        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19115_2006_metadata_corrigendum/constraint_information/md_legalconstraints.py

    r8091 r8160  
    2020 
    2121from ea_model.iso_19115_2006_metadata_corrigendum.constraint_information.md_constraints import  MD_Constraints  
    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:14 
    2626 
    2727@author: mnagni 
     
    6060 
    6161    def __eq__(self, y): 
     62        if type(self) != type(y): 
     63            return False 
    6264        ''' 
    6365        Cannot compare classes which do not define a "__key" attribute  
     
    6870 
    6971    def __hash__(self): 
    70         return hash(self.__key()) 
     72        return collectionProofHash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19115_2006_metadata_corrigendum/constraint_information/md_restrictioncode.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:18:08 
     25Created on 13-Mar-2012 11:08:07 
    2626 
    2727@author: mnagni 
     
    3535        This class has been genererated automatically using the Apache Velocity project. 
    3636    ''' 
     37    cl_restricted = "restricted"  
     38    cl_patentpending = "patentPending"  
    3739    cl_trademark = "trademark"  
    38     cl_restricted = "restricted"  
     40    cl_intellectualpropertyrights = "intellectualPropertyRights"  
     41    cl_copyright = "copyright"  
     42    cl_otherrestrictions = "otherRestrictions"  
     43    cl_patent = "patent"  
    3944    cl_license = "license"  
    40     cl_copyright = "copyright"  
    41     cl_patentpending = "patentPending"  
    42     cl_otherrestrictions = "otherRestrictions"  
    43     cl_intellectualpropertyrights = "intellectualPropertyRights"  
    44     cl_patent = "patent"  
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19115_2006_metadata_corrigendum/constraint_information/md_securityconstraints.py

    r8091 r8160  
    2020 
    2121from ea_model.iso_19115_2006_metadata_corrigendum.constraint_information.md_constraints import  MD_Constraints  
    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:08 
    2626 
    2727@author: mnagni 
     
    6161 
    6262    def __eq__(self, y): 
     63        if type(self) != type(y): 
     64            return False 
    6365        ''' 
    6466        Cannot compare classes which do not define a "__key" attribute  
     
    6971 
    7072    def __hash__(self): 
    71         return hash(self.__key()) 
     73        return collectionProofHash(self.__key()) 
Note: See TracChangeset for help on using the changeset viewer.