Rational Rose ".ptl" file parsing?
Harry George
harry.g.george at boeing.com
Mon Jun 16 13:45:40 EDT 2003
Anyone have a handy parser for the RatRose .ptl file format? Want to
get it into an object tree reasonable naming convetions. Iwas going
to do this with shlex, but I'd go with anything already working. It
occurs to me that this is fairly lispish, so "readlisp.py" is another
candidate.
The end result is to use the object tree to autogenerate code for
databases, python code, etc. We'd prefer to work from XMI/UML, but
that isn't available.
Typical file start is:
(object Petal
version 45
_written "Rose 7.6.0109.2314"
charSet 0)
(object Design "Logical View"
is_unit TRUE
is_loaded TRUE
quid "3D7E590D024E"
defaults (object defaults
rightMargin 0.250000
leftMargin 0.500000
topMargin 0.250000
bottomMargin 0.250000
pageOverlap 1.000000
clipIconLabels TRUE
autoResize TRUE
snapToGrid FALSE
gridX 16
gridY 16
defaultFont (object Font
size 10
face "Arial"
bold FALSE
italics FALSE
underline FALSE
strike FALSE
color 0
default_color TRUE)
showMessageNum 1
showClassOfObject TRUE
notation "Unified")
root_usecase_package (object Class_Category "Use Case View"
quid "3CE415BC020E"
exportControl "Public"
global TRUE
logical_models (list unit_reference_list
(object Class "Systems Architect"
quid "3CE418C802EA"
stereotype "Actor")
--
harry.g.george at boeing.com
6-6M31 Knowledge Management
Phone: (425) 294-8757
More information about the Python-list
mailing list