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
|
|
From: <ki...@us...> - 2003-06-25 19:46:42
|
Update of /cvsroot/pymerase/pymerase/pymerase/output
In directory sc8-pr-cvs1:/tmp/cvs-serv4167
Added Files:
CreateTabDelimitedParser.py
Log Message:
Generates Tab Delimited Text Parser
w/ class that can pickle itself out to disk
w/ class that can save to database using generated DBAPI
Generated Code is documented for useage of the parser.
--- NEW FILE: CreateTabDelimitedParser.py ---
###########################################################################
# #
# C O P Y R I G H T N O T I C E #
# Copyright (c) 2003 by: #
# * California Institute of Technology #
# #
# All Rights Reserved. #
# #
# Permission is hereby granted, free of charge, to any person #
# obtaining a copy of this software and associated documentation files #
# (the "Software"), to deal in the Software without restriction, #
# including without limitation the rights to use, copy, modify, merge, #
# publish, distribute, sublicense, and/or sell copies of the Software, #
# and to permit persons to whom the Software is furnished to do so, #
# subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be #
# included in all copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, #
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF #
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND #
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS #
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN #
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN #
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
###########################################################################
#
# Authors: Brandon King
# Last Modified: $Date: 2003/06/25 19:46:36 $
#
"""Creates a Tab Delimeted File Parser of each Class/Table"""
#Imported System Packages.
import os
import string
import re
from pymerase.ClassMembers import getAllAttributes
from pymerase.ClassMembers import getAllAssociationEnds
from pymerase.util.Warnings import DebugWarning
from pymerase.util.Warnings import InfoWarning
import warnings
from warnings import warn
############################
# Globals
TRANSLATOR_NAME='CreateTabDelimitedParser'
def getTemplate():
template = """#!/usr/bin/env python
###########################################################################
# #
# C O P Y R I G H T N O T I C E #
# Copyright (c) 2003 by: #
# * California Institute of Technology #
# #
# All Rights Reserved. #
# #
# Permission is hereby granted, free of charge, to any person #
# obtaining a copy of this software and associated documentation files #
# (the "Software"), to deal in the Software without restriction, #
# including without limitation the rights to use, copy, modify, merge, #
# publish, distribute, sublicense, and/or sell copies of the Software, #
# and to permit persons to whom the Software is furnished to do so, #
# subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be #
# included in all copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, #
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF #
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND #
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS #
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN #
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN #
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
###########################################################################
#
# Authors: Brandon King
# Generated By: Pymerase (CreateTabDelimitedParser Output Module)
# Generator Last Modified: $Date: 2003/06/25 19:46:36 $
# Generator Revision: $ Revision: $
#
import os
import string
import re
import sys
import pickle
class %CLASSNAME%Record:
\"\"\"
%CLASSNAME% Record Object
Stores one row from a tab delimeted text file
\"\"\"
def __init__(self):
%VAR_INIT%
%FUNCTIONS%
class %CLASSNAME%Master:
\"\"\"
%CLASSNAME% Base container class for record objects
Meant to have save(self) overriden
to provide more functionality.
\"\"\"
def __init__(self):
#List of records that are stored in this container class
self._recordList = []
#Number of columns in data file. Used for error checking
self.numColumns = %NUM_COLUMNS%
def setRecordList(self, rList):
\"\"\"Stores a list of records\"\"\"
self._recordList = rList
def getRecordList(self):
\"\"\"Returns a list of records\"\"\"
return self._recordList
def appendRecord(self, record):
\"\"\"Appends record to list of records\"\"\"
self._recordList.append(record)
def save(self):
\"\"\" Overide to save data somewhere \"\"\"
raise NotImplementedError, 'Not Implemented, Override this Function to save'
class %CLASSNAME%PickleMaster(%CLASSNAME%Master):
\"\"\"
Description:
Overrides %CLASSNAME%Master save function, allowing
the Class to pickle itself to a file. See below for useage.
USE:
parser = %CLASSNAME%Parser(%CLASSNAME%PickleMaster)
obj = parser.parse(fileName)
obj.save(filePath)
\"\"\"
def save(self, filePath):
filePath = os.path.abspath(filePath)
f = open(filePath, 'w')
pickle.dump(self, f)
f.close()
class %CLASSNAME%DbMaster(%CLASSNAME%Master):
\"\"\"
Description:
Overrides %CLASSNAME%Master save function, allowing
the Class to save record objects to a database
USE:
parser = %CLASSNAME%Parser(%CLASSNAME%DbMaster)
obj = parser.parse(fileName)
obj.save('localhost', 'myDatabase', 'myUser', 'myPassword')
\"\"\"
def save(self, dsn, database, user=None, password=None):
#The following line of code only works if you have
# generated %PACKAGE_NAME% using the Pymerase
# CreateDBAPI output module.
from %PACKAGE_NAME% import DBSession
dbs = DBSession(dsn, database, user, password)
for rec in self._recordList:
dbRec = dbs.%CLASSNAME%()
%OM2DB%
dbRec.commit()
class %CLASSNAME%Parser:
\"\"\"
Description:
%CLASSNAMEParser handles the parsing of a %CLASSNAME% tab
delimited file. Pass a class that overrides the save
function from %CLASSNAME%Master class to add more
functionality to the object which is returned from
%CLASSNAME%Parser's 'parse' function.
Example USE:
parser = %CLASSNAME%Parser(%CLASSNAME%DbMaster)
obj = parser.parse(fileName)
obj.save(filePath)
\"\"\"
def __init__(self, MasterClass=%CLASSNAME%Master):
\"\"\"
Pass in a class that has been inherited from %CLASSNAME%Master
to add more functionality to the class which is returned by this
class' parse function.
Uses %CLASSNAME%Master by default.
See %CLASSNAME%PickleMaster and %CLASSNAME%DbMaster classes for examples
\"\"\"
self._masterClass = MasterClass()
def parse(self, filePath, startLine=0):
\"\"\"
Parses text file given by 'filePath' and stores each line
in a %CLASSNAME%Record object and appends it to a %CLASSNAME%Master
object which is chosen when initiating an instance of %CLASSNAME%Parser.
Examples:
parser = %CLASSNAME%Parser(%CLASSNAME%UserDefinedMaster)
OR
parser = %CLASSNAME%Parser(%CLASSNAME%PickleMaster)
OR
parser = %CLASSNAME%Parser(%CLASSNAME%DbMaster)
OR
parser = %CLASSNAME%Parser(%CLASSNAME%Master)
The 'Master Class' you passed to %CLASSNAME%Parser will be returned
when the parse is done.
\"\"\"
filePath = os.path.abspath(filePath)
if os.path.isfile(filePath):
#Open file for parsing
f = open(filePath, 'r')
#Skip lines if requested
if startLine > 0:
for n in range(0, startLine):
f.readline()
#Process Each Line
line = None
while line != '':
line = f.readline()
#Make Sure we are not at last line
if line != '':
#Remove DOS/Windows \\r\\n formating
line = re.sub('\\r\\n', '\\n', line)
#Remove \\n
line = line.strip()
#Break up line into list
line = line.split('\\t')
#Clean up lines
newLine = []
for item in line:
newLine.append(item.strip())
#Check Length of line
if len(newLine) != self._masterClass.numColumns:
raise ValueError, 'Line(%s) is length %s, should be %s.' % (newLine, len(newLine), self._masterClass.numColumns)
#Process Each Record
newRecord = %CLASSNAME%Record()
%NEW_RECORD_PROCESSING%
self._masterClass.appendRecord(newRecord)
return self._masterClass
else:
raise ValueError, 'FilePath %s is invalid!' % (filePath)
if __name__ == '__main__':
if len(sys.argv) > 1:
fileName = sys.argv[1]
parser = %CLASSNAME%Parser()
obj = parser.parse(fileName)
print 'Data Parsed and returned', obj
else:
print 'Please enter name of file to be processed as an argument to this script.'
"""
return template
def getGetterFunction(getterName, attribName):
code = []
code.append(' def %s(self):' % (getterName))
code.append(' return self.%s' % (attribName))
code.append('')
code.append('%FUNCTIONS%')
return string.join(code, '\n')
def getSetterFunction(setterName, attribName, type):
if type == 'types.StringType':
typeConverter = 'str'
elif type == 'types.IntType':
typeConverter = 'int'
elif type == 'types.FloatType':
typeConverter = 'float'
else:
warn('%s type is not being processed. No converting done... May need to be fixed' % (type), DebugWarning)
typeConverter = ''
code = []
code.append(' def %s(self, %s):' % (setterName, attribName))
code.append(' self.%s = %s(%s)' % (attribName, typeConverter, attribName))
code.append('')
code.append('%FUNCTIONS%')
return string.join(code, '\n')
def getNewRecCode(setterName, colNum):
return ' ' * 10 + 'newRecord.%s(newLine[%s])\n%s' % (setterName, colNum, '%NEW_RECORD_PROCESSING%')
def getOm2DbCode(getterName, setterName):
return ' ' * 6 + 'dbRec.%s(rec.%s())\n%s' % (setterName, getterName, '%OM2DB%')
############################
# Writer components
def write(destination, classList):
"""
Create Report in destination dirctory.
"""
code = getTemplate()
#Iterate through the tables/classes and process the data
for cls in classList:
packageName = cls.getPackage()
#Set Class Title Title
code = re.sub('%CLASSNAME%', cls.getName(TRANSLATOR_NAME), code)
#Set Package name for importing
code = re.sub('%PACKAGE_NAME%', packageName, code)
#Get all attributes
attribList = getAllAttributes(classList, cls, TRANSLATOR_NAME)
#Calculate total number of columns for error checking
numCol = (len(attribList) - 1)
#Record number of columns
code = re.sub('%NUM_COLUMNS%', str(numCol), code)
#Setup column counter
colCounter = 0
##Process each attribute in a given table (class)
for attribute in attribList:
attribName = attribute.getName(TRANSLATOR_NAME)
attribType = attribute.getType().getPythonTypeStr()
getterName = attribute.getGetterName(TRANSLATOR_NAME)
setterName = attribute.getSetterName(TRANSLATOR_NAME)
#Skiping Primary Keys
if attribute.isPrimaryKey():
#Skip
pass
else:
#Process
print 'Processing %s' % (attribute.getName(TRANSLATOR_NAME))
#Create Record INIT Variables
code = re.sub('%VAR_INIT%',
' self.%s = None\n%s' % (attribName, '%VAR_INIT%'),
code)
#Create Getter Functions
code = re.sub('%FUNCTIONS%', getGetterFunction(getterName, attribName), code)
#Create Setter Functions
code = re.sub('%FUNCTIONS%', getSetterFunction(setterName, attribName, attribType), code)
#Create New Record Processing
code = re.sub('%NEW_RECORD_PROCESSING%', getNewRecCode(setterName, colCounter), code)
colCounter += 1
#Create Object Modem 2 Database Code
code = re.sub('%OM2DB%', getOm2DbCode(getterName, setterName), code)
#for assocEnd in getAllAssociationEnds(classList, cls, TRANSLATOR_NAME):
# text.append(" ASSOC END:")
# text.append(" Name = %s" % (assocEnd.getName(TRANSLATOR_NAME)))
# text.append(" AttribName = %s" % \
#Clean Up Code
code = re.sub('%VAR_INIT%', '', code)
code = re.sub('%FUNCTIONS%', '', code)
code = re.sub('%NEW_RECORD_PROCESSING%', '', code)
code = re.sub('%OM2DB%', '', code)
#Save Class
f = open(destination, 'w')
f.write(code)
f.close()
warn("Tab Delimited Parser Generation Complete... Good Bye.", InfoWarning)
|
|
From: <ki...@us...> - 2003-06-25 05:39:09
|
Update of /cvsroot/pymerase/pymerase/examples/ncbi
In directory sc8-pr-cvs1:/tmp/cvs-serv6497
Modified Files:
pubmed-test.py
Log Message:
commit first then add to container object
Index: pubmed-test.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/examples/ncbi/pubmed-test.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pubmed-test.py 5 Jun 2003 23:33:32 -0000 1.1
--- pubmed-test.py 25 Jun 2003 05:39:05 -0000 1.2
***************
*** 134,139 ****
myRec.setAbstract(pmRec.abstract)
myRec.setPubmedAccess(pmRec.pubmed_id)
- grpList.appendPubMedRec(myRec)
myRec.commit()
counter += 1
--- 134,139 ----
myRec.setAbstract(pmRec.abstract)
myRec.setPubmedAccess(pmRec.pubmed_id)
myRec.commit()
+ grpList.appendPubMedRec(myRec)
counter += 1
|
|
From: <ki...@us...> - 2003-06-25 05:16:29
|
Update of /cvsroot/pymerase/pymerase/pymerase/output/dbAPI
In directory sc8-pr-cvs1:/tmp/cvs-serv4076
Modified Files:
dbAPI.py
Log Message:
Fix for bug #749872
Now escapes " properly
Now escaping '
field.value was not being processed by sqlEscapeString(), fixed.
Index: dbAPI.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/output/dbAPI/dbAPI.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** dbAPI.py 9 May 2003 19:11:03 -0000 1.24
--- dbAPI.py 25 Jun 2003 05:16:26 -0000 1.25
***************
*** 59,63 ****
"""
if type(s) == types.StringType or type(s) == types.UnicodeType:
! return re.sub('"', '\"', s)
else:
return s
--- 59,65 ----
"""
if type(s) == types.StringType or type(s) == types.UnicodeType:
! s = re.sub('"', '\\\"', s)
! s = re.sub("'", "\\\'", s)
! return s
else:
return s
***************
*** 580,584 ****
update_names_list.append('"'+field.name+'"')
if field.type == types.StringType or field.type == types.UnicodeType:
! update_values_list.append("'%s'" % (field.value))
elif field.type == DateTime.DateTimeType:
update_values_list.append("'%s'" % (str(field.value)))
--- 582,586 ----
update_names_list.append('"'+field.name+'"')
if field.type == types.StringType or field.type == types.UnicodeType:
! update_values_list.append("'%s'" % (sqlEscapeString(field.value)))
elif field.type == DateTime.DateTimeType:
update_values_list.append("'%s'" % (str(field.value)))
|
|
From: <de...@us...> - 2003-06-21 01:35:11
|
Update of /cvsroot/pymerase/pymerase/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv4053
Modified Files:
pymeraseTestSuite.py
Log Message:
Add pubmed test to the full test suite
Index: pymeraseTestSuite.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/tests/pymeraseTestSuite.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pymeraseTestSuite.py 3 Apr 2003 00:43:16 -0000 1.2
--- pymeraseTestSuite.py 21 Jun 2003 01:35:08 -0000 1.3
***************
*** 42,45 ****
--- 42,46 ----
#Import new test suites here
import TestSchool
+ import TestPubMed
def suite():
***************
*** 52,55 ****
--- 53,57 ----
suite.addTest(TestImportAll.suite())
suite.addTest(TestSchool.suite())
+ suite.addTest(TestPubMed.suite())
#add new suite.addTest(module.suite()) here
|
|
From: <de...@us...> - 2003-06-21 01:34:30
|
Update of /cvsroot/pymerase/pymerase/pymerase/input
In directory sc8-pr-cvs1:/tmp/cvs-serv3961
Modified Files:
parseGenexSchemaXML.py
Log Message:
Remap table.dtd references in xml files to the known installed location
Index: parseGenexSchemaXML.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/input/parseGenexSchemaXML.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** parseGenexSchemaXML.py 30 May 2003 00:54:32 -0000 1.29
--- parseGenexSchemaXML.py 21 Jun 2003 01:34:27 -0000 1.30
***************
*** 25,28 ****
--- 25,30 ----
from pymerase.output.dbAPI import fkeyTypes
+ import pymerase.config
+
from xml.sax import sax2exts, saxutils, handler, SAXNotSupportedException, SAXNotRecognizedException
from xml.sax.handler import feature_namespaces
***************
*** 153,160 ****
else:
err_msg = "unsupported fkey (%s) for table %s" % (fkey_type, tableName)
! #raise NotImplementedError(err_msg)
######################################
# Parsing related components
class GenexClassParser(xml.sax.ContentHandler):
def __init__(self, source, pymeraseConfig, classesInModel):
--- 155,173 ----
else:
err_msg = "unsupported fkey (%s) for table %s" % (fkey_type, tableName)
! raise NotImplementedError(err_msg)
######################################
# Parsing related components
+
+ class GenexEntityResolver(xml.sax.handler.EntityResolver):
+ """Attempt to map table.dtd file to a reasonable location
+ """
+ def resolveEntity(self, publicId, systemId):
+ """
+ """
+ if re.search("table\.dtd$", systemId):
+ return pymerase.config.table_dtd
+ return systemId
+
class GenexClassParser(xml.sax.ContentHandler):
def __init__(self, source, pymeraseConfig, classesInModel):
***************
*** 168,171 ****
--- 181,190 ----
self.currentTable = None
+ # create parser
+ self.parser = sax2exts.make_parser()
+ self.parser.setFeature(feature_namespaces, 0)
+ self.parser.setContentHandler(self)
+ self.parser.setEntityResolver(GenexEntityResolver())
+
def parse(self):
"""Read a genex source files and parse into generalized internal
***************
*** 189,193 ****
self.addFile(f)
except NotImplementedError, e:
! warn(e, RuntimeWarninge)
self.resolveForeignKeys()
--- 208,212 ----
self.addFile(f)
except NotImplementedError, e:
! warn(e, RuntimeWarning)
self.resolveForeignKeys()
***************
*** 200,211 ****
"""
self.current_pathname = pathname
- # create parser
-
- parser = sax2exts.make_parser()
- parser.setFeature(feature_namespaces, 0)
- parser.setContentHandler(self)
# parse file
! parser.parse(pathname)
def resolveForeignKeys(self):
--- 219,225 ----
"""
self.current_pathname = pathname
# parse file
! self.parser.parse(pathname)
def resolveForeignKeys(self):
|
Update of /cvsroot/pymerase/pymerase/examples/school/schema
In directory sc8-pr-cvs1:/tmp/cvs-serv3868
Modified Files:
Classes.xml Courses.xml Employees.xml Faculty.xml Houses.xml
People.xml Staff.xml Students.xml
Log Message:
Renamed the SYSTEM table.dtd reference to something that will be updated by
pymerase
Index: Classes.xml
===================================================================
RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Classes.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Classes.xml 25 Apr 2003 23:48:12 -0000 1.7
--- Classes.xml 21 Jun 2003 01:33:44 -0000 1.8
***************
*** 1,4 ****
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:../table.dtd">
<table name="Classes"
type="&linking_table;"
--- 1,4 ----
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:table.dtd">
<table name="Classes"
type="&linking_table;"
Index: Courses.xml
===================================================================
RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Courses.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Courses.xml 25 Apr 2003 23:48:12 -0000 1.3
--- Courses.xml 21 Jun 2003 01:33:44 -0000 1.4
***************
*** 1,4 ****
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:../table.dtd">
<table name="Courses"
comment="">
--- 1,4 ----
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:table.dtd">
<table name="Courses"
comment="">
Index: Employees.xml
===================================================================
RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Employees.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Employees.xml 5 Apr 2003 00:56:49 -0000 1.5
--- Employees.xml 21 Jun 2003 01:33:44 -0000 1.6
***************
*** 1,4 ****
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:../table.dtd">
<table name="Employees"
comment=""
--- 1,4 ----
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:table.dtd">
<table name="Employees"
comment=""
Index: Faculty.xml
===================================================================
RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Faculty.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Faculty.xml 5 Apr 2003 00:56:49 -0000 1.2
--- Faculty.xml 21 Jun 2003 01:33:44 -0000 1.3
***************
*** 1,4 ****
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:../table.dtd">
<table name="Faculty"
comment=""
--- 1,4 ----
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:table.dtd">
<table name="Faculty"
comment=""
Index: Houses.xml
===================================================================
RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Houses.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Houses.xml 5 Apr 2003 00:56:49 -0000 1.2
--- Houses.xml 21 Jun 2003 01:33:44 -0000 1.3
***************
*** 1,4 ****
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:../table.dtd">
<table name="Houses"
comment="">
--- 1,4 ----
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:table.dtd">
<table name="Houses"
comment="">
Index: People.xml
===================================================================
RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/People.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** People.xml 25 Apr 2003 23:48:12 -0000 1.3
--- People.xml 21 Jun 2003 01:33:44 -0000 1.4
***************
*** 1,4 ****
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:../table.dtd">
<table name="People"
comment="Base class describing a person">
--- 1,4 ----
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:table.dtd">
<table name="People"
comment="Base class describing a person">
Index: Staff.xml
===================================================================
RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Staff.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Staff.xml 5 Apr 2003 00:56:49 -0000 1.2
--- Staff.xml 21 Jun 2003 01:33:44 -0000 1.3
***************
*** 1,4 ****
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:../table.dtd">
<table name="Staff"
comment=""
--- 1,4 ----
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:table.dtd">
<table name="Staff"
comment=""
Index: Students.xml
===================================================================
RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Students.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Students.xml 25 Apr 2003 23:48:12 -0000 1.6
--- Students.xml 21 Jun 2003 01:33:44 -0000 1.7
***************
*** 1,4 ****
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:../table.dtd">
<table name="Students"
comment=""
--- 1,4 ----
<?xml version="1.0" standalone="no"?>
! <!DOCTYPE table SYSTEM "file:table.dtd">
<table name="Students"
comment=""
|
|
From: <de...@us...> - 2003-06-21 01:32:41
|
Update of /cvsroot/pymerase/pymerase/examples/school In directory sc8-pr-cvs1:/tmp/cvs-serv3805 Modified Files: school.xmi Log Message: updated school.xmi extract Index: school.xmi =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/school.xmi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** school.xmi 17 Jun 2003 01:19:00 -0000 1.1 --- school.xmi 21 Jun 2003 01:32:38 -0000 1.2 *************** *** 1,783 **** ! <?xml version="1.0" encoding="UTF-8"?> ! <XMI xmi.version="1.0"> ! <XMI.header> ! <XMI.documentation> ! <XMI.exporter>Novosoft UML Library</XMI.exporter> ! <XMI.exporterVersion>0.4.20</XMI.exporterVersion> ! </XMI.documentation> ! <XMI.metamodel xmi.name="UML" xmi.version="1.3"/> ! </XMI.header> ! <XMI.content> [...1659 lines suppressed...] ! <UML:TagDefinition.multiplicity> ! <UML:Multiplicity xmi.id = 'a169'> ! <UML:Multiplicity.range> ! <UML:MultiplicityRange xmi.id = 'a170' lower = '1' upper = '1'/> ! </UML:Multiplicity.range> ! </UML:Multiplicity> ! </UML:TagDefinition.multiplicity> ! </UML:TagDefinition> ! <UML:TagDefinition xmi.id = 'a47' name = 'element.uuid' isSpecification = 'false' ! tagType = 'element.uuid'> ! <UML:TagDefinition.multiplicity> ! <UML:Multiplicity xmi.id = 'a171'> ! <UML:Multiplicity.range> ! <UML:MultiplicityRange xmi.id = 'a172' lower = '1' upper = '1'/> ! </UML:Multiplicity.range> ! </UML:Multiplicity> ! </UML:TagDefinition.multiplicity> ! </UML:TagDefinition> ! </XMI.content> ! </XMI> |
|
From: <de...@us...> - 2003-06-21 01:32:12
|
Update of /cvsroot/pymerase/pymerase/debian In directory sc8-pr-cvs1:/tmp/cvs-serv3719 Modified Files: changelog python2.2-pymerase.install Log Message: Install table.dtd file into known location Describe bug fixes. Index: changelog =================================================================== RCS file: /cvsroot/pymerase/pymerase/debian/changelog,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** changelog 12 May 2003 22:29:26 -0000 1.3 --- changelog 21 Jun 2003 01:32:09 -0000 1.4 *************** *** 1,2 **** --- 1,10 ---- + pymerase (0.1.99.1-1) woldlab; urgency=low + + * Fixed #749853 parseXMI created duplicate classes + * Fixed #713636 AssociationEnd UUIDs none + * Fixed #723919 remap table.dtd XML url to point to installed table.dtd file + + -- Diane Trout <di...@ca...> Thu, 19 Jun 2003 16:46:19 -0700 + pymerase (0.1.99.0-5) woldlab; urgency=low Index: python2.2-pymerase.install =================================================================== RCS file: /cvsroot/pymerase/pymerase/debian/python2.2-pymerase.install,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** python2.2-pymerase.install 27 Feb 2003 01:57:03 -0000 1.1 --- python2.2-pymerase.install 21 Jun 2003 01:32:09 -0000 1.2 *************** *** 1,2 **** usr/bin ! usr/lib \ No newline at end of file --- 1,3 ---- usr/bin ! usr/lib ! usr/share/sgml \ No newline at end of file |
|
From: <de...@us...> - 2003-06-21 01:30:20
|
Update of /cvsroot/pymerase/pymerase
In directory sc8-pr-cvs1:/tmp/cvs-serv3615
Modified Files:
setup.py
Log Message:
Update pymerase.config.table_dtd to point to the installed location of
the table.dtd file
Index: setup.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/setup.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** setup.py 14 Jun 2003 01:24:10 -0000 1.11
--- setup.py 21 Jun 2003 01:30:17 -0000 1.12
***************
*** 36,45 ****
from distutils.core import Extension
import glob
- import shutil
import os
import sys
from ParseCVS import CvsTreeUtil
util = CvsTreeUtil()
--- 36,73 ----
from distutils.core import Extension
import glob
import os
+ import re
+ import string
+ import shutil
import sys
from ParseCVS import CvsTreeUtil
+ def createPackageConfig(dtdFile):
+ if not dtdFile[0:5] in ('file:', 'http:'):
+ dtdFile = 'file:' + dtdFile
+ configFile = open('pymerase/config.py', 'r')
+ configLines = configFile.readlines()
+ configFile.close()
+
+ newConfig = []
+ for l in configLines:
+ if re.match('table_dtd=',l):
+ newConfig.append(re.sub('^table_dtd=.*', 'table_dtd="%s"' % (dtdFile), l))
+ else:
+ newConfig.append(l)
+
+ print string.join(newConfig, '')
+ savePackageConfig(newConfig)
+ return configLines
+
+ def savePackageConfig(configLines):
+ """save the contents of the pyermase.config file
+ """
+ configFile = open('pymerase/config.py', 'w')
+ configFile.write(string.join(configLines, ''))
+ configFile.close()
+
+
util = CvsTreeUtil()
***************
*** 70,73 ****
--- 98,102 ----
binPath = None
docPath = None
+ dtdFile = None
#look for custom command line args
***************
*** 83,86 ****
--- 112,119 ----
rmList.append(item)
+ if item[:10] == '--dtdFile=':
+ dtdFile = item[10:]
+ rmList.append(item)
+
#Remove processed items from sys.argv
for item in rmList:
***************
*** 117,120 ****
--- 150,160 ----
docPath = 'pymerase'
+ if dtdFile is None:
+ if sys.platform == 'win32':
+ dtdFile = '..\\Program Files\\Pymerase\\sgml\\dtd\\table.dtd'
+ else:
+ dtdFile = '/usr/share/sgml/dtd/table.dtd'
+
+
#################################
# Setup Data Files
***************
*** 124,127 ****
--- 164,169 ----
README_TUPLE=(docPath, ['README', 'INSTALL'])
+ DTD_TUPLE=(dtdFile, ['examples/table.dtd'])
+
# ignore this until someone fixes it.
#WEBUTIL_TEMPLATES_TUPLE=(os.path.join(prefix, 'templates/webUtil'),
***************
*** 130,133 ****
--- 172,176 ----
DATA_FILES=[BIN_TUPLE,
README_TUPLE,
+ DTD_TUPLE,
# WEBUTIL_TEMPLATES_TUPLE
]
***************
*** 138,141 ****
--- 181,185 ----
#FIXME: Grabs .cvsignore files, need to add filter
+ oldConfig = createPackageConfig(dtdFile)
#Run setup! =o)
***************
*** 150,151 ****
--- 194,197 ----
packages=PACKAGES,
data_files=DATA_FILES)
+
+ savePackageConfig(oldConfig)
|
|
From: <de...@us...> - 2003-06-21 01:08:55
|
Update of /cvsroot/pymerase/pymerase/pymerase In directory sc8-pr-cvs1:/tmp/cvs-serv1285/pymerase Added Files: config.py Log Message: Store location of table.dtd file to cut down on the numbers of copies that need to be floating around the filesystem. --- NEW FILE: config.py --- ########################################################################### # # # C O P Y R I G H T N O T I C E # # Copyright (c) 2002 by: # # * California Institute of Technology # # # # All Rights Reserved. # # # # Permission is hereby granted, free of charge, to any person # # obtaining a copy of this software and associated documentation files # # (the "Software"), to deal in the Software without restriction, # # including without limitation the rights to use, copy, modify, merge, # # publish, distribute, sublicense, and/or sell copies of the Software, # # and to permit persons to whom the Software is furnished to do so, # # subject to the following conditions: # # # # The above copyright notice and this permission notice shall be # # included in all copies or substantial portions of the Software. # # # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS # # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN # # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # # SOFTWARE. # ########################################################################### # # Author: Diane Trout # Last Modified: $Date: 2003/06/21 01:08:53 $ # # WARNING: this file is modified by the setup.py script, if the script # crashes this file might be corrupted. (Not so bad since currently # it's only one line) import os import pymerase table_dtd=os.path.join(pymerase.__path__[0], '../examples/table.dtd') |
|
From: <de...@us...> - 2003-06-19 22:32:16
|
Update of /cvsroot/pymerase/pymerase/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv6162
Modified Files:
TestSchool.py
Log Message:
Test reading UML13 & 14 files
Moving parsing smw files after the XMI file as for some unknown reason
the parser changes to a state where XMI can't be read.
Index: TestSchool.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/tests/TestSchool.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** TestSchool.py 7 May 2003 21:51:58 -0000 1.8
--- TestSchool.py 19 Jun 2003 22:32:13 -0000 1.9
***************
*** 117,127 ****
! def testCreateUML_underscore_API(self, scehma):
"""Test generating python code from zargo file with the db using underscore_word
"""
self.resetDirectory()
! 22
# Figure out path information
! schema = os.path.abspath("school.smw")
api_output = os.path.abspath("./school")
sql_output = os.path.abspath("./school.sql")
--- 117,127 ----
! def testCreateUML_underscore_API(self, schema):
"""Test generating python code from zargo file with the db using underscore_word
"""
self.resetDirectory()
!
# Figure out path information
! schema = os.path.abspath(schema)
api_output = os.path.abspath("./school")
sql_output = os.path.abspath("./school.sql")
***************
*** 149,155 ****
self.testCreateUML_underscore_API("school.smw")
! def testPoseidonCreateUML_underscore_API(self):
self.testCreateUML_underscore_API("school.xmi")
def testCreateCapsAPI(self):
"""Test generating python api with the sql part using CapWord.
--- 149,158 ----
self.testCreateUML_underscore_API("school.smw")
! def testPoseidon161CreateUML_underscore_API(self):
self.testCreateUML_underscore_API("school.xmi")
+ def testPoseidon141CreateUML_underscore_API(self):
+ self.testCreateUML_underscore_API("schoolPoseidon141_.xmi")
+
def testCreateCapsAPI(self):
"""Test generating python api with the sql part using CapWord.
***************
*** 508,513 ****
CreatePyGenexTestCases("testCreate_underscore_API"),
CreatePyGenexTestCases("testCreateCapsAPI"),
CreatePyGenexTestCases("testSMWCreateUML_underscore_API"),
- CreatePyGenexTestCases("testPoseidonCreateUML_underscore_API"),
]
for api in api_tests:
--- 511,519 ----
CreatePyGenexTestCases("testCreate_underscore_API"),
CreatePyGenexTestCases("testCreateCapsAPI"),
+ CreatePyGenexTestCases("testPoseidon141CreateUML_underscore_API"),
+ CreatePyGenexTestCases("testPoseidon161CreateUML_underscore_API"),
+ # bizarre, if SMW attempts to parse this first
+ # it causes the XMI readers to fail
CreatePyGenexTestCases("testSMWCreateUML_underscore_API"),
]
for api in api_tests:
|
|
From: <de...@us...> - 2003-06-19 22:30:42
|
Update of /cvsroot/pymerase/pymerase/pymerase/input
In directory sc8-pr-cvs1:/tmp/cvs-serv5871
Modified Files:
parseXMI.py
Log Message:
Switch back to using UUIDs for identifying classes
Try to handle parsing UML13 and UML14 files
Index: parseXMI.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/input/parseXMI.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** parseXMI.py 17 Jun 2003 01:11:44 -0000 1.22
--- parseXMI.py 19 Jun 2003 22:30:39 -0000 1.23
***************
*** 377,381 ****
lower = multiplicity.range[0].lower
upper = multiplicity.range[0].upper
- print "%d..%d" %(lower, upper)
if lower == 0 or lower == 1:
if upper == 1:
--- 377,380 ----
***************
*** 535,539 ****
"""Return the unique id of a UML model element
"""
! return model_element.name
--- 534,538 ----
"""Return the unique id of a UML model element
"""
! return model_element.__uniqueID__
***************
*** 579,584 ****
"""Convert external UML model to pymerase's model classes.
"""
! umlClass = UML14.Class
! umlParser = uml14Parser(pymeraseConfig)
classes = filter(lambda c: isinstance(c, umlClass), model.ownedElement)
--- 578,589 ----
"""Convert external UML model to pymerase's model classes.
"""
! if isinstance(model, UML13.Model):
! umlClass = UML13.Class
! umlParser = uml13Parser(pymeraseConfig)
! elif isinstance(model, UML14.Model):
! umlClass = UML14.Class
! umlParser = uml14Parser(pymeraseConfig)
! else:
! raise ValueError("Pymerase only supports UML 1.3 and 1.4 metamodel")
classes = filter(lambda c: isinstance(c, umlClass), model.ownedElement)
***************
*** 589,594 ****
classesInModel[parsedClass.getUUID()] = parsedClass
- pprint.pprint(classesInModel)
- print len(classesInModel)
addForeignKeys(pymeraseConfig, classesInModel)
--- 594,597 ----
***************
*** 604,608 ****
base, ext = os.path.splitext(filename)
! model = loadModel(source, UML14)
objects = parseXMI(pymeraseConfig, model, classesInModel)
--- 607,614 ----
base, ext = os.path.splitext(filename)
! model = loadModel(source)
! #try:
! #except AttributeError, e:
! # model = loadModel(source, UML14)
objects = parseXMI(pymeraseConfig, model, classesInModel)
|
|
From: <ki...@us...> - 2003-06-17 01:28:14
|
Update of /cvsroot/pymerase/pymerase/examples/school
In directory sc8-pr-cvs1:/tmp/cvs-serv5250
Added Files:
createcppapi.py
Log Message:
c++ =o)
--- NEW FILE: createcppapi.py ---
#!/usr/bin/env python
import sys
import os
import pymerase
import pymerase.input.parseGenexSchemaXML
import pymerase.output.CreateCppAPI
if __name__ == "__main__":
schema = os.path.abspath("./schema")
outputPath = os.path.abspath("./CppAPI")
pymerase.run(schema, pymerase.input.parseGenexSchemaXML, outputPath, pymerase.output.CreateCppAPI)
|
|
From: <ki...@us...> - 2003-06-17 01:19:47
|
Update of /cvsroot/pymerase/pymerase/pymerase/output/CppAPI
In directory sc8-pr-cvs1:/tmp/cvs-serv4348
Modified Files:
Templates.py
Log Message:
Added %INCLUDE% to allow class to be aware of other code
Index: Templates.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/output/CppAPI/Templates.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Templates.py 14 Jun 2003 01:23:22 -0000 1.1
--- Templates.py 17 Jun 2003 01:19:44 -0000 1.2
***************
*** 87,90 ****
--- 87,94 ----
#define %CLASS_NAME%_H
+ #include <string>
+ %INCLUDE%
+ using namespace std;
+
class %CLASS_NAME% {
public:
***************
*** 131,135 ****
/////////////////////////////////////////////////////////////////////////////
//
! // Classs: %CLASS_NAME%
// Generated By: Pymerase (CreateCppAPI Output Module)
// URL: http://pymerase.sourceforge.net
--- 135,139 ----
/////////////////////////////////////////////////////////////////////////////
//
! // Class: %CLASS_NAME%
// Generated By: Pymerase (CreateCppAPI Output Module)
// URL: http://pymerase.sourceforge.net
|
|
From: <de...@us...> - 2003-06-17 01:19:05
|
Update of /cvsroot/pymerase/pymerase/examples/school
In directory sc8-pr-cvs1:/tmp/cvs-serv4244
Added Files:
school.xmi
Log Message:
I'm being lazy, this should be being extracted from the .zargo file
however this was easier... this is based on schoolPoseidon141.
--- NEW FILE: school.xmi ---
<?xml version="1.0" encoding="UTF-8"?>
<XMI xmi.version="1.0">
<XMI.header>
<XMI.documentation>
<XMI.exporter>Novosoft UML Library</XMI.exporter>
<XMI.exporterVersion>0.4.20</XMI.exporterVersion>
</XMI.documentation>
<XMI.metamodel xmi.name="UML" xmi.version="1.3"/>
</XMI.header>
<XMI.content>
<Model_Management.Model xmi.id="xmi.1" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-8000">
<Foundation.Core.ModelElement.name>school</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Namespace.ownedElement>
<Model_Management.Package xmi.id="xmi.2" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fff">
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
</Model_Management.Package>
<Foundation.Core.Class xmi.id="xmi.3" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7ffe">
<Foundation.Core.ModelElement.name>People</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.GeneralizableElement.specialization>
<Foundation.Core.Generalization xmi.idref="xmi.4"/>
<Foundation.Core.Generalization xmi.idref="xmi.5"/>
</Foundation.Core.GeneralizableElement.specialization>
<Foundation.Core.Classifier.feature>
<Foundation.Core.Attribute xmi.id="xmi.6" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7ffb">
<Foundation.Core.ModelElement.name>GivenName</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="protected"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope xmi.value="instance"/>
<Foundation.Core.Attribute.initialValue>
<Foundation.Data_Types.Expression xmi.id="xmi.7">
<Foundation.Data_Types.Expression.language>Java</Foundation.Data_Types.Expression.language>
<Foundation.Data_Types.Expression.body></Foundation.Data_Types.Expression.body>
</Foundation.Data_Types.Expression>
</Foundation.Core.Attribute.initialValue>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.3"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.8"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
<Foundation.Core.Attribute xmi.id="xmi.9" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7ffa">
<Foundation.Core.ModelElement.name>FamilyName</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="protected"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope xmi.value="instance"/>
<Foundation.Core.Attribute.initialValue>
<Foundation.Data_Types.Expression xmi.id="xmi.10">
<Foundation.Data_Types.Expression.language>Java</Foundation.Data_Types.Expression.language>
<Foundation.Data_Types.Expression.body></Foundation.Data_Types.Expression.body>
</Foundation.Data_Types.Expression>
</Foundation.Core.Attribute.initialValue>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.3"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.8"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
<Foundation.Core.Attribute xmi.id="xmi.11" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fcf">
<Foundation.Core.ModelElement.name>uid</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="private"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope xmi.value="instance"/>
<Foundation.Core.Attribute.initialValue>
<Foundation.Data_Types.Expression xmi.id="xmi.12">
<Foundation.Data_Types.Expression.language>Java</Foundation.Data_Types.Expression.language>
</Foundation.Data_Types.Expression>
</Foundation.Core.Attribute.initialValue>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.3"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.8"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
</Foundation.Core.Classifier.feature>
</Foundation.Core.Class>
<Foundation.Core.DataType xmi.id="xmi.13">
<Foundation.Core.ModelElement.name>int</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.DataType>
<Model_Management.Package xmi.id="xmi.14">
<Foundation.Core.ModelElement.name>java</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace.ownedElement>
<Model_Management.Package xmi.id="xmi.15">
<Foundation.Core.ModelElement.name>lang</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.14"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace.ownedElement>
<Foundation.Core.Class xmi.id="xmi.8">
<Foundation.Core.ModelElement.name>String</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.15"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.Class>
<Foundation.Core.DataType xmi.id="xmi.16">
<Foundation.Core.ModelElement.name>short</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.15"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.DataType>
<Foundation.Core.DataType xmi.id="xmi.17">
<Foundation.Core.ModelElement.name>float</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.15"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.DataType>
<Foundation.Core.Class xmi.id="xmi.18">
<Foundation.Core.ModelElement.name>Char</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.15"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.Class>
<Foundation.Core.DataType xmi.id="xmi.19">
<Foundation.Core.ModelElement.name>char</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.15"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.DataType>
<Foundation.Core.DataType xmi.id="xmi.20">
<Foundation.Core.ModelElement.name>double</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.15"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.DataType>
</Foundation.Core.Namespace.ownedElement>
</Model_Management.Package>
<Model_Management.Package xmi.id="xmi.21">
<Foundation.Core.ModelElement.name>util</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.14"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace.ownedElement>
<Foundation.Core.Interface xmi.id="xmi.22">
<Foundation.Core.ModelElement.name>Set</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.21"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.Interface>
<Foundation.Core.Class xmi.id="xmi.23">
<Foundation.Core.ModelElement.name>Date</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.21"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.Class>
</Foundation.Core.Namespace.ownedElement>
</Model_Management.Package>
</Foundation.Core.Namespace.ownedElement>
</Model_Management.Package>
<Foundation.Core.Class xmi.id="xmi.24" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7ff9">
<Foundation.Core.ModelElement.name>Students</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.GeneralizableElement.generalization>
<Foundation.Core.Generalization xmi.idref="xmi.4"/>
</Foundation.Core.GeneralizableElement.generalization>
</Foundation.Core.Class>
<Foundation.Core.Class xmi.id="xmi.25" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7ff8">
<Foundation.Core.ModelElement.name>Faculty</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.GeneralizableElement.generalization>
<Foundation.Core.Generalization xmi.idref="xmi.26"/>
</Foundation.Core.GeneralizableElement.generalization>
<Foundation.Core.Classifier.feature>
<Foundation.Core.Attribute xmi.id="xmi.27" xmi.uuid="-125--41-34--33-4655a:f1848f6026:-7fff">
<Foundation.Core.ModelElement.name>Status</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="private"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope xmi.value="instance"/>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.25"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.8"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
</Foundation.Core.Classifier.feature>
</Foundation.Core.Class>
<Foundation.Core.DataType xmi.id="xmi.28">
<Foundation.Core.ModelElement.name>void</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.DataType>
<Foundation.Core.Generalization xmi.id="xmi.4" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fef">
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Generalization.child>
<Foundation.Core.GeneralizableElement xmi.idref="xmi.24"/>
</Foundation.Core.Generalization.child>
<Foundation.Core.Generalization.parent>
<Foundation.Core.GeneralizableElement xmi.idref="xmi.3"/>
</Foundation.Core.Generalization.parent>
</Foundation.Core.Generalization>
<Foundation.Core.Association xmi.id="xmi.29" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fe1">
<Foundation.Core.ModelElement.name>Advisors</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Association.connection>
<Foundation.Core.AssociationEnd xmi.id="xmi.30" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fe0">
<Foundation.Core.ModelElement.name>Advisor</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.ordering xmi.value="unordered"/>
<Foundation.Core.AssociationEnd.aggregation xmi.value="none"/>
<Foundation.Core.AssociationEnd.targetScope xmi.value="instance"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.id="xmi.31">
<Foundation.Data_Types.Multiplicity.range>
<Foundation.Data_Types.MultiplicityRange xmi.id="xmi.32">
<Foundation.Data_Types.MultiplicityRange.lower>0</Foundation.Data_Types.MultiplicityRange.lower>
<Foundation.Data_Types.MultiplicityRange.upper>1</Foundation.Data_Types.MultiplicityRange.upper>
</Foundation.Data_Types.MultiplicityRange>
</Foundation.Data_Types.Multiplicity.range>
</Foundation.Data_Types.Multiplicity>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.changeability xmi.value="changeable"/>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.29"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.25"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
<Foundation.Core.AssociationEnd xmi.id="xmi.33" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fdf">
<Foundation.Core.ModelElement.name>Students</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.id="xmi.34">
<Foundation.Data_Types.Multiplicity.range>
<Foundation.Data_Types.MultiplicityRange xmi.id="xmi.35">
<Foundation.Data_Types.MultiplicityRange.lower>0</Foundation.Data_Types.MultiplicityRange.lower>
<Foundation.Data_Types.MultiplicityRange.upper>-1</Foundation.Data_Types.MultiplicityRange.upper>
</Foundation.Data_Types.MultiplicityRange>
</Foundation.Data_Types.Multiplicity.range>
</Foundation.Data_Types.Multiplicity>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.29"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.24"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
</Foundation.Core.Association.connection>
</Foundation.Core.Association>
<Foundation.Core.Class xmi.id="xmi.36" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fde">
<Foundation.Core.ModelElement.name>Houses</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Classifier.feature>
<Foundation.Core.Attribute xmi.id="xmi.37" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fd2">
<Foundation.Core.ModelElement.name>HouseName</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="private"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope xmi.value="instance"/>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.36"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.8"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
</Foundation.Core.Classifier.feature>
</Foundation.Core.Class>
<Foundation.Core.Class xmi.id="xmi.38" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fdd">
<Foundation.Core.ModelElement.name>Classes</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Classifier.feature>
<Foundation.Core.Attribute xmi.id="xmi.39" xmi.uuid="-125--41-34--33-4655a:f1848f6026:-7ffe">
<Foundation.Core.ModelElement.name>Grade</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Attribute.initialValue>
<Foundation.Data_Types.Expression xmi.id="xmi.40">
<Foundation.Data_Types.Expression.language>Java</Foundation.Data_Types.Expression.language>
<Foundation.Data_Types.Expression.body></Foundation.Data_Types.Expression.body>
</Foundation.Data_Types.Expression>
</Foundation.Core.Attribute.initialValue>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.38"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.17"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
<Foundation.Core.Attribute xmi.id="xmi.41" xmi.uuid="-125--41-34--33-4655a:f1848f6026:-7ffb">
<Foundation.Core.ModelElement.name>Term</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope xmi.value="instance"/>
<Foundation.Core.Attribute.initialValue>
<Foundation.Data_Types.Expression xmi.id="xmi.42">
<Foundation.Data_Types.Expression.language>Java</Foundation.Data_Types.Expression.language>
<Foundation.Data_Types.Expression.body></Foundation.Data_Types.Expression.body>
</Foundation.Data_Types.Expression>
</Foundation.Core.Attribute.initialValue>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.38"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.23"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
</Foundation.Core.Classifier.feature>
</Foundation.Core.Class>
<Foundation.Core.Class xmi.id="xmi.43" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fdc">
<Foundation.Core.ModelElement.name>Courses</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Classifier.feature>
<Foundation.Core.Attribute xmi.id="xmi.44" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fcc">
<Foundation.Core.ModelElement.name>CourseCode</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="protected"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope xmi.value="instance"/>
<Foundation.Core.Attribute.initialValue>
<Foundation.Data_Types.Expression xmi.id="xmi.45">
<Foundation.Data_Types.Expression.language>Java</Foundation.Data_Types.Expression.language>
<Foundation.Data_Types.Expression.body></Foundation.Data_Types.Expression.body>
</Foundation.Data_Types.Expression>
</Foundation.Core.Attribute.initialValue>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.43"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.8"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
<Foundation.Core.Attribute xmi.id="xmi.46" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fcb">
<Foundation.Core.ModelElement.name>Description</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="protected"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope xmi.value="instance"/>
<Foundation.Core.Attribute.initialValue>
<Foundation.Data_Types.Expression xmi.id="xmi.47">
<Foundation.Data_Types.Expression.language>Java</Foundation.Data_Types.Expression.language>
<Foundation.Data_Types.Expression.body></Foundation.Data_Types.Expression.body>
</Foundation.Data_Types.Expression>
</Foundation.Core.Attribute.initialValue>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.43"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.8"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
</Foundation.Core.Classifier.feature>
</Foundation.Core.Class>
<Foundation.Core.Association xmi.id="xmi.48" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fd8">
<Foundation.Core.ModelElement.name>ClassesTaken</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Association.connection>
<Foundation.Core.AssociationEnd xmi.id="xmi.49" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fd7">
<Foundation.Core.ModelElement.name>Students</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.ordering xmi.value="unordered"/>
<Foundation.Core.AssociationEnd.aggregation xmi.value="none"/>
<Foundation.Core.AssociationEnd.targetScope xmi.value="instance"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.id="xmi.50">
<Foundation.Data_Types.Multiplicity.range>
<Foundation.Data_Types.MultiplicityRange xmi.id="xmi.51">
<Foundation.Data_Types.MultiplicityRange.lower>1</Foundation.Data_Types.MultiplicityRange.lower>
<Foundation.Data_Types.MultiplicityRange.upper>1</Foundation.Data_Types.MultiplicityRange.upper>
</Foundation.Data_Types.MultiplicityRange>
</Foundation.Data_Types.Multiplicity.range>
</Foundation.Data_Types.Multiplicity>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.changeability xmi.value="changeable"/>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.48"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.24"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
<Foundation.Core.AssociationEnd xmi.id="xmi.52" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fd6">
<Foundation.Core.ModelElement.name>Classes</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.aggregation xmi.value="none"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.idref="xmi.34"/>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.48"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.38"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
</Foundation.Core.Association.connection>
</Foundation.Core.Association>
<Foundation.Core.Association xmi.id="xmi.53" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fd5">
<Foundation.Core.ModelElement.name>CourseDescription</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Association.connection>
<Foundation.Core.AssociationEnd xmi.id="xmi.54" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fd4">
<Foundation.Core.ModelElement.name>Classes</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.ordering xmi.value="unordered"/>
<Foundation.Core.AssociationEnd.aggregation xmi.value="none"/>
<Foundation.Core.AssociationEnd.targetScope xmi.value="instance"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.idref="xmi.34"/>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.changeability xmi.value="changeable"/>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.53"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.38"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
<Foundation.Core.AssociationEnd xmi.id="xmi.55" xmi.uuid="-125--41-34-25-2cf37baf:ee385730bd:-7fd3">
<Foundation.Core.ModelElement.name>Courses</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.idref="xmi.50"/>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.53"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.43"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
</Foundation.Core.Association.connection>
</Foundation.Core.Association>
<Foundation.Core.Association xmi.id="xmi.56" xmi.uuid="-125--41-34-25-45df4394:ee387826e9:-7ffd">
<Foundation.Core.ModelElement.name>Housing</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Association.connection>
<Foundation.Core.AssociationEnd xmi.id="xmi.57" xmi.uuid="-125--41-34-25-45df4394:ee387826e9:-7ffc">
<Foundation.Core.ModelElement.name>Students</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.ordering xmi.value="unordered"/>
<Foundation.Core.AssociationEnd.aggregation xmi.value="none"/>
<Foundation.Core.AssociationEnd.targetScope xmi.value="instance"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.idref="xmi.34"/>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.changeability xmi.value="changeable"/>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.56"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.24"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
<Foundation.Core.AssociationEnd xmi.id="xmi.58" xmi.uuid="-125--41-34-25-45df4394:ee387826e9:-7ffb">
<Foundation.Core.ModelElement.name>House</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.idref="xmi.31"/>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.56"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.36"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
</Foundation.Core.Association.connection>
</Foundation.Core.Association>
<Foundation.Core.Class xmi.id="xmi.59" xmi.uuid="-125--41-34-25--2de64a9c:eecda921bb:-7ffb">
<Foundation.Core.ModelElement.name>Employees</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.GeneralizableElement.generalization>
<Foundation.Core.Generalization xmi.idref="xmi.5"/>
</Foundation.Core.GeneralizableElement.generalization>
<Foundation.Core.GeneralizableElement.specialization>
<Foundation.Core.Generalization xmi.idref="xmi.60"/>
<Foundation.Core.Generalization xmi.idref="xmi.26"/>
</Foundation.Core.GeneralizableElement.specialization>
<Foundation.Core.Classifier.feature>
<Foundation.Core.Attribute xmi.id="xmi.61" xmi.uuid="-125--41-34--33-4655a:f1848f6026:-7ffd">
<Foundation.Core.ModelElement.name>Salary</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Attribute.initialValue>
<Foundation.Data_Types.Expression xmi.id="xmi.62">
<Foundation.Data_Types.Expression.language>Java</Foundation.Data_Types.Expression.language>
<Foundation.Data_Types.Expression.body></Foundation.Data_Types.Expression.body>
</Foundation.Data_Types.Expression>
</Foundation.Core.Attribute.initialValue>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.59"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.17"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
</Foundation.Core.Classifier.feature>
</Foundation.Core.Class>
<Foundation.Core.Class xmi.id="xmi.63" xmi.uuid="-125--41-34-25--2de64a9c:eecda921bb:-7ffa">
<Foundation.Core.ModelElement.name>Staff</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.GeneralizableElement.generalization>
<Foundation.Core.Generalization xmi.idref="xmi.60"/>
</Foundation.Core.GeneralizableElement.generalization>
<Foundation.Core.Classifier.feature>
<Foundation.Core.Attribute xmi.id="xmi.64" xmi.uuid="-125--41-34--33-4655a:f1848f6026:-7ffc">
<Foundation.Core.ModelElement.name>JobDescription</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Attribute.initialValue>
<Foundation.Data_Types.Expression xmi.id="xmi.65">
<Foundation.Data_Types.Expression.language>Java</Foundation.Data_Types.Expression.language>
<Foundation.Data_Types.Expression.body></Foundation.Data_Types.Expression.body>
</Foundation.Data_Types.Expression>
</Foundation.Core.Attribute.initialValue>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.63"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.8"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
</Foundation.Core.Classifier.feature>
</Foundation.Core.Class>
<Foundation.Core.Generalization xmi.id="xmi.60" xmi.uuid="-125--41-34-25--2de64a9c:eecda921bb:-7ff9">
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Generalization.child>
<Foundation.Core.GeneralizableElement xmi.idref="xmi.63"/>
</Foundation.Core.Generalization.child>
<Foundation.Core.Generalization.parent>
<Foundation.Core.GeneralizableElement xmi.idref="xmi.59"/>
</Foundation.Core.Generalization.parent>
</Foundation.Core.Generalization>
<Foundation.Core.Generalization xmi.id="xmi.26" xmi.uuid="-125--41-34-25--2de64a9c:eecda921bb:-7ff8">
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Generalization.child>
<Foundation.Core.GeneralizableElement xmi.idref="xmi.25"/>
</Foundation.Core.Generalization.child>
<Foundation.Core.Generalization.parent>
<Foundation.Core.GeneralizableElement xmi.idref="xmi.59"/>
</Foundation.Core.Generalization.parent>
</Foundation.Core.Generalization>
<Foundation.Core.Generalization xmi.id="xmi.5" xmi.uuid="-125--41-34-25--2de64a9c:eecda921bb:-7ff7">
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Generalization.child>
<Foundation.Core.GeneralizableElement xmi.idref="xmi.59"/>
</Foundation.Core.Generalization.child>
<Foundation.Core.Generalization.parent>
<Foundation.Core.GeneralizableElement xmi.idref="xmi.3"/>
</Foundation.Core.Generalization.parent>
</Foundation.Core.Generalization>
<Foundation.Core.Association xmi.id="xmi.66" xmi.uuid="127-0-0-1-329fc715:f5d2b5ca30:-7ff3">
<Foundation.Core.ModelElement.name></Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Association.connection>
<Foundation.Core.AssociationEnd xmi.id="xmi.67" xmi.uuid="127-0-0-1-329fc715:f5d2b5ca30:-7ff2">
<Foundation.Core.ModelElement.name>Manager</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.ordering xmi.value="unordered"/>
<Foundation.Core.AssociationEnd.aggregation xmi.value="none"/>
<Foundation.Core.AssociationEnd.targetScope xmi.value="instance"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.idref="xmi.50"/>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.changeability xmi.value="changeable"/>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.66"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.59"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
<Foundation.Core.AssociationEnd xmi.id="xmi.68" xmi.uuid="127-0-0-1-329fc715:f5d2b5ca30:-7ff1">
<Foundation.Core.ModelElement.name>Managed</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.ordering xmi.value="unordered"/>
<Foundation.Core.AssociationEnd.aggregation xmi.value="none"/>
<Foundation.Core.AssociationEnd.targetScope xmi.value="instance"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.idref="xmi.34"/>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.changeability xmi.value="changeable"/>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.66"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.59"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
</Foundation.Core.Association.connection>
</Foundation.Core.Association>
</Foundation.Core.Namespace.ownedElement>
</Model_Management.Model>
</XMI.content>
</XMI>
|
|
From: <ki...@us...> - 2003-06-17 01:19:05
|
Update of /cvsroot/pymerase/pymerase/pymerase/output/CppAPI
In directory sc8-pr-cvs1:/tmp/cvs-serv4260
Added Files:
CppUtil.py
Log Message:
first version of code util, work in progress
--- NEW FILE: CppUtil.py ---
###########################################################################
# #
# C O P Y R I G H T N O T I C E #
# Copyright (c) 2003 by: #
# * California Institute of Technology #
# #
# All Rights Reserved. #
# #
# Permission is hereby granted, free of charge, to any person #
# obtaining a copy of this software and associated documentation files #
# (the "Software"), to deal in the Software without restriction, #
# including without limitation the rights to use, copy, modify, merge, #
# publish, distribute, sublicense, and/or sell copies of the Software, #
# and to permit persons to whom the Software is furnished to do so, #
# subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be #
# included in all copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, #
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF #
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND #
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS #
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN #
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN #
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
###########################################################################
#
# Authors: Brandon King
# Last Modified: $Date: 2003/06/17 01:19:00 $
# Revision: $ Revision $
#
import string
class CppUtil:
def __init__(self):
pass
def getClassConstructor(self, className):
code = []
code.append("%s::%s() { /*FIXME: How to initilize a c++ class? */ }" % (className, className))
code.append("")
code.append("%CLASS_DEF%")
code = string.join(code, '\n')
return code
def getSetterFunction(self, className, setterName, attribName, attribType, varName):
code = []
code.append("void %s::%s(%s %s)" % (className, setterName, attribType, attribName))
code.append("{")
code.append(" this->%s = %s;" % (varName, attribName))
code.append("}")
code.append("")
code.append("%CLASS_DEF%")
code = string.join(code, '\n')
return code
def getGetterFunction(self, className, getterName, attribType, varName):
code = []
code.append("%s %s::%s()" % (attribType, className, getterName))
code.append("{")
code.append(" return this->%s;" % (varName))
code.append("}")
code.append("")
code.append("%CLASS_DEF%")
code = string.join(code, '\n')
return code
|
|
From: <ki...@us...> - 2003-06-17 01:18:27
|
Update of /cvsroot/pymerase/pymerase/pymerase/output
In directory sc8-pr-cvs1:/tmp/cvs-serv4123
Modified Files:
CreateCppAPI.py
Log Message:
Generate some of the cpp class code
Added more info to header files
Documented code a little more
Index: CreateCppAPI.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/output/CreateCppAPI.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CreateCppAPI.py 16 Jun 2003 20:43:51 -0000 1.2
--- CreateCppAPI.py 17 Jun 2003 01:18:23 -0000 1.3
***************
*** 41,44 ****
--- 41,45 ----
from pymerase.output.CppAPI.Templates import Template
+ from pymerase.output.CppAPI.CppUtil import CppUtil
from pymerase.ClassMembers import getAllAttributes
***************
*** 55,58 ****
--- 56,62 ----
TRANSLATOR_NAME='CreateCppAPI'
+ # C++ Code Util
+ util = CppUtil()
+
def saveFile(dest, fileName, cppFile):
if not os.path.exists(dest):
***************
*** 76,79 ****
--- 80,84 ----
"""
+ ###################################
#Iterate through the tables/classes and process the data
for cls in classList:
***************
*** 82,96 ****
headerFileName = className + '.h'
cppFileName = className + '.cpp'
! clsHeader = templateUtil.getCppClassHeaderTemplate()
! clsHeader = re.sub("%CLASS_NAME%", className, clsHeader)
constructorCode = []
constructorCode.append("%s();" % (className))
constructorCode.append(" %PUBLIC%")
constructorCode = string.join(constructorCode, '\n')
!
! clsHeader = re.sub("%PUBLIC%", constructorCode, clsHeader)
for attribute in getAllAttributes(classList, cls, TRANSLATOR_NAME):
type = attribute.getType().getCppTypeStr()
--- 87,116 ----
headerFileName = className + '.h'
cppFileName = className + '.cpp'
+
+ ############################
+ # HEADER FILE - PREP
! # Get Header Template
! cppHeader = templateUtil.getCppClassHeaderTemplate()
! cppHeader = re.sub("%CLASS_NAME%", className, cppHeader)
+ # Header constructor
constructorCode = []
constructorCode.append("%s();" % (className))
constructorCode.append(" %PUBLIC%")
constructorCode = string.join(constructorCode, '\n')
! cppHeader = re.sub("%PUBLIC%", constructorCode, cppHeader)
+ ############################
+ # C++ FILE - PREP
+
+ # Get C++ Template
+ cppCode = templateUtil.getCppClassTemplate()
+ cppCode = re.sub("%CLASS_NAME%", className, cppCode)
+
+ # Create C++ Class Constructor
+ cppCode = re.sub("%CLASS_DEF%", util.getClassConstructor(className), cppCode)
+
+ # Process attributes for given class
for attribute in getAllAttributes(classList, cls, TRANSLATOR_NAME):
type = attribute.getType().getCppTypeStr()
***************
*** 99,102 ****
--- 119,126 ----
getterName = attribute.getGetterName(TRANSLATOR_NAME)
+ ############################
+ # HEADER FILE - ATTRIBUTES
+
+ #create c++ variables
varCode = []
varCode.append("%s %s;" % (type, name))
***************
*** 104,109 ****
varCode = string.join(varCode, '\n')
! clsHeader = re.sub("%PRIVATE%", varCode, clsHeader)
setterCode = []
setterCode.append("%s %s(%s %s);" % ('void', setterName, type, name))
--- 128,134 ----
varCode = string.join(varCode, '\n')
! cppHeader = re.sub("%PRIVATE%", varCode, cppHeader)
+ #create c++ setter functions
setterCode = []
setterCode.append("%s %s(%s %s);" % ('void', setterName, type, name))
***************
*** 111,116 ****
setterCode = string.join(setterCode, '\n')
! clsHeader = re.sub("%PUBLIC%", setterCode, clsHeader)
getterCode = []
getterCode.append("%s %s();" % (type, getterName))
--- 136,142 ----
setterCode = string.join(setterCode, '\n')
! cppHeader = re.sub("%PUBLIC%", setterCode, cppHeader)
+ #create c++ getter functions
getterCode = []
getterCode.append("%s %s();" % (type, getterName))
***************
*** 118,123 ****
getterCode = string.join(getterCode, '\n')
! clsHeader = re.sub("%PUBLIC%", getterCode, clsHeader)
for assocEnd in getAllAssociationEnds(classList, cls, TRANSLATOR_NAME):
name = assocEnd.getName(TRANSLATOR_NAME)
--- 144,160 ----
getterCode = string.join(getterCode, '\n')
! cppHeader = re.sub("%PUBLIC%", getterCode, cppHeader)
+ ############################
+ # C++ FILE - ATTRIBUTES
+ cppCode = re.sub("%CLASS_DEF%",
+ util.getSetterFunction(className, setterName, name, type, name),
+ cppCode)
+
+ cppCode = re.sub("%CLASS_DEF%",
+ util.getGetterFunction(className, getterName, type, name),
+ cppCode)
+
+ # Process associations for a given class
for assocEnd in getAllAssociationEnds(classList, cls, TRANSLATOR_NAME):
name = assocEnd.getName(TRANSLATOR_NAME)
***************
*** 125,129 ****
--- 162,188 ----
getterName = assocEnd.getGetterName(TRANSLATOR_NAME)
oppClassName = assocEnd.getOppositeEnd().getClassName(TRANSLATOR_NAME)
+ varName = "var%s" % (oppClassName)
+
+
+ ############################
+ # HEADER FILE - ASSOCIATIONS
+
+ #If this isn't the header file of the class being used...
+ if className != oppClassName:
+ #include class header
+ cppHeader = re.sub("%INCLUDE%",
+ "#include \"%s.h\"\n%s" % (oppClassName, "%INCLUDE%"),
+ cppHeader)
+
+
+ #create c++ variables
+ varCode = []
+ varCode.append("%s %s;" % (oppClassName, varName))
+ varCode.append(" %PRIVATE%")
+ varCode = string.join(varCode, '\n')
+ cppHeader = re.sub("%PRIVATE%", varCode, cppHeader)
+
+ #create c++ setter functions
setterCode = []
setterCode.append("%s %s(%s %s);" % ('void', setterName, oppClassName, name))
***************
*** 131,136 ****
setterCode = string.join(setterCode, '\n')
! clsHeader = re.sub("%PUBLIC%", setterCode, clsHeader)
getterCode = []
getterCode.append("%s %s();" % (oppClassName, getterName))
--- 190,196 ----
setterCode = string.join(setterCode, '\n')
! cppHeader = re.sub("%PUBLIC%", setterCode, cppHeader)
+ #create c++ getter functions
getterCode = []
getterCode.append("%s %s();" % (oppClassName, getterName))
***************
*** 138,196 ****
getterCode = string.join(getterCode, '\n')
! clsHeader = re.sub("%PUBLIC%", getterCode, clsHeader)
! clsHeader = re.sub("%PUBLIC%", "", clsHeader)
! clsHeader = re.sub("%PRIVATE%", "", clsHeader)
! saveFile(destination, headerFileName, clsHeader)
! #Get name of class which this class inherits from
! #baseClassNames = cls.getBaseClassNames(TRANSLATOR_NAME)
! #if len(baseClassNames) >= 1:
! # for baseClass in baseClassNames:
! # cppCode.append(" Inherits From: %s" % (baseClass))
! #Process each attribute in a given table (class)
! #for attribute in getAllAttributes(classList, cls, TRANSLATOR_NAME):
! #
! # type = attribute.getType().getSQLType()
! # cppCode.append(" ATTRIBUTE:")
! # cppCode.append(" Name = %s" % \
! # (attribute.getName(TRANSLATOR_NAME)))
! # cppCode.append(" Type = %s" % \
! # (type))
! # cppCode.append(" GetterName = %s" \
! # % (attribute.getGetterName(TRANSLATOR_NAME)))
! # cppCode.append(" SetterName = %s" % \
! # (attribute.getSetterName(TRANSLATOR_NAME)))
! # cppCode.append(" AppenderName = %s" % \
! # (attribute.getAppenderName(TRANSLATOR_NAME)))
! # cppCode.append(" isRequired = %s" % (attribute.isRequired()))
! # cppCode.append(" isUnique = %s" % (attribute.isUnique()))
! # cppCode.append(" isIndexed = %s" % (attribute.isIndexed()))
! # cppCode.append(" isPrimaryKey = %s" % (attribute.isPrimaryKey()))
! #
! #for assocEnd in getAllAssociationEnds(classList, cls, TRANSLATOR_NAME):
! # cppCode.append(" ASSOC END:")
! # cppCode.append(" Name = %s" % (assocEnd.getName(TRANSLATOR_NAME)))
! # cppCode.append(" AttribName = %s" % \
! # (assocEnd.getAttributeName(TRANSLATOR_NAME)))
! # cppCode.append(" GetterName = %s" % \
! # (assocEnd.getGetterName(TRANSLATOR_NAME)))
! # cppCode.append(" SetterName = %s" % \
! # (assocEnd.getSetterName(TRANSLATOR_NAME)))
! # cppCode.append(" AppenderName = %s" % \
! # (assocEnd.getAppenderName(TRANSLATOR_NAME)))
! # cppCode.append(" Multiplicity = %s" % (assocEnd.getMultiplicity()))
! # cppCode.append(" isNavigable = %s" % (assocEnd.isNavigable()))
! # cppCode.append(" OppositeEnd = %s.%s" % \
! # (assocEnd.getOppositeEnd().getClassName(TRANSLATOR_NAME),
! # assocEnd.getOppositeEnd().getAttributeName(TRANSLATOR_NAME)))
! #
! #
! #cppCode.append("")
!
! #cppCode = string.join(cppCode, '\n')
! #f = open(destination, 'w')
! #f.write(cppCode)
! #f.close()
! #warn("Report Generation Complete... Good Bye.", InfoWarning)
--- 198,233 ----
getterCode = string.join(getterCode, '\n')
! cppHeader = re.sub("%PUBLIC%", getterCode, cppHeader)
! ############################
! # C++ FILE - ASSOCIATIONS
! cppCode = re.sub("%CLASS_DEF%",
! util.getSetterFunction(className, setterName, name, oppClassName, varName),
! cppCode)
! cppCode = re.sub("%CLASS_DEF%",
! util.getGetterFunction(className, getterName, oppClassName, varName),
! cppCode)
!
!
! ############################
! # REMOVE %TEMPLATE% TAGS
!
! #Header
! cppHeader = re.sub("%PUBLIC%", "", cppHeader)
! cppHeader = re.sub("%PRIVATE%", "", cppHeader)
! cppHeader = re.sub("%INCLUDE%", "", cppHeader)
!
! #C++ Code
! cppCode = re.sub("%CLASS_DEF%", "", cppCode)
!
! ############################
! # Save Class Header
!
! #Header
! saveFile(destination, headerFileName, cppHeader)
!
! #C++ Code
! saveFile(destination, cppFileName, cppCode)
!
|
|
From: <de...@us...> - 2003-06-17 01:18:01
|
Update of /cvsroot/pymerase/pymerase/examples/school In directory sc8-pr-cvs1:/tmp/cvs-serv4098 Added Files: schoolPoseidon141.zargo schoolPoseidon151.zargo schoolPoseidon161.zargo Log Message: Added the zargo files I'm using for testing... currently only the 141 version works. (and is also compatible with argouml) --- NEW FILE: schoolPoseidon141.zargo --- (This appears to be a binary file; contents omitted.) --- NEW FILE: schoolPoseidon151.zargo --- (This appears to be a binary file; contents omitted.) --- NEW FILE: schoolPoseidon161.zargo --- (This appears to be a binary file; contents omitted.) |
|
From: <de...@us...> - 2003-06-17 01:11:48
|
Update of /cvsroot/pymerase/pymerase/pymerase/input
In directory sc8-pr-cvs1:/tmp/cvs-serv3476
Modified Files:
parseXMI.py
Log Message:
Indexed into classesInModel using the name of the class that an association
is bound to instead of the association name.
(which when the association name is different causes class duplications)
Index: parseXMI.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/input/parseXMI.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** parseXMI.py 16 Jun 2003 20:30:26 -0000 1.21
--- parseXMI.py 17 Jun 2003 01:11:44 -0000 1.22
***************
*** 466,472 ****
# get names of types
thisEndTypeName = self.getEndClassName(end)
! thisEndTypeUUID = self.getUUID(end)
otherEndTypeName = self.getEndClassName(self.getOppositeEnd(end))
! otherEndTypeUUID = self.getUUID(self.getOppositeEnd(end))
# get references to type objects from the master class list
--- 466,472 ----
# get names of types
thisEndTypeName = self.getEndClassName(end)
! thisEndTypeUUID = self.getUUID(self.getEndClass(end))
otherEndTypeName = self.getEndClassName(self.getOppositeEnd(end))
! otherEndTypeUUID = self.getUUID(self.getEndClass(self.getOppositeEnd(end)))
# get references to type objects from the master class list
***************
*** 552,555 ****
--- 552,560 ----
return associationEnd.type.name
+ def getEndClass(self, associationEnd):
+ """Get the class referenced by this association end
+ """
+ return associationEnd.type
+
class uml14Parser(umlParser):
"""Utility functions for accessing a model using UML 1.4 naming conventions
***************
*** 564,567 ****
--- 569,577 ----
"""
return associationEnd.participant.name
+
+ def getEndClass(self, associationEnd):
+ """Get the class referenced by this association end
+ """
+ return associationEnd.participant
|
|
From: <de...@us...> - 2003-06-17 01:09:58
|
Update of /cvsroot/pymerase/pymerase/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv3344
Added Files:
TestPubMed.py
Log Message:
this example was constructed using different names for association ends
which tripped over bug 749853.
--- NEW FILE: TestPubMed.py ---
#!/usr/bin/env python
from __future__ import nested_scopes
import copy
import os
import re
import string
import sys
import unittest
import pymerase
from pymerase.util import NameMangling
# import code to use api
from mx import DateTime
class CreatePubMedTestCases(unittest.TestCase):
def __init__(self, name):
"""Initialize
"""
self.pubmed_dir = os.path.join(os.getcwd(), "../examples/ncbi")
unittest.TestCase.__init__(self, name)
def setUp(self):
"""Perform setup
"""
self.current_dir = os.getcwd()
os.chdir(self.pubmed_dir)
self.current_python_path = sys.path
sys.path.append(self.pubmed_dir)
def tearDown(self):
"""Clean up after ourselves.
"""
os.chdir(self.current_dir)
sys.path = self.current_python_path
def testParseUML(self):
"""Test generating python code from xmi file
"""
# Figure out path information
schema = os.path.abspath("pubmed.xmi")
# construct pymerase object
translator = pymerase.Pymerase()
# do the translation
self.classesInModel = {}
parsed_input = translator.read(schema, 'parseXMI', self.classesInModel)
#Test construction of classes from association names.
#association names were being used to do lookups in classesInModel instead of
#the name of the class pointed to be the associations.
#tests bug #749853
self.failUnless(len(self.classesInModel) == 2)
def suite():
suite = unittest.TestSuite()
# run through test twice once for underscore_api and once for CapsAPI
suite.addTest(CreatePubMedTestCases("testParseUML"))
return suite
if __name__ == "__main__":
unittest.main(defaultTest="suite")
|
|
From: <ki...@us...> - 2003-06-16 22:44:24
|
Update of /cvsroot/pymerase/pymerase/examples/ncbi
In directory sc8-pr-cvs1:/tmp/cvs-serv19231
Added Files:
ipymerase-pubmed.py
Log Message:
ipymerase
--- NEW FILE: ipymerase-pubmed.py ---
#!/usr/bin/env python
import sys
import os
import pymerase
#import pymerase.input.parseXMI
#import pymerase.output.CreateSQL
if __name__ == "__main__":
schema = os.path.abspath("./pubmed.xmi")
outputPath = os.path.abspath("./pubmed.sql")
pymerase.run(schema, "parseXMI", outputPath, "iPymerase")
#pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateSQL)
|
|
From: <ki...@us...> - 2003-06-16 20:43:54
|
Update of /cvsroot/pymerase/pymerase/pymerase/output
In directory sc8-pr-cvs1:/tmp/cvs-serv25909
Modified Files:
CreateCppAPI.py
Log Message:
Added support for types (I think that's important ;-)
Added constructor to classes
Index: CreateCppAPI.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/output/CreateCppAPI.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CreateCppAPI.py 14 Jun 2003 01:21:43 -0000 1.1
--- CreateCppAPI.py 16 Jun 2003 20:43:51 -0000 1.2
***************
*** 86,91 ****
clsHeader = re.sub("%CLASS_NAME%", className, clsHeader)
for attribute in getAllAttributes(classList, cls, TRANSLATOR_NAME):
! type = attribute.getType().getSQLType()
name = attribute.getName(TRANSLATOR_NAME)
setterName = attribute.getSetterName(TRANSLATOR_NAME)
--- 86,98 ----
clsHeader = re.sub("%CLASS_NAME%", className, clsHeader)
+ constructorCode = []
+ constructorCode.append("%s();" % (className))
+ constructorCode.append(" %PUBLIC%")
+ constructorCode = string.join(constructorCode, '\n')
+
+ clsHeader = re.sub("%PUBLIC%", constructorCode, clsHeader)
+
for attribute in getAllAttributes(classList, cls, TRANSLATOR_NAME):
! type = attribute.getType().getCppTypeStr()
name = attribute.getName(TRANSLATOR_NAME)
setterName = attribute.getSetterName(TRANSLATOR_NAME)
***************
*** 93,97 ****
varCode = []
! varCode.append("%s %s;" % ('int', name))
varCode.append(" %PRIVATE%")
varCode = string.join(varCode, '\n')
--- 100,104 ----
varCode = []
! varCode.append("%s %s;" % (type, name))
varCode.append(" %PRIVATE%")
varCode = string.join(varCode, '\n')
***************
*** 100,104 ****
setterCode = []
! setterCode.append("%s %s(%s);" % ('int', setterName, 'int %s' % (name)))
setterCode.append(" %PUBLIC%")
setterCode = string.join(setterCode, '\n')
--- 107,111 ----
setterCode = []
! setterCode.append("%s %s(%s %s);" % ('void', setterName, type, name))
setterCode.append(" %PUBLIC%")
setterCode = string.join(setterCode, '\n')
***************
*** 107,111 ****
getterCode = []
! getterCode.append("%s %s();" % ('int', getterName))
getterCode.append(" %PUBLIC%")
getterCode = string.join(getterCode, '\n')
--- 114,118 ----
getterCode = []
! getterCode.append("%s %s();" % (type, getterName))
getterCode.append(" %PUBLIC%")
getterCode = string.join(getterCode, '\n')
***************
*** 114,118 ****
for assocEnd in getAllAssociationEnds(classList, cls, TRANSLATOR_NAME):
-
name = assocEnd.getName(TRANSLATOR_NAME)
setterName = assocEnd.getSetterName(TRANSLATOR_NAME)
--- 121,124 ----
***************
*** 121,125 ****
setterCode = []
! setterCode.append("%s %s(%s);" % ('int', setterName, 'int %s' % (name)))
setterCode.append(" %PUBLIC%")
setterCode = string.join(setterCode, '\n')
--- 127,131 ----
setterCode = []
! setterCode.append("%s %s(%s %s);" % ('void', setterName, oppClassName, name))
setterCode.append(" %PUBLIC%")
setterCode = string.join(setterCode, '\n')
|
|
From: <ki...@us...> - 2003-06-16 20:39:34
|
Update of /cvsroot/pymerase/pymerase/pymerase/util
In directory sc8-pr-cvs1:/tmp/cvs-serv24942
Modified Files:
PymeraseType.py
Log Message:
added getCppTypeStr() --> good start, but needs refinement
Index: PymeraseType.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/util/PymeraseType.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** PymeraseType.py 30 May 2003 00:55:39 -0000 1.15
--- PymeraseType.py 16 Jun 2003 20:39:31 -0000 1.16
***************
*** 160,163 ****
--- 160,194 ----
else:
return "None"
+
+ def getCppTypeStr(self):
+ if re.match("serial", self.type_string):
+ return "unsigned long"
+ elif re.match(".*char.*", self.type_string):
+ return "string"
+ elif re.match("text", self.type_string):
+ return "string"
+ elif re.match("name", self.type_string):
+ return "string"
+ # FIXME: Should this be a long or int?
+ elif re.match("int.*", self.type_string):
+ return "int"
+ elif re.match("float", self.type_string):
+ return "float"
+ elif re.match("double.*", self.type_string):
+ return "double"
+ elif re.match("bool", self.type_string):
+ return "bool"
+ elif re.match("datetime", self.type_string):
+ #FIXME: Should be a date time object in C++, string for now.
+ return "string"
+ elif re.match("[Ss]tring", self.type_string):
+ return "string"
+ elif re.match("Date", self.type_string) or re.match("Time", self.type_string):
+ #FIXME: Should be a date time object in C++, string for now.
+ return "string"
+ elif re.match("char", self.type_string):
+ return "char"
+ else:
+ raise NotImplementedError("Type %s is unknown" % self.type_string)
def isNativeType(self, language="python"):
|
|
From: <ki...@us...> - 2003-06-16 20:30:29
|
Update of /cvsroot/pymerase/pymerase/pymerase/input
In directory sc8-pr-cvs1:/tmp/cvs-serv23686
Modified Files:
parseXMI.py
Log Message:
elf.getUUID(end) was suppose to be self.getUUID(end) --> FIXED
Index: parseXMI.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/input/parseXMI.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** parseXMI.py 16 Jun 2003 07:53:26 -0000 1.20
--- parseXMI.py 16 Jun 2003 20:30:26 -0000 1.21
***************
*** 466,470 ****
# get names of types
thisEndTypeName = self.getEndClassName(end)
! thisEndTypeUUID = elf.getUUID(end)
otherEndTypeName = self.getEndClassName(self.getOppositeEnd(end))
otherEndTypeUUID = self.getUUID(self.getOppositeEnd(end))
--- 466,470 ----
# get names of types
thisEndTypeName = self.getEndClassName(end)
! thisEndTypeUUID = self.getUUID(end)
otherEndTypeName = self.getEndClassName(self.getOppositeEnd(end))
otherEndTypeUUID = self.getUUID(self.getOppositeEnd(end))
|
|
From: <de...@us...> - 2003-06-16 07:53:29
|
Update of /cvsroot/pymerase/pymerase/pymerase/input
In directory sc8-pr-cvs1:/tmp/cvs-serv13305
Modified Files:
parseXMI.py
Log Message:
Hopefully I now have all of the class construction code properly
initializing the UUID field.
Even though it's currently only the raw name, this does avoid issues with
the name mangler getting confused and creating duplicate class naems.
Index: parseXMI.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/input/parseXMI.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** parseXMI.py 29 May 2003 07:20:08 -0000 1.19
--- parseXMI.py 16 Jun 2003 07:53:26 -0000 1.20
***************
*** 45,48 ****
--- 45,49 ----
import os
+ import pprint
import re
import string
***************
*** 311,327 ****
continue
! # Map type name to UUID:
! for uuid, classModel in classesInModel.items():
! if attributeType.getTypeString() == classModel.name:
! attributeUUID = uuid
! break
! else:
! warn("In %s couldn't find %s" % (
! thisEndType.getName(None),
! attributeType.getTypeString()),
! RuntimeWarning)
!
!
! otherEndType = classesInModel.get(attributeUUID, None)
if otherEndType is not None:
#print "NEED to convert %s to relation" % (attributeType)
--- 312,328 ----
continue
! # # Map type name to UUID:
! # for uuid, classModel in classesInModel.items():
! # if attributeType.getTypeString() == classModel.name:
! # attributeUUID = uuid
! # break
! # else:
! # warn("In %s couldn't find %s" % (
! # thisEndType.getName(None),
! # attributeType.getTypeString()),
! # RuntimeWarning)
! #
! otherEndType = classesInModel.get(attribute.getUUID(), None)
!
if otherEndType is not None:
#print "NEED to convert %s to relation" % (attributeType)
***************
*** 415,419 ****
classMetaInfo = classesInModel.setdefault(UUID,
XMIClassMetaInfo(self.pymeraseConfig, name))
!
classMetaInfo.setAbstract(xmiClass.isAbstract)
classMetaInfo.setPackage(xmiClass.namespace.name)
--- 416,420 ----
classMetaInfo = classesInModel.setdefault(UUID,
XMIClassMetaInfo(self.pymeraseConfig, name))
! classMetaInfo.setUUID(UUID)
classMetaInfo.setAbstract(xmiClass.isAbstract)
classMetaInfo.setPackage(xmiClass.namespace.name)
***************
*** 421,428 ****
for generalization in xmiClass.generalization:
baseClassName = generalization.parent.name
! baseClassUUID = self.getUUID(generalization)
baseClassRef = classesInModel.setdefault(baseClassUUID,
XMIClassMetaInfo(self.pymeraseConfig,
baseClassName))
classMetaInfo.appendBaseClass(baseClassRef)
--- 422,430 ----
for generalization in xmiClass.generalization:
baseClassName = generalization.parent.name
! baseClassUUID = self.getUUID(generalization.parent)
baseClassRef = classesInModel.setdefault(baseClassUUID,
XMIClassMetaInfo(self.pymeraseConfig,
baseClassName))
+ baseClassRef.setUUID(baseClassUUID)
classMetaInfo.appendBaseClass(baseClassRef)
***************
*** 452,460 ****
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)
--- 454,462 ----
def parseXMIAssociation(self, classesInModel, classMetaInfo, end):
thisName = end.name
! thisUUID = self.getUUID(end)
otherName = self.getOppositeEnd(end).name
! otherUUID = self.getUUID(self.getOppositeEnd(end))
associationName = end.association.name
! associationUUID = self.getUUID(end.association)
associationNameTuple = (associationName, thisName, otherName)
***************
*** 464,468 ****
# get names of types
thisEndTypeName = self.getEndClassName(end)
! thisEndTypeUUID = self.getUUID(end)
otherEndTypeName = self.getEndClassName(self.getOppositeEnd(end))
otherEndTypeUUID = self.getUUID(self.getOppositeEnd(end))
--- 466,470 ----
# get names of types
thisEndTypeName = self.getEndClassName(end)
! thisEndTypeUUID = elf.getUUID(end)
otherEndTypeName = self.getEndClassName(self.getOppositeEnd(end))
otherEndTypeUUID = self.getUUID(self.getOppositeEnd(end))
***************
*** 472,478 ****
--- 474,482 ----
XMIClassMetaInfo(self.pymeraseConfig,
thisEndTypeName))
+ thisEndType.setUUID(thisEndTypeUUID)
otherEndType = classesInModel.setdefault(otherEndTypeUUID,
XMIClassMetaInfo(self.pymeraseConfig,
otherEndTypeName))
+ otherEndType.setUUID(otherEndTypeUUID)
#################
***************
*** 574,578 ****
if parsedClass is not None:
classesInModel[parsedClass.getUUID()] = parsedClass
!
addForeignKeys(pymeraseConfig, classesInModel)
--- 578,584 ----
if parsedClass is not None:
classesInModel[parsedClass.getUUID()] = parsedClass
!
! pprint.pprint(classesInModel)
! print len(classesInModel)
addForeignKeys(pymeraseConfig, classesInModel)
|