__init__.py
changeset 4475 37c413a07216
parent 4252 6c4f109c2b03
child 5081 2ea98b8512dd
equal deleted inserted replaced
4474:55fe19813bb7 4475:37c413a07216
    54     def write(self, data):
    54     def write(self, data):
    55         assert isinstance(data, (str, buffer)), \
    55         assert isinstance(data, (str, buffer)), \
    56                "Binary objects must use raw strings, not %s" % data.__class__
    56                "Binary objects must use raw strings, not %s" % data.__class__
    57         StringIO.write(self, data)
    57         StringIO.write(self, data)
    58 
    58 
    59 # use this dictionary for renaming of entity types while keeping bw compat
    59 # use this dictionary to rename entity types while keeping bw compat
    60 ETYPE_NAME_MAP = {# 3.2 migration
    60 ETYPE_NAME_MAP = {}
    61                   'ECache': 'CWCache',
       
    62                   'EUser': 'CWUser',
       
    63                   'EGroup': 'CWGroup',
       
    64                   'EProperty': 'CWProperty',
       
    65                   'EFRDef': 'CWAttribute',
       
    66                   'ENFRDef': 'CWRelation',
       
    67                   'ERType': 'CWRType',
       
    68                   'EEType': 'CWEType',
       
    69                   'EConstraintType': 'CWConstraintType',
       
    70                   'EConstraint': 'CWConstraint',
       
    71                   'EPermission': 'CWPermission',
       
    72                   }
       
    73 
    61 
    74 
    62 # XXX cubic web cube migration map. See if it's worth keeping this mecanism
    75 # XXX cubic web cube migration map
    63 #     to help in cube renaming
    76 CW_MIGRATION_MAP = {'erudi': 'cubicweb',
    64 CW_MIGRATION_MAP = {}
    77                     'eaddressbook': 'addressbook',
       
    78                     'ebasket': 'basket',
       
    79                     'eblog': 'blog',
       
    80                     'ebook': 'book',
       
    81                     'eclassschemes': 'keyword',
       
    82                     'eclassfolders': 'folder',
       
    83                     'eclasstags': 'tag',
       
    84                     'ecomment': 'comment',
       
    85                     'ecompany': 'company',
       
    86                     'econference':  'conference',
       
    87                     'eemail': 'email',
       
    88                     'eevent': 'event',
       
    89                     'eexpense': 'expense',
       
    90                     'efile': 'file',
       
    91                     'einvoice': 'invoice',
       
    92                     'elink': 'link',
       
    93                     'emailinglist': 'mailinglist',
       
    94                     'eperson': 'person',
       
    95                     'eshopcart': 'shopcart',
       
    96                     'eskillmat': 'skillmat',
       
    97                     'etask': 'task',
       
    98                     'eworkcase': 'workcase',
       
    99                     'eworkorder': 'workorder',
       
   100                     'ezone': 'zone',
       
   101                     'i18ncontent': 'i18ncontent',
       
   102                     'svnfile': 'vcsfile',
       
   103                     }
       
   104 
    65 
   105 def neg_role(role):
    66 def neg_role(role):
   106     if role == 'subject':
    67     if role == 'subject':
   107         return 'object'
    68         return 'object'
   108     return 'subject'
    69     return 'subject'