You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(44) |
Feb
(151) |
Mar
(131) |
Apr
(171) |
May
(125) |
Jun
(43) |
Jul
(26) |
Aug
(19) |
Sep
(10) |
Oct
|
Nov
(4) |
Dec
(28) |
2004 |
Jan
(134) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/pymerase/pymerase/examples/manyToMany In directory sc8-pr-cvs1:/tmp/cvs-serv18398 Modified Files: createapi.py creategraphvizuml.py createpytkdbwidgets.py createpytkwidgets.py createreport.py createsql.py Removed Files: Makefile Log Message: updated for parseXMI Index: createapi.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/manyToMany/createapi.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** createapi.py 14 Mar 2003 23:33:04 -0000 1.1 --- createapi.py 30 Apr 2003 18:37:51 -0000 1.2 *************** *** 5,20 **** import pymerase ! # NOTE: Jython can't use the python way to load modules based on their name ! # NOTE: so we have to manually import the modules we're using ! # NOTE: and pass them to pymerase.run ! import pymerase.input.parseXMI ! import pymerase.output.CreateDBAPI if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.xmi") outputPath = os.path.abspath("./m2mAPI") ! #pymerase.run(schema, 'parseXMI', output, 'CreateDBAPI') ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateDBAPI) --- 5,17 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreateDBAPI if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.zargo") outputPath = os.path.abspath("./m2mAPI") ! pymerase.run(schema, 'parseXMI', outputPath, 'CreateDBAPI') ! #pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateDBAPI) Index: creategraphvizuml.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/manyToMany/creategraphvizuml.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** creategraphvizuml.py 14 Mar 2003 23:33:24 -0000 1.1 --- creategraphvizuml.py 30 Apr 2003 18:37:52 -0000 1.2 *************** *** 5,15 **** import pymerase ! import pymerase.input.parseXMI ! import pymerase.output.CreateGraphvizUML if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.xmi") outputPath = os.path.abspath("./manyToMany.dot") ! ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateGraphvizUML) --- 5,16 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreateGraphvizUML if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.zargo") outputPath = os.path.abspath("./manyToMany.dot") ! ! pymerase.run(schema, "parseXMI", outputPath, "CreateGraphvizUML") ! #pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateGraphvizUML) Index: createpytkdbwidgets.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/manyToMany/createpytkdbwidgets.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** createpytkdbwidgets.py 14 Mar 2003 23:33:44 -0000 1.1 --- createpytkdbwidgets.py 30 Apr 2003 18:37:52 -0000 1.2 *************** *** 5,20 **** import pymerase ! # NOTE: Jython can't use the python way to load modules based on their name ! # NOTE: so we have to manually import the modules we're using ! # NOTE: and pass them to pymerase.run ! import pymerase.input.parseXMI ! import pymerase.output.CreatePyTkDBWidgets if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.xmi") outputPath = os.path.abspath("./widgets") ! #pymerase.run(schema, 'parseXMI', output, 'CreateDBAPI') ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreatePyTkDBWidgets) --- 5,17 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreatePyTkDBWidgets if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.zargo") outputPath = os.path.abspath("./widgets") ! pymerase.run(schema, 'parseXMI', outputPath, 'CreatePyTkDBWidgets') ! #pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreatePyTkDBWidgets) Index: createpytkwidgets.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/manyToMany/createpytkwidgets.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** createpytkwidgets.py 14 Mar 2003 23:34:04 -0000 1.1 --- createpytkwidgets.py 30 Apr 2003 18:37:52 -0000 1.2 *************** *** 5,20 **** import pymerase ! # NOTE: Jython can't use the python way to load modules based on their name ! # NOTE: so we have to manually import the modules we're using ! # NOTE: and pass them to pymerase.run ! import pymerase.input.parseXMI ! import pymerase.output.CreatePyTkWidgets if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.xmi") outputPath = os.path.abspath("./widgets") ! #pymerase.run(schema, 'parseXMI', output, 'CreateDBAPI') ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreatePyTkWidgets) --- 5,17 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreatePyTkWidgets if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.zargo") outputPath = os.path.abspath("./widgets") ! pymerase.run(schema, 'parseXMI', outputPath, 'CreatePyTkWidgets') ! #pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreatePyTkWidgets) Index: createreport.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/manyToMany/createreport.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** createreport.py 14 Mar 2003 23:34:21 -0000 1.1 --- createreport.py 30 Apr 2003 18:37:52 -0000 1.2 *************** *** 5,15 **** import pymerase ! import pymerase.input.parseXMI ! import pymerase.output.CreateReport if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.xmi") outputPath = os.path.abspath("./report.txt") ! ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateReport) --- 5,16 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreateReport if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.zargo") outputPath = os.path.abspath("./report.txt") ! ! pymerase.run(schema, "parseXMI", outputPath, "CreateReport") ! #pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateReport) Index: createsql.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/manyToMany/createsql.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** createsql.py 14 Mar 2003 23:34:53 -0000 1.1 --- createsql.py 30 Apr 2003 18:37:52 -0000 1.2 *************** *** 5,15 **** import pymerase ! import pymerase.input.parseXMI ! import pymerase.output.CreateSQL if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.xmi") outputPath = os.path.abspath("./manyToMany.sql") ! ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateSQL) --- 5,16 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreateSQL if __name__ == "__main__": ! schema = os.path.abspath("./manyToMany.zargo") outputPath = os.path.abspath("./manyToMany.sql") ! ! pymerase.run(schema, "parseXMI", outputPath, "CreateSQL") ! #pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateSQL) --- Makefile DELETED --- |
Update of /cvsroot/pymerase/pymerase/examples/dvd In directory sc8-pr-cvs1:/tmp/cvs-serv13816 Modified Files: createapi.py creategraphvizuml.py createpytkdbwidgets.py createpytkwidgets.py createreport.py createsql.py Removed Files: Makefile Log Message: updated for new parseXMI module Index: createapi.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/dvd/createapi.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** createapi.py 18 Mar 2003 20:38:41 -0000 1.3 --- createapi.py 30 Apr 2003 18:25:41 -0000 1.4 *************** *** 5,20 **** import pymerase ! # NOTE: Jython can't use the python way to load modules based on their name ! # NOTE: so we have to manually import the modules we're using ! # NOTE: and pass them to pymerase.run ! import pymerase.input.parseXMI ! import pymerase.output.CreateDBAPI if __name__ == "__main__": ! schema = os.path.abspath("./dvd.xmi") outputPath = os.path.abspath("./DvdAPI") ! #pymerase.run(schema, 'parseXMI', output, 'CreateDBAPI') ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateDBAPI) --- 5,17 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreateDBAPI if __name__ == "__main__": ! schema = os.path.abspath("./dvd.zargo") outputPath = os.path.abspath("./DvdAPI") ! pymerase.run(schema, 'parseXMI', outputPath, 'CreateDBAPI') ! #pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateDBAPI) Index: creategraphvizuml.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/dvd/creategraphvizuml.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** creategraphvizuml.py 18 Mar 2003 20:38:42 -0000 1.3 --- creategraphvizuml.py 30 Apr 2003 18:25:42 -0000 1.4 *************** *** 5,15 **** import pymerase ! import pymerase.input.parseXMI ! import pymerase.output.CreateGraphvizUML if __name__ == "__main__": ! schema = os.path.abspath("./dvd.xmi") outputPath = os.path.abspath("./dvd.dot") ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateGraphvizUML) --- 5,15 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreateGraphvizUML if __name__ == "__main__": ! schema = os.path.abspath("./dvd.zargo") outputPath = os.path.abspath("./dvd.dot") ! pymerase.run(schema, "parseXMI", outputPath, "CreateGraphvizUML") Index: createpytkdbwidgets.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/dvd/createpytkdbwidgets.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** createpytkdbwidgets.py 18 Mar 2003 20:38:43 -0000 1.3 --- createpytkdbwidgets.py 30 Apr 2003 18:25:42 -0000 1.4 *************** *** 5,20 **** import pymerase ! # NOTE: Jython can't use the python way to load modules based on their name ! # NOTE: so we have to manually import the modules we're using ! # NOTE: and pass them to pymerase.run ! import pymerase.input.parseXMI ! import pymerase.output.CreatePyTkDBWidgets if __name__ == "__main__": ! schema = os.path.abspath("./dvd.xmi") outputPath = os.path.abspath("./widgets") ! #pymerase.run(schema, 'parseXMI', output, 'CreateDBAPI') ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreatePyTkDBWidgets) --- 5,17 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreatePyTkDBWidgets if __name__ == "__main__": ! schema = os.path.abspath("./dvd.zargo") outputPath = os.path.abspath("./widgets") ! pymerase.run(schema, 'parseXMI', outputPath, 'CreatePyTkDBWidgets') ! #pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreatePyTkDBWidgets) Index: createpytkwidgets.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/dvd/createpytkwidgets.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** createpytkwidgets.py 18 Mar 2003 20:38:43 -0000 1.3 --- createpytkwidgets.py 30 Apr 2003 18:25:42 -0000 1.4 *************** *** 5,20 **** import pymerase ! # NOTE: Jython can't use the python way to load modules based on their name ! # NOTE: so we have to manually import the modules we're using ! # NOTE: and pass them to pymerase.run ! import pymerase.input.parseXMI ! import pymerase.output.CreatePyTkWidgets if __name__ == "__main__": ! schema = os.path.abspath("./dvd.xmi") outputPath = os.path.abspath("./widgets") ! #pymerase.run(schema, 'parseXMI', output, 'CreateDBAPI') ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreatePyTkWidgets) --- 5,17 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreatePyTkWidgets if __name__ == "__main__": ! schema = os.path.abspath("./dvd.zargo") outputPath = os.path.abspath("./widgets") ! pymerase.run(schema, 'parseXMI', outputPath, 'CreatePyTkWidgets') ! #pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreatePyTkWidgets) Index: createreport.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/dvd/createreport.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** createreport.py 18 Mar 2003 20:38:44 -0000 1.3 --- createreport.py 30 Apr 2003 18:25:42 -0000 1.4 *************** *** 5,15 **** import pymerase ! import pymerase.input.parseXMI ! import pymerase.output.CreateReport if __name__ == "__main__": ! schema = os.path.abspath("./dvd.xmi") outputPath = os.path.abspath("./report.txt") ! ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateReport) --- 5,16 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreateReport if __name__ == "__main__": ! schema = os.path.abspath("./dvd.zargo") outputPath = os.path.abspath("./report.txt") ! ! pymerase.run(schema, "parseXMI", outputPath, "CreateReport") ! #pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateReport) Index: createsql.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/dvd/createsql.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** createsql.py 18 Mar 2003 20:38:46 -0000 1.4 --- createsql.py 30 Apr 2003 18:25:42 -0000 1.5 *************** *** 5,15 **** import pymerase ! import pymerase.input.parseXMI ! import pymerase.output.CreateSQL if __name__ == "__main__": ! schema = os.path.abspath("./dvd.xmi") outputPath = os.path.abspath("./dvd.sql") ! ! pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateSQL) --- 5,16 ---- import pymerase ! #import pymerase.input.parseXMI ! #import pymerase.output.CreateSQL if __name__ == "__main__": ! schema = os.path.abspath("./dvd.zargo") outputPath = os.path.abspath("./dvd.sql") ! ! pymerase.run(schema, "parseXMI", outputPath, "CreateSQL") ! #pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateSQL) --- Makefile DELETED --- |
From: <ki...@us...> - 2003-04-30 17:59:37
|
Update of /cvsroot/pymerase/pymerase/examples/dvd In directory sc8-pr-cvs1:/tmp/cvs-serv32726 Removed Files: createhtml.py Log Message: obsolete --- createhtml.py DELETED --- |
From: <de...@us...> - 2003-04-26 00:00:26
|
Update of /cvsroot/pymerase/pymerase/tests In directory sc8-pr-cvs1:/tmp/cvs-serv9185 Modified Files: TestSchool.py Log Message: Changed schema to seperate person_pk from Uid (which is now an arbitrary application element instead of being tightly tied to the schema. Change names of several functions to conform to whats produced by the UML/XMI parser. Merged in UML/XMI test case since we don't need to be dependent on Jython any longer. Index: TestSchool.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/tests/TestSchool.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TestSchool.py 9 Apr 2003 00:08:47 -0000 1.6 --- TestSchool.py 26 Apr 2003 00:00:19 -0000 1.7 *************** *** 39,46 **** return faculty ! def getEmployee(session, givenName): givenNameQuery = "%s = '%s'" % (givenNameFieldName, givenName) ! employees = session.getObjectsWhere(session.Employees, givenNameQuery) ! return employees --- 39,51 ---- return faculty ! def getEmployees(session, givenName): givenNameQuery = "%s = '%s'" % (givenNameFieldName, givenName) ! employee = session.getObjectsWhere(session.Employees, givenNameQuery) ! return employee ! ! def getStaff(session, givenName): ! givenNameQuery = "%s = '%s'" % (givenNameFieldName, givenName) ! staff = session.getObjectsWhere(session.Staff, givenNameQuery) ! return staff *************** *** 112,115 **** --- 117,149 ---- + def testCreateUML_underscore_API(self): + """Test generating python code from zargo file with the db using underscore_word + """ + self.resetDirectory() + + # Figure out path information + schema = os.path.abspath("./school.zargo") + api_output = os.path.abspath("./school") + sql_output = os.path.abspath("./school.sql") + + # construct pymerase object + translator = pymerase.Pymerase() + #translator.setDefaultPackage("school") + + # set mangler convetion + #mangler = NameMangling.underscore_word() + #translator.setNameMangler(mangler, 'CreateSQL') + + # do the translation + classesInModel={} + parsed_input = translator.read(schema, 'parseXMI', classesInModel) + translator.write(parsed_input, api_output, 'CreateDBAPI') + translator.write(parsed_input, sql_output, 'CreateSQL') + + # one of the later tests needs to know what the actual field name is + global givenNameFieldName + givenNameFieldName="given_name" + + def testCreateCapsAPI(self): """Test generating python api with the sql part using CapWord. *************** *** 172,192 **** # define some faculty ! xavier = s.Faculty() ! xavier.setGivenName('Xavier') ! xavier.setFamilyName('Xal') ! xavier.setStatus('Associate') ! xavier.commit() ! ! yolanda = s.Faculty() ! yolanda.setGivenName('Yolanda') ! yolanda.setFamilyName('Yetti') ! yolanda.setStatus('Visiting') ! yolanda.commit() ! ! zaphod = s.Faculty() ! zaphod.setGivenName('Zaphod') ! zaphod.setFamilyName('Zim') ! zaphod.setStatus('Full') ! zaphod.commit() # define some houses --- 206,218 ---- # define some faculty ! for faculty_values in [('0001', 'Xavier', 'Xal', 'Associate'), ! ('0002', 'Yolanda', 'Yetti', 'Visiting'), ! ('0003', 'Zaphod', 'Zim', 'Full')]: ! f = s.Faculty() ! f.setUid(faculty_values[0]) ! f.setGivenName(faculty_values[1]) ! f.setFamilyName(faculty_values[2]) ! f.setStatus(faculty_values[3]) ! f.commit() # define some houses *************** *** 197,209 **** house.commit() ! for student_values in [('Ann', 'Arbor', 1, 2), ! ('Ben', 'Blartfast', 2, 1), ! ('Charles', 'Cooper', 3, 3), ! ('Daria', 'Darwin', 4, 2),]: student = s.Students() ! student.setGivenName(student_values[0]) ! student.setFamilyName(student_values[1]) ! student.setHouseFk(student_values[2]) ! student.setAdvisorFk(student_values[3]) student.commit() --- 223,238 ---- house.commit() ! for student_values in [('0004', 'Ann', 'Arbor', 1, 2), ! ('0005', 'Ben', 'Blartfast', 2, 1), ! ('0006', 'Charles', 'Cooper', 3, 3), ! ('0007', 'Daria', 'Darwin', 4, 2),]: student = s.Students() ! student.setUid(student_values[0]) ! student.setGivenName(student_values[1]) ! student.setFamilyName(student_values[2]) ! student.setHousesFk(student_values[3]) ! # FIXME: set key link to advisor, this is a bad name ! # but does reflect the base class name ! student.setFacultyFk(student_values[4]) student.commit() *************** *** 213,217 **** for course_value in courses_list: course = s.Courses() ! course.setCode(course_value[0]) course.setDescription(course_value[1]) course.commit() --- 242,246 ---- for course_value in courses_list: course = s.Courses() ! course.setCourseCode(course_value[0]) course.setDescription(course_value[1]) course.commit() *************** *** 221,226 **** ]: c = s.Classes() ! c.setUidFk(class_values[0]) ! c.setCourseFk(class_values[1]) c.setTerm(class_values[2]) c.setGrade(class_values[3]) --- 250,257 ---- ]: c = s.Classes() ! # FIXME: need better way to declare what name the primary key should have ! #c.setUidFk(class_values[0]) ! c.setStudentsFk(class_values[0]) ! c.setCoursesFk(class_values[1]) c.setTerm(class_values[2]) c.setGrade(class_values[3]) *************** *** 228,240 **** ! for employee_value in [('diane', 'trout', 'code monkey'), ! ('kevin', 'cooper', 'lab tech'), ! ('jason', 'stewart', 'software consultant'), ! ('amanda', 'jones', 'music')]: ! employee = s.Employees() ! employee.setGivenName(employee_value[0]) ! employee.setFamilyName(employee_value[1]) ! #employee.setJobDescription(employee_value[2]) ! employee.commit() s.close() --- 259,272 ---- ! for staff_value in [('0008', 'diane', 'trout', 'code monkey'), ! ('0009', 'kevin', 'cooper', 'lab tech'), ! ('0010', 'jason', 'stewart', 'software consultant'), ! ('0011', 'amanda', 'jones', 'music')]: ! staff = s.Staff() ! staff.setUid(staff_value[0]) ! staff.setGivenName(staff_value[1]) ! staff.setFamilyName(staff_value[2]) ! staff.setJobDescription(staff_value[3]) ! staff.commit() s.close() *************** *** 248,253 **** self.failUnless(ann.getGivenName() == 'Ann') self.failUnless(ann.getFamilyName() == 'Arbor') ! self.failUnless(ann.getHouseFk() == 1) ! self.failUnless(ann.getAdvisorFk() == 2) # try to read inherited object via class factory --- 280,285 ---- self.failUnless(ann.getGivenName() == 'Ann') self.failUnless(ann.getFamilyName() == 'Arbor') ! self.failUnless(ann.getHousesFk() == 1) ! self.failUnless(ann.getFacultyFk() == 2) # try to read inherited object via class factory *************** *** 274,278 **** self.failUnless(len(advisors) == 1) ! self.failUnless(advisors[0].getUid() == 2) self.failUnless(advisors[0].getGivenName() == 'Yolanda') self.failUnless(advisors[0].getFamilyName() == 'Yetti') --- 306,310 ---- self.failUnless(len(advisors) == 1) ! self.failUnless(advisors[0].getUid() == '0002') self.failUnless(advisors[0].getGivenName() == 'Yolanda') self.failUnless(advisors[0].getFamilyName() == 'Yetti') *************** *** 307,313 **** #erin = Students(db_session=s) erin = s.Students() erin.setGivenName("Erin") erin.setFamilyName("Ericsson") ! erin.setHouses(houses['page']) faculty['yolanda'].appendStudents(erin) --- 339,346 ---- #erin = Students(db_session=s) erin = s.Students() + erin.setUid('0012') erin.setGivenName("Erin") erin.setFamilyName("Ericsson") ! erin.setHouse(houses['page']) faculty['yolanda'].appendStudents(erin) *************** *** 323,333 **** self.failUnless(erin.getGivenName() == erin_loaded.getGivenName()) self.failUnless(erin.getFamilyName() == erin_loaded.getFamilyName()) ! self.failUnless(erin.getHouseFk() == erin_loaded.getHouseFk()) ! self.failUnless(erin.getAdvisorFk() == erin_loaded.getAdvisorFk()) frederick = s.Students() frederick.setGivenName("Frederick") frederick.setFamilyName("Fergison") ! frederick.setHouses(houses['ricketts']) faculty['zaphod'].appendStudents(frederick) faculty['zaphod'].commit() --- 356,367 ---- self.failUnless(erin.getGivenName() == erin_loaded.getGivenName()) self.failUnless(erin.getFamilyName() == erin_loaded.getFamilyName()) ! self.failUnless(erin.getHousesFk() == erin_loaded.getHousesFk()) ! self.failUnless(erin.getFacultyFk() == erin_loaded.getFacultyFk()) frederick = s.Students() + frederick.setUid('0013') frederick.setGivenName("Frederick") frederick.setFamilyName("Fergison") ! frederick.setHouse(houses['ricketts']) faculty['zaphod'].appendStudents(frederick) faculty['zaphod'].commit() *************** *** 343,348 **** self.failUnless(frederick.getGivenName() == frederick_loaded.getGivenName()) self.failUnless(frederick.getFamilyName()==frederick_loaded.getFamilyName()) ! self.failUnless(frederick.getHouseFk() == frederick_loaded.getHouseFk()) ! self.failUnless(frederick.getAdvisorFk() == frederick_loaded.getAdvisorFk()) s.close() --- 377,382 ---- self.failUnless(frederick.getGivenName() == frederick_loaded.getGivenName()) self.failUnless(frederick.getFamilyName()==frederick_loaded.getFamilyName()) ! self.failUnless(frederick.getHousesFk() == frederick_loaded.getHousesFk()) ! self.failUnless(frederick.getFacultyFk() == frederick_loaded.getFacultyFk()) s.close() *************** *** 366,371 **** frederick = frederick_list[0] ! frederick.setHouses(houses['ricketts']) ! frederick.setHouses(houses['dabney']) frederick.commit() --- 400,405 ---- frederick = frederick_list[0] ! frederick.setHouse(houses['ricketts']) ! frederick.setHouse(houses['dabney']) frederick.commit() *************** *** 400,406 **** def testTreeInsert(self): ! def checkEmployee(session, givenName): ! e = getEmployee(session, givenName) ! self.failUnless(len(e) == 1) return e[0] --- 434,440 ---- def testTreeInsert(self): ! def checkEmployees(session, givenName): ! e = getEmployees(session, givenName) ! self.failUnless(len(e) == 1, "checking for %s" % (givenName)) return e[0] *************** *** 409,417 **** s = school.DBSession(host, database) ! diane = checkEmployee(s, "diane") ! kevin = checkEmployee(s, "kevin") ! jason = checkEmployee(s, "jason") ! amanda = checkEmployee(s, "amanda") ! yolanda = checkEmployee(s, "Yolanda") #yolanda.appendManaged(amanda) --- 443,451 ---- s = school.DBSession(host, database) ! diane = checkEmployees(s, "diane") ! kevin = checkEmployees(s, "kevin") ! jason = checkEmployees(s, "jason") ! amanda = checkEmployees(s, "amanda") ! yolanda = checkEmployees(s, "Yolanda") #yolanda.appendManaged(amanda) *************** *** 436,440 **** s = school.DBSession(host, database) ! yolanda = getEmployee(s, "Yolanda")[0] managedList = yolanda.getManaged() self.failUnless(len(managedList) == 3) --- 470,476 ---- s = school.DBSession(host, database) ! yolanda_list = getEmployees(s, "Yolanda") ! self.failUnless(len(yolanda_list) == 1, str(yolanda_list)) ! yolanda = yolanda_list[0] managedList = yolanda.getManaged() self.failUnless(len(managedList) == 3) *************** *** 449,454 **** self.failUnless(kevinManager.getGivenName() == diane.getGivenName()) ! amanda = filter(lambda x: x.getGivenName() == 'amanda', managedList)[0] ! amandaDirect = getEmployee(s, "amanda")[0] self.failUnless(amanda.getGivenName() == amandaDirect.getGivenName()) self.failUnless(amanda.getFamilyName() == amandaDirect.getFamilyName()) --- 485,492 ---- self.failUnless(kevinManager.getGivenName() == diane.getGivenName()) ! amanda_list = filter(lambda x: x.getGivenName() == 'amanda', managedList) ! self.failUnless(len(amanda_list) == 1, str(amanda_list)) ! amanda = amanda_list[0] ! amandaDirect = getEmployees(s, "amanda")[0] self.failUnless(amanda.getGivenName() == amandaDirect.getGivenName()) self.failUnless(amanda.getFamilyName() == amandaDirect.getFamilyName()) *************** *** 464,467 **** --- 502,506 ---- CreatePyGenexTestCases("testCreate_underscore_API"), CreatePyGenexTestCases("testCreateCapsAPI"), + CreatePyGenexTestCases("testCreateUML_underscore_API"), ] for api in api_tests: *************** *** 484,485 **** --- 523,533 ---- unittest.main(defaultTest="suite") + # NOTES: + # need to change data + # + # Limitations: + # Need to use SQL types in UML model + # String isn't specific enough for defining column sizes + # Associations + # do you always want to link to the classes primary key? + # can you link by some other attribute? |
From: <de...@us...> - 2003-04-25 23:57:51
|
Update of /cvsroot/pymerase/pymerase/pymerase/util In directory sc8-pr-cvs1:/tmp/cvs-serv8395 Modified Files: PymeraseType.py Log Message: Add support for handling varchar types encoded in a UML/XMI file. Index: PymeraseType.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/util/PymeraseType.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PymeraseType.py 18 Jan 2003 01:35:32 -0000 1.11 --- PymeraseType.py 25 Apr 2003 23:57:48 -0000 1.12 *************** *** 96,101 **** def getSQLType(self): ! varchar_match = re.match("varchar\((.*)\)", self.type_string) ! char_match = re.match("char[a-z]*\((.*)\)", self.type_string) if varchar_match is not None: return "character varying(%s)" % varchar_match.group(1) --- 96,101 ---- def getSQLType(self): ! varchar_match = re.match("varchar[\[(]([0-9]*)[\])]", self.type_string) ! char_match = re.match("char[a-z]*[\[(]([0-9]*)[\])]", self.type_string) if varchar_match is not None: return "character varying(%s)" % varchar_match.group(1) *************** *** 120,124 **** # added to handlge XMI java string class elif re.match("[Ss]tring", self.type_string): ! return "varchar(128)" elif re.match("Date", self.type_string) or re.match("Time", self.type_string): return "timestamp with time zone" --- 120,124 ---- # added to handlge XMI java string class elif re.match("[Ss]tring", self.type_string): ! return "text" elif re.match("Date", self.type_string) or re.match("Time", self.type_string): return "timestamp with time zone" |
From: <de...@us...> - 2003-04-25 23:55:41
|
Update of /cvsroot/pymerase/pymerase/pymerase/output In directory sc8-pr-cvs1:/tmp/cvs-serv7697 Modified Files: CreateDBAPI.py Log Message: Got rid of a dead code line that was representitive of how I used to do things. Index: CreateDBAPI.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/output/CreateDBAPI.py,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** CreateDBAPI.py 9 Apr 2003 00:08:46 -0000 1.29 --- CreateDBAPI.py 25 Apr 2003 23:55:36 -0000 1.30 *************** *** 137,141 **** header.append(u"") header.append(u"def getPrimaryKeyName():") - #header.append(u" return '%s'" % (classMetaInfo.getRootClass().getName(SQL_TRANSLATOR_NAME)+"_pk")) header.append(u" return '%s'" % (classMetaInfo.getPrimaryKeyName(SQL_TRANSLATOR_NAME))) header.append(u"") --- 137,140 ---- |
From: <de...@us...> - 2003-04-25 23:53:44
|
Update of /cvsroot/pymerase/pymerase/pymerase/input In directory sc8-pr-cvs1:/tmp/cvs-serv7120 Modified Files: parseXMI.py Log Message: Massive rewrite of XMI to switch to using SMW instead of java/jython based UML readers. Yippie! Index: parseXMI.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/input/parseXMI.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** parseXMI.py 15 Mar 2003 01:34:26 -0000 1.15 --- parseXMI.py 25 Apr 2003 23:53:41 -0000 1.16 *************** *** 1,3 **** ! #!/usr/bin/env jython ########################################################################### # # --- 1,3 ---- ! #!/usr/bin/env python ########################################################################### # # *************** *** 47,53 **** import os import re ! from ru.novosoft import uml ! from javax.xml.parsers import SAXParserFactory from pymerase.ClassMembers import ModelElement --- 47,55 ---- import os import re + import string ! from smw.metamodel import UML14 ! from smw.metamodel import UML13 ! from smw.io import loadModel from pymerase.ClassMembers import ModelElement *************** *** 59,62 **** --- 61,65 ---- from pymerase.util.bool import parseBoolValue from pymerase.util.PymeraseType import PymeraseType + from pymerase.util.NameMangling import RelationalKey from pymerase.output.dbAPI import fkeyTypes *************** *** 110,116 **** def getAttributeName(self, translatorName): if self.attributeName is None: #return "TargetAttributeName" - mangler = self.config.getNameMangler(translatorName) # depending on our multiplicity, determine which key name to --- 113,119 ---- def getAttributeName(self, translatorName): + mangler = self.config.getNameMangler(translatorName) if self.attributeName is None: #return "TargetAttributeName" # depending on our multiplicity, determine which key name to *************** *** 122,129 **** attributeName = self.getType().getRootClass().getName(None)+"_fk" else: ! attributeName = self.attributeName return mangler.mangle(attributeName) ##class XMIClassAttribute(ClassAttribute): ## """Extention of ClassAttribute to keep track of indexed fields --- 125,139 ---- attributeName = self.getType().getRootClass().getName(None)+"_fk" else: ! rkey = RelationalKey() ! if self.getMultiplicity() != fkeyTypes.OneToOne: ! # FIXME: should I just always use the base class name for primary keys? ! attributeName = self.getType().getBasePrimaryKeyName() ! #attributeName = rkey.getPrimaryKey(self.attributeName) ! else: ! attributeName = rkey.getForeignKey(self.attributeName) return mangler.mangle(attributeName) + ##class XMIClassAttribute(ClassAttribute): ## """Extention of ClassAttribute to keep track of indexed fields *************** *** 237,334 **** pass - class xmiReader(uml.xmi.XMIReader): - """Implement interface to default novosoft XMI reader - - (code converted from argouml) - """ - #### - # Utilities to support XMIreader interface - def __init__(self, inputStream=None): - uml.xmi.XMIReader.__init__(self) - saxpf = SAXParserFactory.newInstance() - saxpf.setValidating(0) - saxpf.setNamespaceAware(0) - - self.setParser(saxpf.newSAXParser().getParser()) - - self.getParser().setErrorHandler(self) - self.getParser().setDocumentHandler(self) - self.getParser().setEntityResolver(self) - - self.inputStream = inputStream - self.uml = None - - if self.inputStream is not None: - self.parseStream(inputStream) - - def setErrors(self, errors): - self.errors = errors - - def getErrors(self): - return self.errors - - def setParser(self, parser): - self.parser = parser - - def getParser(self): - return self.parser - - def parseStream(self, inputStream=None): - """parse xmi file - - assuming we have a file name and that we haven't already parsed a file. - """ - if self.uml is not None: - return - - if inputStream is not None: - self.inputStream = inputStream - if self.inputStream is not None: - self.cleanup() - self.getParser().parse(inputStream) - self.performLinking() - - self.uml = self.getParsedModel() - else: - raise ValueError("xmiReader needs an input stream before parsing") - - ##### - # extentions to help deal with parsed xmi/uml files - def getClasses(self): - """Return classes in uml model - """ - return filter(lambda c: isinstance(c, uml.foundation.core.MClass), - self.getModel()) - - def getModel(self): - """Return all ModelElements in model - """ - if self.uml is None: - self.parseStream() - return self.uml.getModelElementContents() - - - def parseXMIMultiplicity(multiplicity, tableName): - """FKeyTypes = self.__parseGenexFKeyType(fkey_type) - - return an 'ennumeration' of key types based off of xml - """ - #print tableName, fkey_type - lower = multiplicity.getLower() - upper = multiplicity.getUpper() - print "%d..%d" %(lower, upper) - if lower == 0 or lower == 1: - if upper == 1: - return fkeyTypes.OneToOne - else: - return fkeyTypes.ManyToOne - elif lower == -1 and upper == -1: - return fkeyTypes.ManyToMany - else: - err_msg = "unsupported fkey (%s) for association %s" % (fkey_type, - tableName) - raise NotImplementedError(err_msg) - - raise ValueError("Bad parse logic") def addForeignKeys(pymeraseConfig, classesInModel): --- 247,250 ---- *************** *** 358,362 **** elif thisEnd.getMultiplicity() != fkeyTypes.OneToOne: # put the key in this end ! fkeyName = otherEndType.getRootClass().getName(None) + "_fk" if thisEndType.getAttributeByName(fkeyName, None) is None: foreignKey = constructForeignKey(pymeraseConfig, --- 274,281 ---- elif thisEnd.getMultiplicity() != fkeyTypes.OneToOne: # put the key in this end ! # FIXME: should we use the association name or the primary key name? ! #fkeyName = otherEndType.getRootClass().getName(None) + "_fk" ! fkeyName = otherEnd.getType().getName(None) + "_fk" ! #fkeyName = thisEnd.getAssociation().getName(None) +"_fk" if thisEndType.getAttributeByName(fkeyName, None) is None: foreignKey = constructForeignKey(pymeraseConfig, *************** *** 369,373 **** # put the key in the other end #fkeyName = thisEndType.getRootClass().getName(None) + "_fk" ! fkeyName = thisEndType.getRootClass().getName(None) + "_fk" if otherEndType.getAttributeByName(fkeyName, None) is None: foreignKey = constructForeignKey(pymeraseConfig, --- 288,295 ---- # put the key in the other end #fkeyName = thisEndType.getRootClass().getName(None) + "_fk" ! # FIXME: should we use the association name or the primary key name? ! #fkeyName = thisEndType.getRootClass().getName(None) + "_fk" ! fkeyName = thisEnd.getType().getName(None) + "_fk" ! #fkeyName = thisEnd.getAssociation().getName(None) +"_fk" if otherEndType.getAttributeByName(fkeyName, None) is None: foreignKey = constructForeignKey(pymeraseConfig, *************** *** 425,577 **** return fkey ! def parseXMIAttribute(pymeraseConfig, classesInModel, attribute): ! name = attribute.getName() ! warn(" Parsing attribute %s" % (name), DebugWarning) ! ! classAttribute = ClassAttribute(pymeraseConfig, name) ! attributeType = attribute.getType() ! classAttribute.setType(PymeraseType(attributeType.getName())) ! # FIXME: What else to set? ! ! return classAttribute ! ! def parseXMIAssociation(pymeraseConfig, classesInModel, classMetaInfo, end): ! thisName = end.getName() ! thisUUID = end.getUUID() ! otherName = end.getOppositeEnd().getName() ! otherUUID = end.getOppositeEnd().getUUID() ! associationName = end.getAssociation().getName() ! associationUUID = end.getAssociation().getUUID() ! ! associationNameTuple = (associationName, thisName, otherName) ! print "parsing association %s (%s, %s)" % associationNameTuple ! warn(" Parsing association %s (%s, %s)" % associationNameTuple, ! DebugWarning) ! # get names of types ! thisEndTypeName = end.getType().getName() ! otherEndTypeName = end.getOppositeEnd().getType().getName() ! ! # get references to type objects from the master class list ! thisEndType = classesInModel.setdefault(thisEndTypeName, ! XMIClassMetaInfo(pymeraseConfig, ! thisEndTypeName)) ! otherEndType = classesInModel.setdefault(otherEndTypeName, ! XMIClassMetaInfo(pymeraseConfig, ! otherEndTypeName)) ! ! ################# ! # make this association end ! # grab a copy of the AssociationEnd from 'this' class if it exists ! # else make a new AssociationEnd ! thisAssociationEnds = thisEndType.getAssociationEnds() ! thisEnd = thisAssociationEnds.setdefault(thisUUID, ! XMIAssociationEnd(pymeraseConfig, ! thisName)) ! # finish setting up this association end ! thisEnd.setUUID(thisUUID) ! thisEnd.setType(thisEndType) ! thisEndType.setAssociationEnd(thisEnd) ! thisEnd.setMultiplicity(parseXMIMultiplicity( ! end.getMultiplicity(), ! thisEndTypeName)) ! thisEnd.setNavigable(end.isNavigable()) ! ######### ! # fill in a minimalist other end ! # grab a copy of the associationEnd from 'other' class if it exists ! # else make a new AssociationEnd ! otherAssociationEnds = otherEndType.getAssociationEnds() ! otherEnd = otherAssociationEnds.setdefault(otherUUID, ! XMIAssociationEnd(pymeraseConfig, ! otherName)) ! otherEnd.setUUID(otherUUID) ! otherEnd.setType(otherEndType) ! otherEnd.setMultiplicity(parseXMIMultiplicity(end.getOppositeEnd().getMultiplicity(), otherEnd.getName(None))) ! otherEndType.setAssociationEnd(otherEnd) ! association = createAssociation(pymeraseConfig, thisEnd, otherEnd, associationName, associationUUID) ! return thisEnd ! ! # teemu xmi parser version ! #classAssociation.setAggregation() ! ! classAssociation.setContainingClass(classMetaInfo) ! classAssociation.setCardinality( ! parseXMICardinality(association['cardinality'], ! name)) ! targetClassName = association['class_name'] ! targetClass = classesInModel.setdefault(targetClassName, ! XMIClassMetaInfo(pymeraseConfig, ! targetClassName)) ! classAssociation.setTargetClass(targetClass) ! # set default class to create ! classToCreateName = association['class_name'] ! classToCreate = classesInModel.setdefault(classToCreateName, ! XMIClassMetaInfo(pymeraseConfig, ! classToCreateName)) ! classAssociation.setClassToCreate(classToCreate) ! classAssociation.setNavigable(association['navigable']) ! return classAssociation ! def parseXMIClass(pymeraseConfig, classesInModel, xmiClass): ! name = xmiClass.getName() ! warn("Parsing class %s" % (name), DebugWarning) - if name == "String": - warn("Skipping String", DebugWarning) - return None ! classMetaInfo = classesInModel.setdefault(name, ! XMIClassMetaInfo(pymeraseConfig, name)) ! classMetaInfo.setAbstract(xmiClass.isAbstract()) ! classMetaInfo.setPackage(xmiClass.getNamespace().getName()) ! # add in all the potential base classes ! for generalization in xmiClass.getGeneralizations(): ! baseClassName = generalization.getParent().getName() ! baseClassRef = classesInModel.setdefault(baseClassName, ! XMIClassMetaInfo(pymeraseConfig, ! baseClassName)) ! classMetaInfo.appendBaseClass(baseClassRef) ! # documentation strings are apparently optional ! # FIXME: why is the documentation a list? ! # FIXME: should I do more than just concatinate the list? ! documentation = xmiClass.getComments() ! if documentation is not None and len(documentation) > 0: ! classMetaInfo.setDescription(string.join(documentation, os.linesep)) ! ! for attribute in xmiClass.getFeatures(): ! if not isinstance(attribute, uml.foundation.core.MAttribute): ! raise ParseError("NSUML Returned a feature that was not a MAttribute") ! classMetaInfo.addAttribute(parseXMIAttribute(pymeraseConfig, ! classesInModel, ! attribute)) ! for association in xmiClass.getAssociationEnds(): ! parseXMIAssociation(pymeraseConfig, ! classesInModel, ! classMetaInfo, ! association) ! # classMetaInfo.addAssociation(parseXMIAssociation(pymeraseConfig, ! # classesInModel, ! # classMetaInfo, ! # association)) ! # ! return classMetaInfo ! def parseXMI(pymeraseConfig, classes, classesInModel): """Convert external UML model to pymerase's model classes. """ for xmiClass in classes: ! parsedClass = parseXMIClass(pymeraseConfig, classesInModel, xmiClass) if parsedClass is not None: classesInModel[parsedClass.getName(None)] = parsedClass --- 347,556 ---- return fkey ! class umlParser: ! def __init__(self, pymeraseConfig): ! self.pymeraseConfig = pymeraseConfig ! ! def parseXMIMultiplicity(self, multiplicity, tableName): ! """FKeyTypes = self.__parseGenexFKeyType(fkey_type) ! return an 'ennumeration' of key types based off of xml ! """ ! #print tableName, fkey_type ! lower = multiplicity.range[0].lower ! upper = multiplicity.range[0].upper ! print "%d..%d" %(lower, upper) ! if lower == 0 or lower == 1: ! if upper == 1: ! return fkeyTypes.OneToOne ! else: ! return fkeyTypes.ManyToOne ! elif lower == -1 and upper == -1: ! return fkeyTypes.ManyToMany ! else: ! err_msg = "unsupported fkey (%s) for association %s" % (fkey_type, ! tableName) ! raise NotImplementedError(err_msg) ! raise ValueError("Bad parse logic") ! ! def parseXMIFeature(self, classesInModel, feature): ! name = feature.name ! warn(" Parsing feature %s" % (name), DebugWarning) ! classFeature = ClassAttribute(self.pymeraseConfig, name) ! attributeType = feature.type ! classFeature.setType(PymeraseType(attributeType.name)) ! # FIXME: What else to set? ! ! return classFeature ! def parseXMIClass(self, classesInModel, xmiClass): ! name = xmiClass.name ! warn("Parsing class %s" % (name), DebugWarning) ! # FIXME: bad hack to ignore garbage provided by NSUML ! # FIXME: perhaps we should ignore things that are part of the java package? ! if name == "String": ! warn("Skipping String", DebugWarning) ! return None ! classMetaInfo = classesInModel.setdefault(name, ! XMIClassMetaInfo(self.pymeraseConfig, name)) ! ! classMetaInfo.setAbstract(xmiClass.isAbstract) ! classMetaInfo.setPackage(xmiClass.namespace.name) ! # add in all the potential base classes ! for generalization in xmiClass.generalization: ! baseClassName = generalization.parent.name ! baseClassRef = classesInModel.setdefault(baseClassName, ! XMIClassMetaInfo(self.pymeraseConfig, ! baseClassName)) ! classMetaInfo.appendBaseClass(baseClassRef) ! ! # documentation strings are apparently optional ! # FIXME: why is the documentation a list? ! # FIXME: should I do more than just concatinate the list? ! documentation = string.join(xmiClass.comment, os.linesep) ! if documentation is not None and len(documentation) > 0: ! classMetaInfo.setDescription(string.join(documentation, os.linesep)) ! for feature in xmiClass.feature: ! #if not isinstance(attribute, uml.foundation.core.MAttribute): ! # raise ParseError("NSUML Returned a feature that was not a MAttribute") ! classMetaInfo.addAttribute(self.parseXMIFeature(classesInModel, feature)) ! for association in self.getAssociationEnds(xmiClass): ! self.parseXMIAssociation(classesInModel, classMetaInfo, association) ! # classMetaInfo.addAssociation(parseXMIAssociation(pymeraseConfig, ! # classesInModel, ! # classMetaInfo, ! # association)) ! # ! return classMetaInfo ! def parseXMIAssociation(self, classesInModel, classMetaInfo, end): ! thisName = end.name ! thisUUID = end.__uniqueID__ ! otherName = self.getOppositeEnd(end).name ! otherUUID = self.getOppositeEnd(end).__uniqueID__ ! associationName = end.association.name ! associationUUID = end.association.__uniqueID__ ! associationNameTuple = (associationName, thisName, otherName) ! warn(" Parsing association %s (%s, %s)" % associationNameTuple, ! DebugWarning) ! ! # get names of types ! thisEndTypeName = self.getEndClassName(end) ! otherEndTypeName = self.getEndClassName(self.getOppositeEnd(end)) ! # get references to type objects from the master class list ! thisEndType = classesInModel.setdefault(thisEndTypeName, ! XMIClassMetaInfo(self.pymeraseConfig, ! thisEndTypeName)) ! otherEndType = classesInModel.setdefault(otherEndTypeName, ! XMIClassMetaInfo(self.pymeraseConfig, ! otherEndTypeName)) ! ! ################# ! # make this association end ! ! # grab a copy of the AssociationEnd from 'this' class if it exists ! # else make a new AssociationEnd ! thisAssociationEnds = thisEndType.getAssociationEnds() ! thisEnd = thisAssociationEnds.setdefault(thisUUID, ! XMIAssociationEnd(self.pymeraseConfig, ! thisName)) ! # finish setting up this association end ! thisEnd.setUUID(thisUUID) ! thisEnd.setType(thisEndType) ! thisEnd.setAttributeName(associationName) ! thisEndType.setAssociationEnd(thisEnd) ! thisEnd.setMultiplicity(self.parseXMIMultiplicity(end.multiplicity, ! thisEndTypeName)) ! thisEnd.setNavigable(end.isNavigable) ! ! ######### ! # fill in a minimalist other end ! ! # grab a copy of the associationEnd from 'other' class if it exists ! # else make a new AssociationEnd ! otherAssociationEnds = otherEndType.getAssociationEnds() ! otherEnd = otherAssociationEnds.setdefault(otherUUID, ! XMIAssociationEnd(self.pymeraseConfig, ! otherName)) ! otherEnd.setUUID(otherUUID) ! otherEnd.setType(otherEndType) ! otherEnd.setAttributeName(associationName) ! otherEnd.setMultiplicity(self.parseXMIMultiplicity(self.getOppositeEnd(end).multiplicity, otherEnd.getName(None))) ! otherEndType.setAssociationEnd(otherEnd) ! ! association = createAssociation(self.pymeraseConfig, ! thisEnd, ! otherEnd, ! associationName, ! associationUUID) ! ! return thisEnd ! def getOppositeEnd(self, associationEnd): ! """Given an association end go find the other end ! """ ! association = associationEnd.association.connection ! for end in association: ! if end is not associationEnd: ! return end ! else: ! raise RuntimeError("Couldn't find opposite end") ! ! ! class uml13Parser(umlParser): ! """Utility functions for accessing a model using UML 1.3 naming conventions ! """ ! def getAssociationEnds(self, xmiClass): ! """Get the list of association ends attached to xmiClass ! """ ! return xmiClass.associationEnd ! ! def getEndClassName(self, associationEnd): ! """Get the name of the Class containing this Association End ! """ ! return associationEnd.type.name ! ! class uml14Parser(umlParser): ! """Utility functions for accessing a model using UML 1.4 naming conventions ! """ ! def getAssociationEnds(self, xmiClass): ! """Get the list of association ends attached to xmiClass ! """ ! return xmiClass.association ! ! def getEndClassName(self, associationEnd): ! """Get the name of the Class containing this Association End ! """ ! return associationEnd.participant.name ! ! ! def parseXMI(pymeraseConfig, model, classesInModel): """Convert external UML model to pymerase's model classes. """ + if isinstance(model, UML14.Model): + umlClass = UML14.Class + uml = uml14Parser(pymeraseConfig) + elif isinstance(model, UML13.Model): + umlClass = UML13.Class + uml = uml13Parser(pymeraseConfig) + else: + raise ValueError("Pymerase only supports UML 1.3 and 1.4 metamodel") + + classes = filter(lambda c: isinstance(c, umlClass), model.ownedElement) + for xmiClass in classes: ! parsedClass = uml.parseXMIClass(classesInModel, xmiClass) if parsedClass is not None: classesInModel[parsedClass.getName(None)] = parsedClass *************** *** 590,597 **** base, ext = os.path.splitext(filename) ! reader = xmiReader(source) ! classes = reader.getClasses() ! objects = parseXMI(pymeraseConfig, classes, classesInModel) return objects --- 569,575 ---- base, ext = os.path.splitext(filename) ! model = loadModel(source) ! objects = parseXMI(pymeraseConfig, model, classesInModel) return objects |
From: <de...@us...> - 2003-04-25 23:52:59
|
Update of /cvsroot/pymerase/pymerase/pymerase/input In directory sc8-pr-cvs1:/tmp/cvs-serv6929 Modified Files: parseGenexSchemaXML.py Log Message: Added code to support tracking some syntax errors in the table.dtd based xml files. Index: parseGenexSchemaXML.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/input/parseGenexSchemaXML.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** parseGenexSchemaXML.py 9 Apr 2003 00:08:46 -0000 1.27 --- parseGenexSchemaXML.py 25 Apr 2003 23:52:56 -0000 1.28 *************** *** 253,259 **** --- 253,261 ---- ERClassMetaInfo(self.pymeraseConfig, cname)) self.currentTable = self.tables.setdefault(cname, erClass) + self.currentTable.setDefined(1) self.currentTable.setName(attributes.get('name', UNDEFINED)) self.currentTable.setType(attributes.get('type', UNDEFINED)) self.currentTable.setDescription(attributes.get('comment', None)) + self.currentTable.appendLocation("Defined in " + self.current_pathname) inherits = attributes.get('inherits_from', None) if not (inherits is None or inherits == u"none"): *************** *** 269,272 **** --- 271,275 ---- ERClassMetaInfo(self.pymeraseConfig, inherits)) + baseRef.appendLocation("Defined as a base class in "+self.current_pathname) self.currentTable.appendBaseClass(baseRef) self.currentTable.setFilename(self.current_pathname) *************** *** 277,280 **** --- 280,284 ---- # General attribute information + classAttribute.setDefined(1) classAttribute.setName(attributes.get('name', UNDEFINED)) classAttribute.setFriendlyName(attributes.get('full_name', UNDEFINED)) *************** *** 324,328 **** ERClassMetaInfo(self.pymeraseConfig, otherTypeName)) ! otherName = attributes.get('foreign_association_name') if otherName is None: --- 328,332 ---- ERClassMetaInfo(self.pymeraseConfig, otherTypeName)) ! otherEndType.appendLocation("Defined as foreign key in " + self.current_pathname) otherName = attributes.get('foreign_association_name') if otherName is None: *************** *** 391,394 **** --- 395,400 ---- self.tables[self.currentTable.getName(None)] = self.currentTable self.currentTable = None + else: + print "syntax error: table %s not defined" % (self.currentTable.getName(None)) *************** *** 406,408 **** parser.parse() ! return parser.tables.values() --- 412,431 ---- parser.parse() ! modelElements = parser.tables.values() ! ! errors = 0 ! for elementName, element in parser.tables.items(): ! if element.getDefined() == 0: ! errors += 1 ! warn(RuntimeWarning, "SyntaxError: %s was not defined" % (element.getName(None))) ! ! if errors > 0: ! raise(SyntaxError, "There were syntax errors found") ! else: ! return modelElements ! ! # FIXME: started working on trying to provide some error handling ! # FIXME: for if elements are misdefined and can't be resolved. ! # FIXME: should just write some ugly test cases, and use that for the testing. ! # FIXME: (Where ugly means all sorts of bad references. Then I can ! # FIXME: try and make sure I output the apporpriate error messages) |
From: <de...@us...> - 2003-04-25 23:51:31
|
Update of /cvsroot/pymerase/pymerase/pymerase In directory sc8-pr-cvs1:/tmp/cvs-serv6486 Modified Files: ClassMembers.py Log Message: Added code to hopefully start tracking location of syntax errors in the XML files. (appendLocation/getLocation setDefined/getDefined) Changed computation of foreign key to be based off of the current class name instead of the base class name which is used to construct the primary key name. Index: ClassMembers.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/ClassMembers.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ClassMembers.py 1 Apr 2003 23:26:00 -0000 1.22 --- ClassMembers.py 25 Apr 2003 23:51:28 -0000 1.23 *************** *** 121,124 **** --- 121,126 ---- self.uuid = None # utility + self.location = [] + self.defined = 0 # ER related *************** *** 159,163 **** --- 161,185 ---- return self.uuid + def appendLocation(self, location): + """Append a location describing where we saw this Element + """ + self.location.append(location) + + def getLocations(self): + """Return list of locations describing where we saw this element + """ + return self.location + + def setDefined(self, flag): + """Indicate if this model element has been fully defined + As opposed to just having been created by a dangling association reference. + """ + self.defined = flag + + def getDefined(self): + """ + """ + return self.defined def __str__(self): return str(self.__dict__) *************** *** 743,750 **** ! def setForeignKeyName(self, keyName): """Set the foreign key name that should be used for this class. """ ! self.foreignKeyName = keyName def getForeignKeyName(self, translatorName): --- 765,782 ---- ! def setForeignKeyName(self, keyName=None): """Set the foreign key name that should be used for this class. """ ! if keyName is None: ! if self.foreignKeyName is None: ! # Construct a primary key object ! self.foreignKeyName = self.name + "_fk" ! self.foreignKeyNameConstructed = 1 ! else: ! self.foreignKeyName = keyName ! ! warn("Setting foreign_key_name: %s" % ( self.foreignKeyName ), ! DebugWarning) ! return self.foreignKeyName def getForeignKeyName(self, translatorName): *************** *** 756,761 **** return mangler.mangle(self.foreignKeyName) elif not self.isRootClass(): ! rootClass = self.getRootClass() ! return rootClass.getForeignKeyName(translatorName) else: primaryKeyName = self.getPrimaryKeyName(translatorName) --- 788,792 ---- return mangler.mangle(self.foreignKeyName) elif not self.isRootClass(): ! return mangler.mangle(self.setForeignKeyName()) else: primaryKeyName = self.getPrimaryKeyName(translatorName) |
From: <de...@us...> - 2003-04-25 23:48:17
|
Update of /cvsroot/pymerase/pymerase/examples/school/schema In directory sc8-pr-cvs1:/tmp/cvs-serv5492 Modified Files: Classes.xml Courses.xml People.xml Students.xml Log Message: small changes to Table.dtd xml schema to make it match up better with what's generated from the UML/XMI model Index: Classes.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Classes.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Classes.xml 5 Apr 2003 00:56:49 -0000 1.6 --- Classes.xml 25 Apr 2003 23:48:12 -0000 1.7 *************** *** 8,27 **** type="serial" comment=""/> ! <column name="uid_fk" ! full_name="uid_fk" type="int4" not_null="true" comment=""/> ! <foreign_key column_id="uid_fk" foreign_table ="People" ! foreign_table_pkey ="Uid" fkey_type ="&fkey_oto;" foreign_association_name="Students"/> ! <column name="course_fk" ! full_name="course_fk" type="int4" not_null="true" comment=""/> ! <foreign_key column_id="course_fk" foreign_table ="Courses" foreign_table_pkey ="course_pk" --- 8,27 ---- type="serial" comment=""/> ! <column name="students_fk" ! full_name="students_fk" type="int4" not_null="true" comment=""/> ! <foreign_key column_id="students_fk" foreign_table ="People" ! foreign_table_pkey ="people_pk" fkey_type ="&fkey_oto;" foreign_association_name="Students"/> ! <column name="courses_fk" ! full_name="courses_fk" type="int4" not_null="true" comment=""/> ! <foreign_key column_id="courses_fk" foreign_table ="Courses" foreign_table_pkey ="course_pk" Index: Courses.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Courses.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Courses.xml 5 Apr 2003 00:56:49 -0000 1.2 --- Courses.xml 25 Apr 2003 23:48:12 -0000 1.3 *************** *** 7,11 **** type="serial" comment=""/> ! <column name="code" full_name="Course Code" type="varchar(64)" --- 7,11 ---- type="serial" comment=""/> ! <column name="course_code" full_name="Course Code" type="varchar(64)" Index: People.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/People.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** People.xml 5 Apr 2003 00:56:49 -0000 1.2 --- People.xml 25 Apr 2003 23:48:12 -0000 1.3 *************** *** 3,9 **** <table name="People" comment="Base class describing a person"> <column name="Uid" full_name="Universal ID" ! type="serial" comment=""/> <column name="GivenName" --- 3,13 ---- <table name="People" comment="Base class describing a person"> + <column name="PeoplePk" + full_name="People Primary Key" + type="serial" + comments=""/> <column name="Uid" full_name="Universal ID" ! type="varchar(8)" comment=""/> <column name="GivenName" *************** *** 15,18 **** type="varchar(64)" comment=""/> ! <primary_key column_id="Uid"/> </table> --- 19,22 ---- type="varchar(64)" comment=""/> ! <primary_key column_id="PeoplePk"/> </table> Index: Students.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Students.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Students.xml 5 Apr 2003 00:56:49 -0000 1.5 --- Students.xml 25 Apr 2003 23:48:12 -0000 1.6 *************** *** 4,23 **** comment="" inherits_from="People"> ! <column name="house_fk" full_name="House" type="int4" comment=""/> ! <foreign_key column_id="house_fk" foreign_table ="Houses" foreign_table_pkey ="house_pk" ! fkey_type ="&fkey_oto;"/> ! <column name="advisor_fk" full_name="Advisor key" type="int4" comment=""/> <!-- FIXME: the orientation code may be wrong --> ! <foreign_key column_id="advisor_fk" foreign_table="Faculty" ! foreign_table_pkey="uid" fkey_type="&fkey_oto;" foreign_association_name="Advisor" --- 4,25 ---- comment="" inherits_from="People"> ! <column name="houses_fk" full_name="House" type="int4" comment=""/> ! <foreign_key column_id="houses_fk" foreign_table ="Houses" foreign_table_pkey ="house_pk" ! fkey_type ="&fkey_oto;" ! foreign_association_name="House" ! local_association_name="Students"/> ! <column name="faculty_fk" full_name="Advisor key" type="int4" comment=""/> <!-- FIXME: the orientation code may be wrong --> ! <foreign_key column_id="faculty_fk" foreign_table="Faculty" ! foreign_table_pkey="people_pk" fkey_type="&fkey_oto;" foreign_association_name="Advisor" |
From: <ki...@us...> - 2003-04-25 20:15:13
|
Update of /cvsroot/pymerase/htdocs/docs In directory sc8-pr-cvs1:/tmp/cvs-serv25658 Modified Files: index.shtml Log Message: updated title Index: index.shtml =================================================================== RCS file: /cvsroot/pymerase/htdocs/docs/index.shtml,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** index.shtml 25 Apr 2003 20:03:37 -0000 1.27 --- index.shtml 25 Apr 2003 20:15:02 -0000 1.28 *************** *** 6,10 **** <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="SHORTCUT ICON" href="/images/pyfav.gif"> ! <title>Pymerase</title> </head> --- 6,10 ---- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="SHORTCUT ICON" href="/images/pyfav.gif"> ! <title>Pymerase - Documenation</title> </head> |
From: <ki...@us...> - 2003-04-25 20:12:41
|
Update of /cvsroot/pymerase/htdocs/docs/pymweb In directory sc8-pr-cvs1:/tmp/cvs-serv24553 Modified Files: index.shtml Log Message: formatting update Index: index.shtml =================================================================== RCS file: /cvsroot/pymerase/htdocs/docs/pymweb/index.shtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.shtml 25 Apr 2003 20:06:15 -0000 1.2 --- index.shtml 25 Apr 2003 20:12:36 -0000 1.3 *************** *** 26,30 **** <a href="https://sourceforge.net/project/showfiles.php?group_id=63836&release_id=154867">pdf</a> ] - Install docs for Pymerase web front end<br> <a href="manual-index.shtml">Pymweb Manual</a> [ <a href="pymweb-manual.html">html</a> | ! <a href="https://sourceforge.net/project/showfiles.php?group_id=63836&release_id=155212">pdf</a> ] - Manual for Pymerase web front end<br> </td> </tr> --- 26,30 ---- <a href="https://sourceforge.net/project/showfiles.php?group_id=63836&release_id=154867">pdf</a> ] - Install docs for Pymerase web front end<br> <a href="manual-index.shtml">Pymweb Manual</a> [ <a href="pymweb-manual.html">html</a> | ! <a href="https://sourceforge.net/project/showfiles.php?group_id=63836&release_id=155212">pdf</a> ] - Manual for Pymerase web front end<br><br> </td> </tr> |
From: <ki...@us...> - 2003-04-25 20:11:26
|
Update of /cvsroot/pymerase/htdocs/docs/pymweb In directory sc8-pr-cvs1:/tmp/cvs-serv24127 Modified Files: pymweb-manual.html Log Message: updated to include figures Index: pymweb-manual.html =================================================================== RCS file: /cvsroot/pymerase/htdocs/docs/pymweb/pymweb-manual.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pymweb-manual.html 25 Apr 2003 19:55:50 -0000 1.1 --- pymweb-manual.html 25 Apr 2003 20:11:21 -0000 1.2 *************** *** 100,104 **** <div class="p"><!----></div> <a name="tth_fIg1"> ! </a> <a href="images/pymweb-front-end.eps">Figure</a> <center>Figure 1: <font color="#0000FF">Pymweb - Pymerase Web Front End</font></center> --- 100,104 ---- <div class="p"><!----></div> <a name="tth_fIg1"> ! </a> <div align="center"><img src="images/pymweb-front-end.jpg"></div> <center>Figure 1: <font color="#0000FF">Pymweb - Pymerase Web Front End</font></center> *************** *** 335,339 **** <div class="p"><!----></div> <a name="tth_fIg2"> ! </a> <a href="images/pymweb-output.eps">Figure</a> <center>Figure 2: <font color="#0000FF">Pymweb - Succesful Output</font></center> --- 335,339 ---- <div class="p"><!----></div> <a name="tth_fIg2"> ! </a> <div align="center"><img src="images/pymweb-output.jpg"></div> <center>Figure 2: <font color="#0000FF">Pymweb - Succesful Output</font></center> |
From: <ki...@us...> - 2003-04-25 20:07:58
|
Update of /cvsroot/pymerase/htdocs/docs/pymweb/images In directory sc8-pr-cvs1:/tmp/cvs-serv22861 Added Files: pymweb-front-end.jpg pymweb-output.jpg Log Message: images for figures --- NEW FILE: pymweb-front-end.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: pymweb-output.jpg --- (This appears to be a binary file; contents omitted.) |
From: <ki...@us...> - 2003-04-25 20:07:36
|
Update of /cvsroot/pymerase/htdocs/docs/pymweb/images In directory sc8-pr-cvs1:/tmp/cvs-serv22764/images Log Message: Directory /cvsroot/pymerase/htdocs/docs/pymweb/images added to the repository |
From: <ki...@us...> - 2003-04-25 20:06:23
|
Update of /cvsroot/pymerase/htdocs/docs/pymweb In directory sc8-pr-cvs1:/tmp/cvs-serv22171 Modified Files: index.shtml Log Message: updated to handle both Pymweb Manual and Install docs Index: index.shtml =================================================================== RCS file: /cvsroot/pymerase/htdocs/docs/pymweb/index.shtml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.shtml 24 Apr 2003 19:12:09 -0000 1.1 --- index.shtml 25 Apr 2003 20:06:15 -0000 1.2 *************** *** 6,10 **** <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="SHORTCUT ICON" href="/images/pyfav.gif"> ! <title>Pymerase - Pymweb</title> </head> --- 6,10 ---- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="SHORTCUT ICON" href="/images/pyfav.gif"> ! <title>Pymerase - Pymweb Documentation</title> </head> *************** *** 19,28 **** <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber2"> <tr> <td width="100%" bgcolor="#6C8AFF"> ! <!--#include virtual="pymweb-install.html"--> </td> </tr> ! </table> ! Last Modified: <!--#echo var="LAST_MODIFIED" --> </td> </tr> --- 19,47 ---- <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber2"> <tr> + <td width="100%" bgcolor="#0033FF"><b>Pymweb Documentation</b></td> + </tr> + <tr> <td width="100%" bgcolor="#6C8AFF"> ! <a href="install-index.shtml">Pymweb Install</a> [ <a href="pymweb-install.html">html</a> | ! <a href="https://sourceforge.net/project/showfiles.php?group_id=63836&release_id=154867">pdf</a> ] - Install docs for Pymerase web front end<br> ! <a href="manual-index.shtml">Pymweb Manual</a> [ <a href="pymweb-manual.html">html</a> | ! <a href="https://sourceforge.net/project/showfiles.php?group_id=63836&release_id=155212">pdf</a> ] - Manual for Pymerase web front end<br> </td> </tr> ! ! <tr> ! <td width="100%" bgcolor="#0033FF"><b>Documentation From CVS</b></td> ! </tr> ! <tr> ! <td width="100%" bgcolor="#6C8AFF"> ! To download the latest and possibly unfinished documentation, ! checkout the Docs module from cvs. Check out the ! <a href="http://pymerase.sf.net/download/">downloads</a> ! page for instructions. ! </td> ! </tr> ! ! </table> ! Last Modified: <!--#echo var="LAST_MODIFIED" --> </td> </tr> |
From: <ki...@us...> - 2003-04-25 20:03:42
|
Update of /cvsroot/pymerase/htdocs/docs In directory sc8-pr-cvs1:/tmp/cvs-serv21173 Modified Files: index.shtml Log Message: Pymweb-Manual update Index: index.shtml =================================================================== RCS file: /cvsroot/pymerase/htdocs/docs/index.shtml,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** index.shtml 24 Apr 2003 19:16:04 -0000 1.26 --- index.shtml 25 Apr 2003 20:03:37 -0000 1.27 *************** *** 34,37 **** --- 34,39 ---- <a href="pymweb/install-index.shtml">Pymweb Install</a> [ <a href="pymweb/pymweb-install.html">html</a> | <a href="https://sourceforge.net/project/showfiles.php?group_id=63836&release_id=154867">pdf</a> ] - Install docs for Pymerase web front end<br> + <a href="pymweb/manual-index.shtml">Pymweb Manual</a> [ <a href="pymweb/pymweb-manual.html">html</a> | + <a href="https://sourceforge.net/project/showfiles.php?group_id=63836&release_id=155212">pdf</a> ] - Manual for Pymerase web front end<br> <a href="input">Input Modules</a> - Documentation about Input Modules<br> |
From: <ki...@us...> - 2003-04-25 19:57:57
|
Update of /cvsroot/pymerase/htdocs/docs/pymweb In directory sc8-pr-cvs1:/tmp/cvs-serv18942 Added Files: manual-index.shtml Log Message: manual index --- NEW FILE: manual-index.shtml --- <html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="SHORTCUT ICON" href="/images/pyfav.gif"> <title>Pymerase - Pymweb Manual</title> </head> <body> <div align="left"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" width="100%"> <!--#include virtual="/menus/docs_menu.shtml" --> <td align="center" valign="top"><br> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber2"> <tr> <td width="100%" bgcolor="#6C8AFF"> <!--#include virtual="pymweb-manual.html"--> </td> </tr> </table> Last Modified: <!--#echo var="LAST_MODIFIED" --> </td> </tr> </table> </div> </body> </html> |
From: <ki...@us...> - 2003-04-25 19:55:58
|
Update of /cvsroot/pymerase/htdocs/docs/pymweb In directory sc8-pr-cvs1:/tmp/cvs-serv18086 Added Files: pymweb-manual.html Log Message: pymweb manual v0.1.2 --- NEW FILE: pymweb-manual.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <meta name="GENERATOR" content="TtH 3.33"> <style type="text/css"> div.p { margin-top: 7pt;}</style> <style type="text/css"><!-- td div.comp { margin-top: -0.6ex; margin-bottom: -1ex;} td div.comb { margin-top: -0.6ex; margin-bottom: -.6ex;} td div.hrcomp { line-height: 0.9; margin-top: -0.8ex; margin-bottom: -1ex;} td div.norm {line-height:normal;} span.roman {font-family: serif; font-style: normal; font-weight: normal;} span.overacc2 {position: relative; left: .8em; top: -1.2ex;} span.overacc1 {position: relative; left: .6em; top: -1.2ex;} --></style> <title>Pymerase Docs - Pymweb Manual</title> <h1 align="center"><font color="#0000FF">Pymerase Docs - Pymweb Manual</font> </h1> <h3 align="center">Brandon King <br /> Copyright © 2003 California Institute of Technology </h3> <h3 align="center">Version 0.1.2<br />Apr 25, 2003 </h3> <div class="p"><!----></div> <h1>Contents </h1><a href="#tth_sEc1" >1 <font color="#0000FF">Introduction</font></a><br /> <a href="#tth_sEc1.1" >1.1 <font color="#0000FF">Description</font></a><br /> <a href="#tth_sEc1.2" >1.2 <font color="#0000FF">Installation</font></a><br /> <a href="#tth_sEc2" >2 <font color="#0000FF">Using Pymweb</font></a><br /> <a href="#tth_sEc2.1" >2.1 <font color="#0000FF">Overview</font></a><br /> <a href="#tth_sEc2.2" >2.2 <font color="#0000FF">Schema</font></a><br /> <a href="#tth_sEc2.2.1" >2.2.1 <font color="#0000FF">UML/XMI</font></a><br /> <a href="#tth_sEc2.2.2" >2.2.2 <font color="#0000FF">table.dtd XML</font></a><br /> <a href="#tth_sEc2.3" >2.3 <font color="#0000FF">Input Module</font></a><br /> <a href="#tth_sEc2.4" >2.4 <font color="#0000FF">Output Module</font></a><br /> <a href="#tth_sEc2.5" >2.5 <font color="#0000FF">Output File/Dir Name</font></a><br /> <a href="#tth_sEc2.5.1" >2.5.1 <font color="#0000FF">CreateDBAPI</font></a><br /> <a href="#tth_sEc2.5.2" >2.5.2 <font color="#0000FF">CreatePyTkWidgets & CreatePyTkDBWidgets</font></a><br /> <a href="#tth_sEc2.6" >2.6 <font color="#0000FF">Compression Type</font></a><br /> <a href="#tth_sEc2.7" >2.7 <font color="#0000FF">Launch</font></a><br /> <a href="#tth_sEc3" >3 <font color="#0000FF">Pymweb Output</font></a><br /> <a href="#tth_sEc3.1" >3.1 <font color="#0000FF">Succesful Output</font></a><br /> <a href="#tth_sEc3.2" >3.2 <font color="#0000FF">Pymweb Failure / Debugging</font></a><br /> <div class="p"><!----></div> <div class="p"><!----></div> <h2><a name="tth_sEc1"> 1</a> <font color="#0000FF">Introduction</font></h2> <h3><a name="tth_sEc1.1"> 1.1</a> <font color="#0000FF">Description</font></h3> Pymweb is a web front end for Pymerase. The goal of Pymweb is to provide a method of allowing multiple people to use Pymerase without having to install Pymerase on their computer. <div class="p"><!----></div> <h3><a name="tth_sEc1.2"> 1.2</a> <font color="#0000FF">Installation</font></h3> You can download directions on how to install and configure Pymweb. You will find the document called "Pymerase Docs - Pymweb Install". <div class="p"><!----></div> <h2><a name="tth_sEc2"> 2</a> <font color="#0000FF">Using Pymweb</font></h2> <h3><a name="tth_sEc2.1"> 2.1</a> <font color="#0000FF">Overview</font></h3> <div class="p"><!----></div> <div class="p"><!----></div> <a name="tth_fIg1"> </a> <a href="images/pymweb-front-end.eps">Figure</a> <center>Figure 1: <font color="#0000FF">Pymweb - Pymerase Web Front End</font></center> <div class="p"><!----></div> If you have installed Pymweb on your local machine you should be able to point your web browser to http://localhost/pymweb.html to begin using Pymerase. <div class="p"><!----></div> In Figure 1, you will find a screenshot of the Pymweb which you can reference as I briefly describe it's use. I will go into more detail in subsequent sections. There a five things you need to provide for Pymerase to work properly. First, you need to provide a schema. Second, choose which input module you would like to use based on the format in which you supplied your schema. Third, you need to decide what you would like to have generated (Output Module). Some examples are SQL for a database, DBAPI for accessing your database, and/or a GUI widget library. Fourth, pick a destination file name or directory name depending on the output module you choose. And last but not least, you should choose what type of compression do you want Pymweb to use on your output file. <div class="p"><!----></div> <h3><a name="tth_sEc2.2"> 2.2</a> <font color="#0000FF">Schema</font></h3> In Pymerase, there are currently two methods you can use for defining a schema; UML or XML. <div class="p"><!----></div> <h4><a name="tth_sEc2.2.1"> 2.2.1</a> <font color="#0000FF">UML/XMI</font></h4><a name="xmi"> </a> If you have decided to use Poseidon UML or ArgoUML, they will provide you with a .zargo file. This file is a gziped file containing a .xmi file which Pymerase knows how to parse. In the current version of Pymerase, you have to extract the .xmi file and provide it to Pymerase for processing. In the near future, you will be able to provide the .zargo file. If you have gzip installed you can use the following command to extract the .zargo file. <pre> gunzip nameOfZargoFile.zargo </pre> Once you have extracted the .xmi file, goto Pymweb in your browser and click on the browse button to the right of the schema input field. Find the .xmi and choose it as your schema. <div class="p"><!----></div> <h4><a name="tth_sEc2.2.2"> 2.2.2</a> <font color="#0000FF">table.dtd XML</font></h4><a name="table.dtd"> </a> If you have decided to use the table.dtd XML format, things will be a little bit more complicate when using Pymweb, but it's still manageable. <div class="p"><!----></div> What you need to do is put all of your table.dtd XML file, for a given schema, in a single directory. You will then need to tar and gzip the the directory that contains the XML files. The .tar.gz file should be of the same name as the folder. For example, if the directory containing the XML is called 'schema', then the .tar.gz file should be called 'schema.tar.gz'. <div class="p"><!----></div> In case I have managed to confuse some people, here is a ficitious directory tree that I will us as an example. <div class="p"><!----></div> <pre> project/ schema/ tableOne.xml tableTwo.xml tableThree.xml </pre> <div class="p"><!----></div> In this example, in order to tar and gzip the files in such a way that Pymweb knows how to handle them, we need to move into the project/ directory. In that directory type the following command. <div class="p"><!----></div> <pre> tar cvzf schema.tar.gz schema/ </pre> <div class="p"><!----></div> Once you have a .tar.gz file, goto Pymweb in your browser and click on the browse button to the right of the schema input field. Find the .tar.gz file and choose it as your schema. <div class="p"><!----></div> <h3><a name="tth_sEc2.3"> 2.3</a> <font color="#0000FF">Input Module</font></h3> Currently you have two choices for an input module. If you made your schema with UML/XMI mentioned in section <a href="#xmi">2.2.1</a>, you choose 'parseXMI'. If you made your schema with the table.dtd XML format mentioned in section <a href="#table.dtd">2.2.2</a>, you choose 'parseGenexSchemaXML'. <div class="p"><!----></div> <h3><a name="tth_sEc2.4"> 2.4</a> <font color="#0000FF">Output Module</font></h3><a name="output"> </a> Here's where the power of Pymerase comes from. You have the choice of many different types of output from Pymerase. It's a modular design, so if Pymerase doesn't have an output module you want or need, you can write it yourself, or submit a feature request on the pymerase web site at http://pymerase.sf.net/. Below is a table of current output modules, a short description, and the type of output file or directory. <div class="p"><!----></div> <table> <tr><td><b>Output Module </td><td><b>Description </td><td><b>Output Format </td></tr> <tr><td>CreateDBAPI </td><td>Python Database API </td><td>Directory (Python Package) </td></tr> <tr><td>CreateGraphvizUML </td><td>UML like diagrams from Graphviz </td><td>File (.dot) </td></tr> <tr><td>CreatePyTkDBWidgets </td><td>Python Tk DBAPI Aware Widgets Lib </td><td>Directory (Python Package) </td></tr> <tr><td>CreatePyTkWidgets </td><td>Python Tk Widget Lib for GUI Building </td><td>Directory (Python Package) </td></tr> <tr><td>CreateReport </td><td>Report text file describing your model </td><td>File (.txt) </td></tr> <tr><td>CreateSQL </td><td>SQL statements for creating a database </td><td>File (.sql) </td></tr> <tr><td>CreateTableXML </td><td>Generates Table.dtd XML files </td><td>Directory (schema/) </td></tr></b></b></b></table> <div class="p"><!----></div> <h3><a name="tth_sEc2.5"> 2.5</a> <font color="#0000FF">Output File/Dir Name</font></h3> Every output module has a different type of output, so you need to give a proper output name for them work correctly. If you take a look at the 'Output' format column in section <a href="#output">2.4</a>, you will see what type of output each module generates. This table should by mostly sufficiant in guiding you in choosing a File or Directory name. Although a few output modules are a little sensitive to the names you choose. Below is more information you will need to know about the output modules and their output. <div class="p"><!----></div> <h4><a name="tth_sEc2.5.1"> 2.5.1</a> <font color="#0000FF">CreateDBAPI</font></h4> CreateDBAPI creates a Python package (directory of python files) that need to know about the name of their package. <div class="p"><!----></div> If you are using UML/XMI, it's currently defined as the namespace, or package. So, if you followed 'Pymerase Docs - ArgoUML for Pymerase', there is a step where you change the name of the namespace. What ever you entered as the name of the namespace, is the name you should use as the output directory name in Pymweb. If you do not do this, you will likely get an error while trying to use the generated DBAPI. <div class="p"><!----></div> If you decided to use table.dtd XML file format, what ever the name of the output directory you choose will be the name of the package. <div class="p"><!----></div> Note: Renaming the generated package directory name without changing any of the Python code may cause an error. The easiest way to rename the package is to regenerate it with the proper name. <div class="p"><!----></div> In future versions of Pymerase, this particular issue should be less of a problem. We plan to implement a 'Package' system which should simplify the output file naming. <div class="p"><!----></div> <h4><a name="tth_sEc2.5.2"> 2.5.2</a> <font color="#0000FF">CreatePyTkWidgets & CreatePyTkDBWidgets</font></h4> CreatePyTkWidgets generates a Python Tkinter library based on your schema. These widgets allow you to write your own custom applications quickly. The Entry Widgets are designed to be sub-classed so you can override their save() and load() functions. Without this, they won't do very much. <div class="p"><!----></div> CreatePyTkDBWidgets generates sub-classed Entry widgets that know how to load and save data to your generated database via the generated DBAPI. To get this widgets to work, you need to put them in the same directory as your file from CreatePyTkWidgets. Also, you need to copy a generated DBAPI package into the widget library directory. Once that is complete you should be able to launch any of the DbEntry widgets and start accessing data from your database. <div class="p"><!----></div> Note: Only one-to-one and many-to-one associations have been implemented in the current CreatePyTkDBWidgets. One-to-many and many-to-many associations need to be implemented before it will be complete. I can still be useful in it's current state, and you can always sub-class the Entry library files to implement your own features. <div class="p"><!----></div> <h3><a name="tth_sEc2.6"> 2.6</a> <font color="#0000FF">Compression Type</font></h3> Pymweb currently offers the following three types of compression. <div class="p"><!----></div> <table> <tr><td><b>Compression </td><td><b>Extraction Command </td></tr> <tr><td>Tar & Gzip </td><td>tar xvzf fileName.tar.gz </td></tr> <tr><td>Zip </td><td>unzip fileName.zip </td></tr> <tr><td>None </td><td>None </td></tr></b></b></table> <div class="p"><!----></div> Tar & Gzip is most common on Linux/Unix based systems. Zip is most common on Windows systems. None is offered to make downloads easier for single file downloads, and for debuging. <div class="p"><!----></div> <h3><a name="tth_sEc2.7"> 2.7</a> <font color="#0000FF">Launch</font></h3> Once you've made your choices, press the submit button and hope for the best. <div class="p"><!----></div> <h2><a name="tth_sEc3"> 3</a> <font color="#0000FF">Pymweb Output</font></h2> <h3><a name="tth_sEc3.1"> 3.1</a> <font color="#0000FF">Succesful Output</font></h3> <div class="p"><!----></div> <div class="p"><!----></div> <a name="tth_fIg2"> </a> <a href="images/pymweb-output.eps">Figure</a> <center>Figure 2: <font color="#0000FF">Pymweb - Succesful Output</font></center> <div class="p"><!----></div> Assuming everything went smoothly, you should get an output like the one showed in Figure 2. Below is a table describing what you should see when Pymweb ran successfully. <div class="p"><!----></div> <table> <tr><td><b>Item </td><td><b>Description </td></tr> <tr><td>Version </td><td>Pymerase and Pymweb CGI script version numebers </td></tr> <tr><td>Session </td><td>Link to session directory for returning and Session ID </td></tr> <tr><td>Input </td><td>Name of input module used </td></tr> <tr><td>Output </td><td>Name of output module used </td></tr> <tr><td>Schema </td><td>Schema file uploaded </td></tr> <tr><td>Destination </td><td>Name of output file or directory </td></tr> <tr><td>Compression </td><td>Compression type used </td></tr> <tr><td>Generation Complete </td><td>Tells you that generation was successful </td></tr> <tr><td>Download </td><td>Link to the generated file </td></tr></b></b></table> <div class="p"><!----></div> <h3><a name="tth_sEc3.2"> 3.2</a> <font color="#0000FF">Pymweb Failure / Debugging</font></h3> I am going to leave this section blank for the time being as I plan to improve debugging and error messages in Pymweb. I don't want to waste my time documenting something that I know is going to be absolete in the near future. <div class="p"><!----></div> For now, if you have any trouble with Pymweb, please join the pymerase-devel mailing list and send an e-mail to the list asking for help. Please visit http://pymerase.sf.net and click on the "Mail Lists" if you wish to join the mailing list. <div class="p"><!----></div> <br /><br /><hr /><small>File translated from T<sub><font size="-1">E</font></sub>X by <a href="http://hutchinson.belmont.ma.us/tth/"> T<sub><font size="-1">T</font></sub>H</a>, version 3.33.<br />On 25 Apr 2003, 12:54.</small> </html> |
From: <ki...@us...> - 2003-04-25 19:42:14
|
Update of /cvsroot/pymerase/Docs/pymweb/images In directory sc8-pr-cvs1:/tmp/cvs-serv12730 Added Files: pymweb-output.eps Log Message: figure for pymweb-manual --- NEW FILE: pymweb-output.eps --- %!PS-Adobe-3.0 EPSF-3.0 %%Creator: GIMP PostScript file plugin V 1.12 by Peter Kirchgessner %%Title: /home/king/proj/docs/pymerase/Docs/pymweb/images/pymweb-output.eps %%CreationDate: Fri Apr 25 12:22:29 2003 %%DocumentData: Clean7Bit %%LanguageLevel: 2 %%Pages: 1 %%BoundingBox: 0 0 591 437 %%EndComments %%BeginProlog % Use own dictionary to avoid conflicts 10 dict begin %%EndProlog %%Page: 1 1 % Translate for offset 0.000028 0.000028 translate % Translate to begin of first scanline 0.000000 436.370079 translate 590.777953 -436.370079 scale [...2958 lines suppressed...] "&L*?i;:Op`q;_"`r*mD`q@@[Z[Qb-CM@HoARo:jou@%kpD*c\L%r[hM;Ws*J]I&r!K#`e`rV%T kJmU[i8hoZM;[gB!/^]q%f_$Ra8^Xaa8^Xa`rKLDJ,~> "&M5_m/#*%<SGe-]8Cr]G^"=QFE2AQp!<\$pDO&eN;1a#QgB:MJ^E]/!LN/*ciKL"kKj6rm,ZLo QgF.e!13]3%f_$Vd/STnd/STnciA#]J,~> s%i^rpA3J8B%koG`0>t/K7\Z)Isl^(p"9=8pE]i&QMB,6U%X&jJ_B>A!MT4>f`@f?kLfm0p>jm- U%[p-!29DF%f_$[g&HQ'g&HQ'f`6P!J,~> !Djni!.b-$!.b-@!!-J(J,~> !Dl%4!.b-$!.b-@!!.%8J,~> s%n7HJH16$JH25@!J"!s~> !Djni@"D^:@"D^U?iX#R~> !Dl%4E.MtZE.MtuDu`^b~> s%n8sJUi<%JUj8@!)S1~> JP^noJP^noR8AD~> JP^noJP^noR8AD~> JP^noJP^noR8AD~> %%EndData showpage %%Trailer end %%EOF |
From: <ki...@us...> - 2003-04-25 19:41:40
|
Update of /cvsroot/pymerase/Docs/pymweb In directory sc8-pr-cvs1:/tmp/cvs-serv12466 Modified Files: pymweb-manual.tex Log Message: Mostly complete Pymweb Manual Index: pymweb-manual.tex =================================================================== RCS file: /cvsroot/pymerase/Docs/pymweb/pymweb-manual.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pymweb-manual.tex 25 Apr 2003 02:12:24 -0000 1.1 --- pymweb-manual.tex 25 Apr 2003 19:41:29 -0000 1.2 *************** *** 28,32 **** \author{Brandon King \\ Copyright \copyright ~2003 California Institute of Technology} ! \date{Version 0.1.1\\\today} \maketitle \thispagestyle{empty} --- 28,32 ---- \author{Brandon King \\ Copyright \copyright ~2003 California Institute of Technology} ! \date{Version 0.1.2\\\today} \maketitle \thispagestyle{empty} *************** *** 161,165 **** --- 161,270 ---- \subsection{\cb Output File/Dir Name} + Every output module has a different type of output, so you need to + give a proper output name for them work correctly. If you take a look + at the 'Output' format column in section \ref{output}, you will see + what type of output each module generates. This table should by mostly + sufficiant in guiding you in choosing a File or Directory + name. Although a few output modules are a little sensitive to the + names you choose. Below is more information you will need to know + about the output modules and their output. + + \subsubsection{\cb CreateDBAPI} + CreateDBAPI creates a Python package (directory of python files) that + need to know about the name of their package. + + If you are using UML/XMI, it's currently defined as the namespace, or + package. So, if you followed 'Pymerase Docs - ArgoUML for Pymerase', + there is a step where you change the name of the namespace. What ever + you entered as the name of the namespace, is the name you should use + as the output directory name in Pymweb. If you do not do this, you + will likely get an error while trying to use the generated DBAPI. + + If you decided to use table.dtd XML file format, what ever the name of + the output directory you choose will be the name of the package. + + Note: Renaming the generated package directory name without changing + any of the Python code may cause an error. The easiest way to rename + the package is to regenerate it with the proper name. + + In future versions of Pymerase, this particular issue should be less + of a problem. We plan to implement a 'Package' system which should + simplify the output file naming. + + \subsubsection{\cb CreatePyTkWidgets \& CreatePyTkDBWidgets} + CreatePyTkWidgets generates a Python Tkinter library based on your + schema. These widgets allow you to write your own custom applications + quickly. The Entry Widgets are designed to be sub-classed so you can + override their save() and load() functions. Without this, they won't + do very much. + + CreatePyTkDBWidgets generates sub-classed Entry widgets that know how + to load and save data to your generated database via the generated + DBAPI. To get this widgets to work, you need to put them in the same + directory as your file from CreatePyTkWidgets. Also, you need to copy + a generated DBAPI package into the widget library directory. Once that + is complete you should be able to launch any of the DbEntry widgets + and start accessing data from your database. + + Note: Only one-to-one and many-to-one associations have been + implemented in the current CreatePyTkDBWidgets. One-to-many and + many-to-many associations need to be implemented before it will be + complete. I can still be useful in it's current state, and you can + always sub-class the Entry library files to implement your own + features. + \subsection{\cb Compression Type} + Pymweb currently offers the following three types of compression. + + \begin{tabular}{ll} + \bf Compression & \bf Extraction Command \\ + Tar \& Gzip & tar xvzf fileName.tar.gz \\ + Zip & unzip fileName.zip \\ + None & None + \end{tabular} + + Tar \& Gzip is most common on Linux/Unix based systems. Zip is most + common on Windows systems. None is offered to make downloads easier + for single file downloads, and for debuging. + + \subsection{\cb Launch} + Once you've made your choices, press the submit button and hope for + the best. + + \section{\cb Pymweb Output} + \subsection{\cb Succesful Output} + + \begin{figure}[h] + \includegraphics[width=\textwidth]{images/pymweb-output.eps} + \caption{\cb Pymweb - Succesful Output} + \end{figure} + + Assuming everything went smoothly, you should get an output like the + one showed in Figure 2. Below is a table describing what you should + see when Pymweb ran successfully. + + \begin{tabular}{ll} + \bf Item & \bf Description \\ + Version & Pymerase and Pymweb CGI script version numebers \\ + Session & Link to session directory for returning and Session ID \\ + Input & Name of input module used \\ + Output & Name of output module used \\ + Schema & Schema file uploaded \\ + Destination & Name of output file or directory \\ + Compression & Compression type used \\ + Generation Complete & Tells you that generation was successful \\ + Download & Link to the generated file \\ + \end{tabular} + + \subsection{\cb Pymweb Failure / Debugging} + I am going to leave this section blank for the time being as I plan to + improve debugging and error messages in Pymweb. I don't want to waste + my time documenting something that I know is going to be absolete in + the near future. + + For now, if you have any trouble with Pymweb, please join the + pymerase-devel mailing list and send an e-mail to the list asking for + help. Please visit http://pymerase.sf.net and click on the ``Mail + Lists'' if you wish to join the mailing list. \end{document} |
From: <ki...@us...> - 2003-04-25 02:13:40
|
Update of /cvsroot/pymerase/Docs/pymweb/images In directory sc8-pr-cvs1:/tmp/cvs-serv10889 Added Files: pymweb-front-end.eps Log Message: Pymweb screenshot --- NEW FILE: pymweb-front-end.eps --- %!PS-Adobe-3.0 EPSF-3.0 %%Creator: GIMP PostScript file plugin V 1.12 by Peter Kirchgessner %%Title: /home/king/proj/docs/pymerase/Docs/pymweb/images/pymweb-front-end.eps %%CreationDate: Thu Apr 24 15:03:53 2003 %%DocumentData: Clean7Bit %%LanguageLevel: 2 %%Pages: 1 %%BoundingBox: 0 0 595 391 %%EndComments %%BeginProlog % Use own dictionary to avoid conflicts 10 dict begin %%EndProlog %%Page: 1 1 % Translate for offset 0.000028 0.000028 translate % Translate to begin of first scanline 0.000000 390.335433 translate 594.614173 -390.335433 scale [...2745 lines suppressed...] "&L*?i;:Op`q;_"`r*mD`q@@[Z[Qb-CM@HoARo:jou@%kpD*c\L%r[hM;Ws*J]Hon!K#`e`rV%T kJmU[i8hoZM;[gB!/^]q%f_$Ra8^Xaa8^Xa`rKLDJ,~> "&M5_m/#*%<SGe-]8Cr]G^"=QFE2AQp!<\$pDO&eN;1a#QgB:MJ^EQ+!LN/*ciKL"kKj6rm,ZLo QgF.e!13]3%f_$Vd/STnd/STnciA#]J,~> s%i^rpA3J8B%koG`0>t/K7\Z)Isl^(p"9=8pE]i&QMB,6U%X&jJ_B2=!MT4>f`@f?kLfm0p>jm- U%[p-!29DF%f_$[g&HQ'g&HQ'f`6P!J,~> !Djni!.b-$!.b-<!!-J(J,~> !Dl%4!.b-$!.b-<!!.%8J,~> s%n7HJH16$JH2)<!J"!s~> !Djni@"D^:@"D^Q?iX#R~> !Dl%4E.MtZE.MtqDu`^b~> s%n8sJUi<%JUj,<!)S1~> JP^noJP^noPu)u~> JP^noJP^noPu)u~> JP^noJP^noPu)u~> %%EndData showpage %%Trailer end %%EOF |
From: <ki...@us...> - 2003-04-25 02:12:45
|
Update of /cvsroot/pymerase/Docs/pymweb/images In directory sc8-pr-cvs1:/tmp/cvs-serv10786/images Log Message: Directory /cvsroot/pymerase/Docs/pymweb/images added to the repository |
From: <ki...@us...> - 2003-04-25 02:12:27
|
Update of /cvsroot/pymerase/Docs/pymweb In directory sc8-pr-cvs1:/tmp/cvs-serv10673 Added Files: pymweb-manual.tex Log Message: First round of documentation for Pymweb, almost complete. --- NEW FILE: pymweb-manual.tex --- % Pymerase Docs - Pymweb Manual % Copyright (c) California Institute of Technology % % Authors: Brandon King % $Revision: 1.1 $ % Modified $Date: 2003/04/25 02:12:24 $ \documentclass{article} \usepackage{graphicx} \usepackage{color} \usepackage[margin=3cm,noheadfoot]{geometry} \setlength{\parindent}{0in} \setlength{\parskip}{2mm} %colors \newcommand{\cb}{\color{blue}} %new commands \newcommand{\pymlink}{http://pymerase.sf.net} %document \begin{document} %title page \begin{titlepage} \title{\cb Pymerase Docs - Pymweb Manual} \author{Brandon King \\ Copyright \copyright ~2003 California Institute of Technology} \date{Version 0.1.1\\\today} \maketitle \thispagestyle{empty} \end{titlepage} \tableofcontents \thispagestyle{empty} \newpage %Document Body \setcounter{page}{1} \section{\cb Introduction} \subsection{\cb Description} Pymweb is a web front end for Pymerase. The goal of Pymweb is to provide a method of allowing multiple people to use Pymerase without having to install Pymerase on their computer. \subsection{\cb Installation} You can download directions on how to install and configure Pymweb. You will find the document called ``Pymerase Docs - Pymweb Install''. \section{\cb Using Pymweb} \subsection{\cb Overview} \begin{figure}[h] \includegraphics[width=\textwidth]{images/pymweb-front-end.eps} \caption{\cb Pymweb - Pymerase Web Front End} \end{figure} If you have installed Pymweb on your local machine you should be able to point your web browser to http://localhost/pymweb.html to begin using Pymerase. In Figure 1, you will find a screenshot of the Pymweb which you can reference as I briefly describe it's use. I will go into more detail in subsequent sections. There a five things you need to provide for Pymerase to work properly. First, you need to provide a schema. Second, choose which input module you would like to use based on the format in which you supplied your schema. Third, you need to decide what you would like to have generated (Output Module). Some examples are SQL for a database, DBAPI for accessing your database, and/or a GUI widget library. Fourth, pick a destination file name or directory name depending on the output module you choose. And last but not least, you should choose what type of compression do you want Pymweb to use on your output file. \subsection{\cb Schema} In Pymerase, there are currently two methods you can use for defining a schema; UML or XML. \subsubsection{\cb UML/XMI}\label{xmi} If you have decided to use Poseidon UML or ArgoUML, they will provide you with a .zargo file. This file is a gziped file containing a .xmi file which Pymerase knows how to parse. In the current version of Pymerase, you have to extract the .xmi file and provide it to Pymerase for processing. In the near future, you will be able to provide the .zargo file. If you have gzip installed you can use the following command to extract the .zargo file. \begin{verbatim} gunzip nameOfZargoFile.zargo \end{verbatim} Once you have extracted the .xmi file, goto Pymweb in your browser and click on the browse button to the right of the schema input field. Find the .xmi and choose it as your schema. \subsubsection{\cb table.dtd XML}\label{table.dtd} If you have decided to use the table.dtd XML format, things will be a little bit more complicate when using Pymweb, but it's still manageable. What you need to do is put all of your table.dtd XML file, for a given schema, in a single directory. You will then need to tar and gzip the the directory that contains the XML files. The .tar.gz file should be of the same name as the folder. For example, if the directory containing the XML is called 'schema', then the .tar.gz file should be called 'schema.tar.gz'. In case I have managed to confuse some people, here is a ficitious directory tree that I will us as an example. \begin{verbatim} project/ schema/ tableOne.xml tableTwo.xml tableThree.xml \end{verbatim} In this example, in order to tar and gzip the files in such a way that Pymweb knows how to handle them, we need to move into the project/ directory. In that directory type the following command. \begin{verbatim} tar cvzf schema.tar.gz schema/ \end{verbatim} Once you have a .tar.gz file, goto Pymweb in your browser and click on the browse button to the right of the schema input field. Find the .tar.gz file and choose it as your schema. \subsection{\cb Input Module} Currently you have two choices for an input module. If you made your schema with UML/XMI mentioned in section \ref{xmi}, you choose 'parseXMI'. If you made your schema with the table.dtd XML format mentioned in section \ref{table.dtd}, you choose 'parseGenexSchemaXML'. \subsection{\cb Output Module}\label{output} Here's where the power of Pymerase comes from. You have the choice of many different types of output from Pymerase. It's a modular design, so if Pymerase doesn't have an output module you want or need, you can write it yourself, or submit a feature request on the pymerase web site at http://pymerase.sf.net/. Below is a table of current output modules, a short description, and the type of output file or directory. \begin{tabular}{lll} \bf Output Module & \bf Description & \bf Output Format \\ CreateDBAPI & Python Database API & Directory (Python Package) \\ CreateGraphvizUML & UML like diagrams from Graphviz & File (.dot) \\ CreatePyTkDBWidgets & Python Tk DBAPI Aware Widgets Lib & Directory (Python Package) \\ CreatePyTkWidgets & Python Tk Widget Lib for GUI Building & Directory (Python Package) \\ CreateReport & Report text file describing your model & File (.txt) \\ CreateSQL & SQL statements for creating a database & File (.sql) \\ CreateTableXML & Generates Table.dtd XML files & Directory (schema/) \end{tabular} \subsection{\cb Output File/Dir Name} \end{document} |
From: <ki...@us...> - 2003-04-25 02:11:54
|
Update of /cvsroot/pymerase/Docs/pymweb In directory sc8-pr-cvs1:/tmp/cvs-serv10554 Modified Files: Makefile Log Message: updated for Pymweb Manual Index: Makefile =================================================================== RCS file: /cvsroot/pymerase/Docs/pymweb/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 23 Apr 2003 23:47:37 -0000 1.1 --- Makefile 25 Apr 2003 02:11:51 -0000 1.2 *************** *** 1,3 **** pymweb-install.pdf: pymweb-install.tex rubber --pdf pymweb-install.tex ! gv pymweb-install.pdf \ No newline at end of file --- 1,12 ---- + all: pymweb-install.pdf pymweb-manual.pdf + pymweb-install.pdf: pymweb-install.tex rubber --pdf pymweb-install.tex ! gv pymweb-install.pdf ! ! pymweb-manual.pdf: pymweb-manual.tex ! latex pymweb-manual.tex ! latex pymweb-manual.tex ! dvips -Ppdf pymweb-manual.dvi ! ps2pdf pymweb-manual.ps ! gv pymweb-manual.pdf \ No newline at end of file |