download
If you find this software useful or develop any extensions, please inform us by
mail.
To keep yourself informed about new versions, please subscribe to our
mailing list.
This software is published under the
LGPL (GNU Lesser General Public License).
If you want to try OCL on real java code, do the following:
- Download dresden-ocl-injector.jar
and royloy.jar
into a directory.
Problems when downloading with netscape? Select
"Save Link As.." in the context menu, instead of just clicking the link.
|
- Change into that directory.
- Unzip the example java code in royloy.jar:
jar -xf royloy.jar
- Compile the example:
javac -classpath dresden-ocl-injector.jar tudresden/ocl/test/royloy/*.java
- Run the example:
java -cp .:dresden-ocl-injector.jar tudresden.ocl.test.TestInjectionRoyloy
Nothing happens. The example code runs through without complaining.
- Compile the example ocl expressions and put them into the java code:
java -jar dresden-ocl-injector.jar -r tudresden.ocl.test.royloy --modify tudresden/ocl/test/royloy/*.java
The example java code has now been modified.
- Compile the example again:
javac -classpath dresden-ocl-injector.jar tudresden/ocl/test/royloy/*.java
- Run the example again:
java -cp .:dresden-ocl-injector.jar tudresden.ocl.test.TestInjectionRoyloy
This time something happens. Enjoy the messages about violated ocl
constraints.
- Clean the code:
java -jar dresden-ocl-injector.jar --clean --modify tudresden/ocl/test/royloy/*.java
The example code is now exactly the same as you downloaded it.
Of course you may try this on your own java code.
If you want to use the ocl
compiler demo application, do the following:
- Download dresden-ocl-demo.jar
and xerces.jar
into a directory.
Problems when downloading with netscape? Select
"Save Link As.." in the context menu, instead of just clicking the link.
|
- Change into that directory.
- Type
java -jar dresden-ocl-demo.jar
at the command prompt.
- A window pops up. There you can enter constraints, check them against a
model and generate java code.
If you want to use the ocl compiler as part of Argo/UML version 0.8 do the following:
- Download ocl-argo.jar
(a subset of dresden-ocl.jar).
Problems when downloading with netscape? Select
"Save Link As.." in the context menu, instead of just clicking the link.
|
- Replace the current ocl-argo.jar in your Argo/UML installation with this
file.
- Restart Argo/UML.
Use the tab "Constraints" in the lower section of the Argo/UML main
window.
If you want to use the OCL2SQL tool prototype, do the following:
- Download dresden-ocl-sql.jar and
xerces.jar
into a directory.
Problems when downloading with netscape? Select "Save Link As.." in the context menu, instead of just clicking the link.
|
- Change into that directory.
- Type
java -jar dresden-ocl-sql.jar
at the command prompt.
- A window pops up. There you can load an XMI source file with model information, enter OCL constraints and
generate according table schemas, object views, integrity views (SQL) and trigger templates as specified.
The OCL2SQL has been developed by Sten Loecher. Contact him to ask tool specific questions.
You can find more information about the purpose of the tool in the paper "OCL as a Specification Language for Business Rules in Data Base Applications"
(see papers).
Alternativly to the OCL2SQL tool, the jar also contains a SQL test application which was used during
the development of the SQL code generator. The test application makes use of the compiler demo
application. You can run the SQL test application by typing at the command prompt:
java -classpath .:dresden-ocl-sql.jar tudresden/ocl/SQLTestApp
The complete source including test suites is
available in dresden-ocl-src.tar.gz.
For compiling, you need:
- xerces.jar:
Xerces version 1.4.3 by Apache [link].
- junit.jar: JUnit version 3.7 by Kent Beck and Erich Gamma [link] is already in the source package.
The ultimate source of the newest version is the cvs repository at
sourceforge.
The API documentation is available for download
or for reading online.