The caGrid architecture workspace recommends using the UML modelling tool, Enterprise Architect.
The datatypes modelled by us are:
- MicroarraySet (input)
- HierarchicalClustering (output)
- AdjacencyMatrix (output)
We have also modelled the "tuning parameters" to be used by these algorithms. More specifically, we have
These parameter types contain the primitive fields need by the algorithm (ie. distance measure, iterations, etc.).
These can be found on our windows server (caldev) under C:\java\apps\ea_workspace\geWorkbench_caGrid_enablement.EAP.
Create Java Documents for caGrid analysis components from UML
Detail steps as follow:
1. create UML Logical Model and Service Model in EA, you'll get an UML model.
Tricky part is, you'll need to put the descriptions/comments in both tags AND notes. The reason is, you need to put comments in notes so you can export comments into xsd and introduce, so the comments will appear in java code. And you need to put comments in description tags. (This has to do with a parsing issue in the Semantic Integration Workbench.)
1. click your package of your model in project browser in EA. (ex:Views.Logical View.Logical Model.edu.columbia.geworkbench.cagrid.foo) 2. on EA's menu, click Project-XML schema-Generate XML schema
3. modify the xsd file manually.
To generate the xsd file from the model, select Project->Generate XML Schema. Replace the header with something like
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="gme://cagrid.geworkbench.columbia.edu/1/microarray4" xmlns:mobius="gme://cagrid.geworkbench.columbia.edu/1/microarray4" targetNamespace="gme://cagrid.geworkbench.columbia.edu/1/microarray4" elementFormDefault="qualified" attributeFormDefault="unqualified">
In this case the corresponding java class will live in the package microarray4. If you want the java class to live in the package edu.columbia.geworkbench.cagrid.foo then this would look like:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="gme://cagrid.geworkbench.columbia.edu/1/edu.columbia.geworkbench.cagrid.foo" xmlns:mobius="gme://cagrid.geworkbench.columbia.edu/1/edu.columbia.geworkbench.cagrid.foo" targetNamespace="gme://cagrid.geworkbench.columbia.edu/1/edu.columbia.geworkbench.cagrid.foo" elementFormDefault="qualified" attributeFormDefault="unqualified">
4. in "introduce", create caGrid service, load xsd file into it.
1. launch introduce using command "ant introduce" in your caGrid directory. 2. press "Create caGrid Service", fill some information and click Create, wait for a while, 3. in Import Data Types section, select File System tag, and Browse to the xsd file, press Add.
5. in "introduce", create "execute" in Operations tab.
Because EA won't generate xsd for Service Model, we create it manually in introduce.
6. press "Save" in "introduce", you'll get java codes generated.
7. load java codes into eclipse as a new "java project".
Because introduce won't handle notes in enumeration classes, you can add comments into java codes manually in this step.
8. generate javadocs in eclipse
1. select the package you want to generate javadocs in eclipse's Package Explorer 2. on eclipse's menu, select Project-generate_javadoc
Duplicate Type Problem
Another solution to this is here: caGrid Wiki
The situation here is you must model a parameter or return type to be caGrid compliant, but the type already exists in geWorkbench. The generated stub will not contain all the functionality that the geWorkbench type has, but the geWorkbench type will not contain the "grid specific" stuff needed to be caGrid compliant.
What I did was I modelled and created the type, then added the pertinent pieces of code from the corresponding geWorkbench type. I then moved this out of the directory build/stubs-serviceName/src/ to my src/edu/columbia.geworkbench.cagrid directory. This was done to prevent clobbering (by Introduce) of any manual edits I made. That is, when you run Introduce, it always overwrites the type in the directory build/stubs-serviceName/src.
Each successive run of Introduce will create the type in your build/stubs-serviceName/src directory. This will cause build errors in eclipse. Just manually delete this to resolve these errors.