|
From: <ki...@us...> - 2003-02-18 18:22:05
|
Update of /cvsroot/pymerase/pymerase/output
In directory sc8-pr-cvs1:/tmp/cvs-serv15095
Modified Files:
CreateReport.py
Log Message:
formatting changes, more docs
Index: CreateReport.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/output/CreateReport.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CreateReport.py 12 Feb 2003 01:26:58 -0000 1.4
--- CreateReport.py 18 Feb 2003 18:22:01 -0000 1.5
***************
*** 50,54 ****
# Writer components
! def write(destination, tables):
"""
Create Report in destination dirctory.
--- 50,54 ----
# Writer components
! def write(destination, classList):
"""
Create Report in destination dirctory.
***************
*** 56,65 ****
text = []
#Iterate through the tables/classes and process the data
! for tbl in tables:
! #Set Web Page Title
! text.append("CLASS: %s" % (tbl.getName(TRANSLATOR_NAME)))
! baseClassNames = tbl.getBaseClassNames(TRANSLATOR_NAME)
if len(baseClassNames) >= 1:
for baseClass in baseClassNames:
--- 56,66 ----
text = []
#Iterate through the tables/classes and process the data
! for cls in classList:
! #Set Class Title Title
! text.append("CLASS: %s" % (cls.getName(TRANSLATOR_NAME)))
! #Get name of class which this class inherits from
! baseClassNames = cls.getBaseClassNames(TRANSLATOR_NAME)
if len(baseClassNames) >= 1:
for baseClass in baseClassNames:
***************
*** 67,80 ****
#Process each attribute in a given table (class)
! for attribute in getAllAttributes(tables, tbl, TRANSLATOR_NAME):
- #get attribute type
type = attribute.getType().getSQLType()
text.append(" ATTRIBUTE:")
! text.append(" Name = %s" % (attribute.getName(TRANSLATOR_NAME)))
! text.append(" Type = %s" % (type))
! text.append(" GetterName = %s" % (attribute.getGetterName(TRANSLATOR_NAME)))
! text.append(" SetterName = %s" % (attribute.getSetterName(TRANSLATOR_NAME)))
! text.append(" AppenderName = %s" % (attribute.getAppenderName(TRANSLATOR_NAME)))
text.append(" isRequired = %s" % (attribute.isRequired()))
text.append(" isUnique = %s" % (attribute.isUnique()))
--- 68,85 ----
#Process each attribute in a given table (class)
! for attribute in getAllAttributes(classList, cls, TRANSLATOR_NAME):
type = attribute.getType().getSQLType()
text.append(" ATTRIBUTE:")
! text.append(" Name = %s" % \
! (attribute.getName(TRANSLATOR_NAME)))
! text.append(" Type = %s" % \
! (type))
! text.append(" GetterName = %s" \
! % (attribute.getGetterName(TRANSLATOR_NAME)))
! text.append(" SetterName = %s" % \
! (attribute.getSetterName(TRANSLATOR_NAME)))
! text.append(" AppenderName = %s" % \
! (attribute.getAppenderName(TRANSLATOR_NAME)))
text.append(" isRequired = %s" % (attribute.isRequired()))
text.append(" isUnique = %s" % (attribute.isUnique()))
***************
*** 82,92 ****
text.append(" isPrimaryKey = %s" % (attribute.isPrimaryKey()))
! for assocEnd in getAllAssociationEnds(tables, tbl, TRANSLATOR_NAME):
text.append(" ASSOC END:")
text.append(" Name = %s" % (assocEnd.getName(TRANSLATOR_NAME)))
! text.append(" AttribName = %s" % (assocEnd.getAttributeName(TRANSLATOR_NAME)))
! text.append(" GetterName = %s" % (assocEnd.getGetterName(TRANSLATOR_NAME)))
! text.append(" SetterName = %s" % (assocEnd.getSetterName(TRANSLATOR_NAME)))
! text.append(" AppenderName = %s" % (assocEnd.getAppenderName(TRANSLATOR_NAME)))
text.append(" Multiplicity = %s" % (assocEnd.getMultiplicity()))
text.append(" isNavigable = %s" % (assocEnd.isNavigable()))
--- 87,101 ----
text.append(" isPrimaryKey = %s" % (attribute.isPrimaryKey()))
! for assocEnd in getAllAssociationEnds(classList, cls, TRANSLATOR_NAME):
text.append(" ASSOC END:")
text.append(" Name = %s" % (assocEnd.getName(TRANSLATOR_NAME)))
! text.append(" AttribName = %s" % \
! (assocEnd.getAttributeName(TRANSLATOR_NAME)))
! text.append(" GetterName = %s" % \
! (assocEnd.getGetterName(TRANSLATOR_NAME)))
! text.append(" SetterName = %s" % \
! (assocEnd.getSetterName(TRANSLATOR_NAME)))
! text.append(" AppenderName = %s" % \
! (assocEnd.getAppenderName(TRANSLATOR_NAME)))
text.append(" Multiplicity = %s" % (assocEnd.getMultiplicity()))
text.append(" isNavigable = %s" % (assocEnd.isNavigable()))
|