Violet and VPL Database Manual
Don BatoryDepartment of Computer ScienceThe University of Texas at AustinAustin, TX, USA
Violet is a free Java tool for drawing UML class diagrams. Familiarize yourself with Violet by installing MDELite and invoking it:
> java MDELite.Violet
and drawing the diagram below:
Draw your own diagrams. When you feel comfortable, proceed to the next section.
Violet Database Schema
Violet encodes a class diagram as an ugly XML file. The MDELite.ClassVioletParser tool translates Violet-XML documents into a database that conforms to the following schema:
:::libpl/vpl.schema.pl:::
Some notes:- vBox is the name of a table with 6 columns.
- id is the internal identifier of a vBox tuple (class, interface, or note)
- type is "c" class or "i" interface or "n" for note
- name, fields, methods are single-quoted strings which contain the name of the class, the string of fields and methods for that class.
- x,y are coordinate positions at which this class is displayed.
- abst : if type==c, is the class abstract? (Abstract class names are prefaced by "Abs_")
- vAssociation is a table with 11 columns.
- id is the internal identifier of an association.
- cid1,cid2 are identifiers of classes or interfaces to be connected.
- type1,type2 are enums with values "c" for class or "i" for interface to type cid1 and cid2.
- role1,role2 -- is any text eg name and/or cardinality to be displayed.
- arrow1,arrow2 -- only values {V, NONE, TRIANGLE, DIAMOND, BLACK_DIAMOND}, where NONE is ''.
- linestyle -- only values {SOLID, DOTTED}.
- bentStyle -- only values {STRAIGHT (or blank),HV,VH,HVH,VHV}.
- middleLabel -- should be blank, but this is the middle label on a Violet association
Let SC.class.violet be the Violet-produced XML file for StudentCourse. The following MDELite command translates this file into a VPL database SC.vpl.pl:
> java MDELite.VioletClassParser SC.class.violet SC.vpl.pl
The database that is produced is:
:::trash/outViolet.txt:::
VPL Constraints
There indeed are VPL constraints. I have not posted them, as they are good examples for homework assignments. They are similar to those for YPL (VPL's Yuml counterpart).