| Version 6 (modified by fbatard, 5 years ago) |
|---|
Code and Code again :)
How to simplify that?
private TLTNode FillNode(ElseType myElse) {
TLTNode node=new TLTNode();
for(ExecType exec : myElse.getExecArray()){
node.addExec(new TLTExec(exec.getId(),exec.getValue(),exec.getParam()));
}
for(IfType iflist : myElse.getIfArray()){
node.addIf(fillIfs(iflist));
}
return node;
}
private TLTNode FillNode(ThenType myThen) {
TLTNode node=new TLTNode();
for(ExecType exec : myThen.getExecArray()){
node.addExec(new TLTExec(exec.getId(),exec.getValue(),exec.getParam()));
}
for(IfType iflist : myThen.getIfArray()){
node.addIf(fillIfs(iflist));
}
return node;
}
The difference is only in the parameter.. Parameters are auto-generated types created by XMLBeans so we can't change it...
I'm coding the relation between the if value attributes and the conds nodes.
As we build the tree we have insert the cond in it and therefore we'll have to find the cond node by ourselves.
We won't need the # in the if statement anymore. Here is the new XML sample for the tasklist.
The Task tree is implemented , filled and tested. Everything works fine by now.
Attachments
-
new-tasklist.xml
(1.7 KB) - added by fbatard
5 years ago.
new tasklist sample
-
tasklist-schema.2.xsd
(6.8 KB) - added by fbatard
5 years ago.
new Schema
