[Modeling-cvs] ProjectModeling/Modeling Model.py,1.3,1.4 Entity.py,1.10,1.11 Attribute.py,1.11,1.12
Status: Abandoned
Brought to you by:
sbigaret
|
From: <sbi...@us...> - 2003-04-22 09:32:03
|
Update of /cvsroot/modeling/ProjectModeling/Modeling
In directory sc8-pr-cvs1:/tmp/cvs-serv26584
Modified Files:
Model.py Entity.py Attribute.py Relationship.py CHANGES
Log Message:
Added a field 'comment' for Model, Entity, Attribute & Relationship, after
a suggestion by Yannick Gingras
Index: Model.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Model.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Model.py 10 Jan 2003 10:45:44 -0000 1.3
--- Model.py 22 Apr 2003 09:31:56 -0000 1.4
***************
*** 55,59 ****
_connectionDictionary={}
_packageName=''
!
def __init__(self, aName=''):
"Initializes a model. A name **must** be provided."
--- 55,60 ----
_connectionDictionary={}
_packageName=''
! _comment=''
!
def __init__(self, aName=''):
"Initializes a model. A name **must** be provided."
***************
*** 95,98 ****
--- 96,103 ----
anEntity._setModel(self)
+ def comment(self):
+ "Returns the comment field"
+ return self._comment
+
def connectionDictionary(self):
"Returns the connection dictionary"
***************
*** 191,194 ****
--- 196,203 ----
self._adaptorName=adaptorName
+ def setComment(self, aComment):
+ "Sets the comment field"
+ self._comment=aComment
+
def setConnectionDictionary(self, aConnectionDictionary):
"Sets the connection dictionary"
***************
*** 315,320 ****
'connectionDictionary': ('string',
self.setConnectionDictionary,
! self.connectionDictionary)
!
}
--- 324,331 ----
'connectionDictionary': ('string',
self.setConnectionDictionary,
! self.connectionDictionary),
! 'comment': ('string',
! self.setComment,
! self.comment),
}
Index: Entity.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Entity.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Entity.py 17 Mar 2003 10:27:09 -0000 1.10
--- Entity.py 22 Apr 2003 09:31:56 -0000 1.11
***************
*** 145,148 ****
--- 145,149 ----
_attrsUsedForLocking=()
_moduleName=None
+ _comment=''
def __init__(self, name='', aModel=None):
***************
*** 158,161 ****
--- 159,163 ----
self._attrsUsedForLocking=()
self._className=None
+ self._comment=''
self._externalName=''
self._model=None
***************
*** 358,361 ****
--- 360,367 ----
if rel.isClassProperty()])
+ def comment(self):
+ "Returns the comment field"
+ return self._comment
+
def definedKeys(self):
"""
***************
*** 838,841 ****
--- 844,851 ----
self._className=aName
+ def setComment(self, aComment):
+ "Sets the comment field"
+ self._comment=aComment
+
def setExternalName(self, externalName):
"Sets the external name"
***************
*** 1378,1381 ****
--- 1388,1394 ----
self.setClassName,
self.className ),
+ 'comment': ( 'string',
+ self.setComment,
+ self.comment),
'externalName': ( 'string',
self.setExternalName,
Index: Attribute.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Attribute.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Attribute.py 17 Mar 2003 11:15:11 -0000 1.11
--- Attribute.py 22 Apr 2003 09:31:56 -0000 1.12
***************
*** 100,103 ****
--- 100,104 ----
_columnName=''
_width=0
+ _comment=''
def __init__(self, aName='', anEntity=None):
***************
*** 111,114 ****
--- 112,116 ----
self._allowsNone=1
self._columnName=''
+ self._comment=''
self._defaultValue=None
self._definition=''
***************
*** 165,168 ****
--- 167,174 ----
return self._columnName
+ def comment(self):
+ "Returns the comment field"
+ return self._comment
+
def defaultValue(self):
"Returns the default value associated to this attribute"
***************
*** 323,326 ****
--- 329,336 ----
self._columnName=columnName
+ def setComment(self, aComment):
+ "Sets the comment field"
+ self._comment=aComment
+
def convertStringToAttributeType(self, aValue):
"""
***************
*** 595,598 ****
--- 605,611 ----
self.setColumnName,
self.columnName),
+ 'comment' : ( 'string',
+ self.setComment,
+ self.comment),
'displayLabel' : ('string',
self.setDisplayLabel,
***************
*** 638,642 ****
subList=('name',
'columnName', 'precision', 'scale', 'width', 'externalType', #DB
! 'displayLabel', 'isClassProperty', 'isRequired',
'defaultValue', 'type', )
dict=self.fullPropertySet()
--- 651,655 ----
subList=('name',
'columnName', 'precision', 'scale', 'width', 'externalType', #DB
! 'comment', 'displayLabel', 'isClassProperty', 'isRequired',
'defaultValue', 'type', )
dict=self.fullPropertySet()
***************
*** 647,651 ****
def flattenedPropertySet(self):
subList=('name', 'displayLabel', 'isClassProperty', 'definition',
! 'isFlattened', )
dict=self.fullPropertySet()
deleteKeys=filter(lambda k, list=subList: k not in list, dict.keys())
--- 660,664 ----
def flattenedPropertySet(self):
subList=('name', 'displayLabel', 'isClassProperty', 'definition',
! 'isFlattened', 'comment')
dict=self.fullPropertySet()
deleteKeys=filter(lambda k, list=subList: k not in list, dict.keys())
Index: Relationship.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Relationship.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Relationship.py 10 Feb 2003 12:12:15 -0000 1.7
--- Relationship.py 22 Apr 2003 09:31:56 -0000 1.8
***************
*** 69,72 ****
--- 69,73 ----
#
_isClassProperty=1
+ _comment=''
__implements__=(RelationshipInterface, XMLCapabilityInterface)
***************
*** 76,79 ****
--- 77,81 ----
self._deleteRule = DELETE_NULLIFY
self._displayLabel = ''
+ self._comment = ''
self._entity = None
self._isClassProperty = 1
***************
*** 83,86 ****
--- 85,92 ----
return
+ def comment(self):
+ "Returns the comment field"
+ return self._comment
+
def entity(self):
"Return the relationship's source entity"
***************
*** 146,149 ****
--- 152,159 ----
return self._name
+ def setComment(self, aComment):
+ "Sets the comment field"
+ self._comment=aComment
+
def setDeleteRule(self, rule):
"""
***************
*** 280,283 ****
--- 290,296 ----
"-"
return {
+ 'comment' : ('string',
+ self.setComment,
+ self.comment),
'name' : ('string',
lambda self=None,p=None: None,
Index: CHANGES
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CHANGES,v
retrieving revision 1.95
retrieving revision 1.96
diff -C2 -d -r1.95 -r1.96
*** CHANGES 21 Apr 2003 22:25:56 -0000 1.95
--- CHANGES 22 Apr 2003 09:31:57 -0000 1.96
***************
*** 8,11 ****
--- 8,14 ----
--------------------------------------------------------
+ * Added a field 'comment' for Model, Entity, Attribute & Relationship, after
+ a suggestion by Yannick Gingras
+
0.9-pre-6 (2003/04/22) Project milestone -- no public release
--------- Preparing 0.9 - ETA: 2003/04/28
|