entities/schemaobjs.py
branchtls-sprint
changeset 1802 d628defebc17
parent 1398 5fe84a5f7035
child 1977 606923dff11b
--- a/entities/schemaobjs.py	Thu May 14 10:24:56 2009 +0200
+++ b/entities/schemaobjs.py	Thu May 14 11:38:40 2009 +0200
@@ -20,7 +20,7 @@
 
     def dc_title(self):
         return self.req._(self.name)
-    
+
     def dc_long_title(self):
         stereotypes = []
         _ = self.req._
@@ -40,10 +40,10 @@
 class CWRType(AnyEntity):
     id = 'CWRType'
     fetch_attrs, fetch_order = fetch_config(['name'])
-    
+
     def dc_title(self):
         return self.req._(self.name)
-    
+
     def dc_long_title(self):
         stereotypes = []
         _ = self.req._
@@ -61,7 +61,7 @@
 
     def inlined_changed(self, inlined):
         """check inlining is necessary and possible:
-        
+
         * return False if nothing has changed
         * raise ValidationError if inlining is'nt possible
         * eventually return True
@@ -88,13 +88,13 @@
 class CWRelation(AnyEntity):
     id = 'CWRelation'
     fetch_attrs = fetch_config(['cardinality'])[0]
-    
+
     def dc_title(self):
         return u'%s %s %s' % (
             self.from_entity[0].name,
-            self.relation_type[0].name, 
+            self.relation_type[0].name,
             self.to_entity[0].name)
-    
+
     def dc_long_title(self):
         card = self.cardinality
         scard, ocard = u'', u''
@@ -118,7 +118,7 @@
 
 class CWAttribute(CWRelation):
     id = 'CWAttribute'
-    
+
     def dc_long_title(self):
         card = self.cardinality
         scard = u''
@@ -126,7 +126,7 @@
             scard = '+'
         return u'%s %s%s %s' % (
             self.from_entity[0].name,
-            scard, self.relation_type[0].name, 
+            scard, self.relation_type[0].name,
             self.to_entity[0].name)
 
 
@@ -136,7 +136,7 @@
 
     def dc_title(self):
         return '%s(%s)' % (self.cstrtype[0].name, self.value or u'')
-        
+
     def after_deletion_path(self):
         """return (path, parameters) which should be used as redirect
         information when this entity is being deleted
@@ -149,7 +149,7 @@
     def type(self):
         return self.cstrtype[0].name
 
-        
+
 class RQLExpression(AnyEntity):
     id = 'RQLExpression'
     fetch_attrs, fetch_order = fetch_config(['exprtype', 'mainvars', 'expression'])
@@ -164,17 +164,17 @@
             values = getattr(self, 'reverse_%s' % rel)
             if values:
                 return values[0]
-            
+
     @cached
     def _rqlexpr(self):
         if self.exprtype == 'ERQLExpression':
             return ERQLExpression(self.expression, self.mainvars, self.eid)
         #if self.exprtype == 'RRQLExpression':
         return RRQLExpression(self.expression, self.mainvars, self.eid)
-    
+
     def check_expression(self, *args, **kwargs):
         return self._rqlexpr().check(*args, **kwargs)
-    
+
     def after_deletion_path(self):
         """return (path, parameters) which should be used as redirect
         information when this entity is being deleted
@@ -192,7 +192,7 @@
         if self.label:
             return '%s (%s)' % (self.req._(self.name), self.label)
         return self.req._(self.name)
-    
+
     def after_deletion_path(self):
         """return (path, parameters) which should be used as redirect
         information when this entity is being deleted