Ignore:
Timestamp:
10/02/12 13:39:16 (8 years ago)
Author:
mnagni
Message:

New ea_model library.
No more use the django.forms. Now uses JSON and Dojo(javascript)
DB creation files are now executed as standard python function (before was used a system execution call)
Added an html example to play/work offline with DOJO

Location:
mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/bag.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:38 
     25Created on 10-Feb-2012 12:03:09 
    2326 
    2427@author: mnagni 
     
    4245        super(Bag, self).__init__() 
    4346 
    44  
    45  
    4647    def __key(self): 
    4748        return (self.element) 
    4849 
    49     def __eq__(x, y): 
     50    def __eq__(self, y): 
    5051        ''' 
    5152        Cannot compare classes which do not define a "__key" attribute  
    5253        ''' 
    53         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    54             return x.__key() == y.__key() 
    55         return id(x) == id(y) 
     54        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     55            return self.__key() == y.__key() 
     56        return id(self) == id(y) 
    5657 
    5758    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/circularsequence.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:37 
     25Created on 10-Feb-2012 12:03:10 
    2326 
    2427@author: mnagni 
     
    4447 
    4548    @property 
    46     def length(self): 
     49    def length(self):    
    4750        return self._sequence.length 
    4851 
    4952    @length.setter 
    50     def length(self, value): 
     53    def length(self, value):     
    5154            self._sequence.length = value 
    5255 
    5356    @property 
    54     def element(self): 
     57    def element(self):   
    5558        return self._sequence.element 
    5659 
    5760    @element.setter 
    58     def element(self, value): 
     61    def element(self, value):    
    5962            self._sequence.element = value 
    6063 
     
    6265        return (self.length, self.element) 
    6366 
    64     def __eq__(x, y): 
     67    def __eq__(self, y): 
    6568        ''' 
    6669        Cannot compare classes which do not define a "__key" attribute  
    6770        ''' 
    68         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    69             return x.__key() == y.__key() 
    70         return id(x) == id(y) 
     71        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     72            return self.__key() == y.__key() 
     73        return id(self) == id(y) 
    7174 
    7275    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/code.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2124 
    2225''' 
    23 Created on 06-Feb-2012 15:59:43 
     26Created on 10-Feb-2012 12:03:13 
    2427 
    2528@author: mnagni 
     
    3336        This class has been genererated automatically using the Apache Velocity project. 
    3437    ''' 
    35     types = {'asNumber':NUMERIC,'asCharacter':Text} 
     38    types = {'asCharacter':Text,'asNumber':NUMERIC} 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/codelist.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:49 
     24Created on 10-Feb-2012 12:03:07 
    2225 
    2326@author: mnagni 
     
    4043        super(CodeList, self).__init__() 
    4144 
    42  
    43  
    4445    def __key(self): 
    4546        return (self.actualValue) 
    4647 
    47     def __eq__(x, y): 
     48    def __eq__(self, y): 
    4849        ''' 
    4950        Cannot compare classes which do not define a "__key" attribute  
    5051        ''' 
    51         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    52             return x.__key() == y.__key() 
    53         return id(x) == id(y) 
     52        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     53            return self.__key() == y.__key() 
     54        return id(self) == id(y) 
    5455 
    5556    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/collection.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:37 
     24Created on 10-Feb-2012 12:03:12 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/dictionary.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:36 
     24Created on 10-Feb-2012 12:03:13 
    2225 
    2326@author: mnagni 
     
    4043        super(Dictionary, self).__init__() 
    4144 
    42  
    43  
    4445    def __key(self): 
    4546        return (self.elements) 
    4647 
    47     def __eq__(x, y): 
     48    def __eq__(self, y): 
    4849        ''' 
    4950        Cannot compare classes which do not define a "__key" attribute  
    5051        ''' 
    51         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    52             return x.__key() == y.__key() 
    53         return id(x) == id(y) 
     52        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     53            return self.__key() == y.__key() 
     54        return id(self) == id(y) 
    5455 
    5556    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/keytype.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:43 
     24Created on 10-Feb-2012 12:03:12 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/keyvaluepair.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:42 
     24Created on 10-Feb-2012 12:03:06 
    2225 
    2326@author: mnagni 
     
    4144        super(KeyValuePair, self).__init__() 
    4245 
    43  
    44  
    45  
    46  
    4746    def __key(self): 
    4847        return (self.value, self.key) 
    4948 
    50     def __eq__(x, y): 
     49    def __eq__(self, y): 
    5150        ''' 
    5251        Cannot compare classes which do not define a "__key" attribute  
    5352        ''' 
    54         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    55             return x.__key() == y.__key() 
    56         return id(x) == id(y) 
     53        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     54            return self.__key() == y.__key() 
     55        return id(self) == id(y) 
    5756 
    5857    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/sequence.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:38 
     25Created on 10-Feb-2012 12:03:06 
    2326 
    2427@author: mnagni 
     
    4346        super(Sequence, self).__init__() 
    4447 
    45  
    46  
    47  
    48  
    4948    def __key(self): 
    5049        return (self.length, self.element) 
    5150 
    52     def __eq__(x, y): 
     51    def __eq__(self, y): 
    5352        ''' 
    5453        Cannot compare classes which do not define a "__key" attribute  
    5554        ''' 
    56         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    57             return x.__key() == y.__key() 
    58         return id(x) == id(y) 
     55        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     56            return self.__key() == y.__key() 
     57        return id(self) == id(y) 
    5958 
    6059    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/set.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:43 
     25Created on 10-Feb-2012 12:03:13 
    2326 
    2427@author: mnagni 
     
    4346        super(Set, self).__init__() 
    4447 
    45  
    46  
    47  
    48  
    4948    def __key(self): 
    5049        return (self.size, self.elements) 
    5150 
    52     def __eq__(x, y): 
     51    def __eq__(self, y): 
    5352        ''' 
    5453        Cannot compare classes which do not define a "__key" attribute  
    5554        ''' 
    56         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    57             return x.__key() == y.__key() 
    58         return id(x) == id(y) 
     55        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     56            return self.__key() == y.__key() 
     57        return id(self) == id(y) 
    5958 
    6059    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/t.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:45 
     24Created on 10-Feb-2012 12:03:15 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/transfiniteset.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:44 
     24Created on 10-Feb-2012 12:03:08 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/implementation/collections/valuetype.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:42 
     24Created on 10-Feb-2012 12:03:07 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
Note: See TracChangeset for help on using the changeset viewer.