E&S CVS Commit: PEAK - Expanded XMI 1.1 support, with unit tests. PEAK can now parse the most

pje at eby-sarna.com pje at eby-sarna.com
Fri Nov 29 10:12:01 EST 2002


Module Name:	PEAK
Committed By:	pje
Date:		Fri Nov 29 15:11:50 UTC 2002

Modified Files:
	PEAK/src/peak/metamodels/uml: Model.py
	PEAK/src/peak/model: api.py
	PEAK/src/peak/storage: data_managers.py xmi.py
	PEAK/src/peak/storage/tests: __init__.py
Added Files:
	PEAK/src/peak/storage/tests: LDAP.py transactions.py xmi.py

Log Message:
Expanded XMI 1.1 support, with unit tests.  PEAK can now parse the most
basic example from the XMI 1.1 specification, and it can also parse the
UML 1.3 metamodels from SMW (the Python System Modelling Workbench).
Both use very different sets of XMI features, so I think our 1.1 read
support is pretty solid now.

model.DataType, model.PrimitiveType, and model.Classifier,
model.Enumeration, and all their non-Element subclasses are now
immutable.  This ensures that, since they aren't persistent, there is no
way to accidentally not save them.  Really, they should also require that
only model.Field objects are enclosed within them, that then reference
only DataTypes or PrimitiveTypes, but I'll tackle that after the
"metaclass metadata" refactoring that's coming next.

To support the use of these data types in XMI, I had to change the data
manager base classes to support returning non-persistent objects from a
__getitem__ call.  Such objects are not ghosted or cached, but simply
returned.

Last, but not least, I fixed the 'qualifiedName' feature of
UML.ModelElements, split the storage.tests package into separate files,
and added support for model.DataTypes to be marshalled from a tuple of
fields (e.g. via 'XMI.field' tags).

Next up: refactoring metaclass metadata to be "lazy", which will speed
and simplify construction of metadata registries such as the XMI name
maps, and the various registries that we don't have yet (but will want
soon) for doing marshalling and XMI writing.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/src/peak/metamodels/uml/Model.py.diff?r1=1.25&r2=1.26
http://cvs.eby-sarna.com/PEAK/src/peak/model/api.py.diff?r1=1.55&r2=1.56
http://cvs.eby-sarna.com/PEAK/src/peak/storage/data_managers.py.diff?r1=1.8&r2=1.9
http://cvs.eby-sarna.com/PEAK/src/peak/storage/xmi.py.diff?r1=1.2&r2=1.3
http://cvs.eby-sarna.com/PEAK/src/peak/storage/tests/LDAP.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/storage/tests/transactions.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/storage/tests/xmi.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/storage/tests/__init__.py.diff?r1=1.11&r2=1.12

To generate a diff of this commit:
cvs rdiff -r1.25 -r1.26 PEAK/src/peak/metamodels/uml/Model.py
cvs rdiff -r1.55 -r1.56 PEAK/src/peak/model/api.py
cvs rdiff -r1.8 -r1.9 PEAK/src/peak/storage/data_managers.py
cvs rdiff -r1.2 -r1.3 PEAK/src/peak/storage/xmi.py
cvs rdiff -r0 -r1.1 PEAK/src/peak/storage/tests/LDAP.py \
    PEAK/src/peak/storage/tests/transactions.py \
    PEAK/src/peak/storage/tests/xmi.py
cvs rdiff -r1.11 -r1.12 PEAK/src/peak/storage/tests/__init__.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




More information about the source-changes mailing list