[svn r298] pinrted steps in xml mapping
This commit is contained in:
parent
32a23704bd
commit
33ea222ae1
|
@ -29,6 +29,8 @@ package com.idcanet.foei.core.impl;
|
|||
import com.idcanet.foei.core.ObjectBindingsManager;
|
||||
import com.idcanet.foei.event.EventPort;
|
||||
import com.idcanet.foei.event.EventPortType;
|
||||
import com.idcanet.foei.event.EventStep;
|
||||
import com.idcanet.foei.event.EventStepController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -42,8 +44,7 @@ import java.util.logging.Logger;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 20/04/2005
|
||||
*/
|
||||
public class ObjectBindingsManagerImpl implements ObjectBindingsManager
|
||||
{
|
||||
public class ObjectBindingsManagerImpl implements ObjectBindingsManager {
|
||||
/** */
|
||||
private Map<EventPort,List<EventPort>> bindingsOutput = null;
|
||||
/** Works like: eventPort(input) -> List (EventPorts(output) */
|
||||
|
@ -165,12 +166,24 @@ public class ObjectBindingsManagerImpl implements ObjectBindingsManager
|
|||
StringBuffer result = new StringBuffer();
|
||||
result.append("<?xml version=\"1.0\"?>\n");
|
||||
result.append("<bindings>\n");
|
||||
//FoeiProcess process = FoeiProcessFactory.getFoeiProcess();
|
||||
// todo: ID nameing should go automatic, and be reverse lookup'ale
|
||||
|
||||
for(EventPort port:bindingsOutput.keySet()) {
|
||||
for(EventPort b:getBindings(port)) {
|
||||
result.append("<binding outputId=\""+port.getEventObject()+"\" outputPortName=\""+port.getName());
|
||||
result.append("\" inputId=\""+b.getEventObject()+"\" inputPortName=\""+b.getName()+"\" inputPortPassed=\""+b.getEventsPassed());
|
||||
result.append("\"/>\n");
|
||||
|
||||
for(EventPort b:getBindings(port)) {
|
||||
result.append("\t<binding outputClass=\""+port.getEventObject()+"\" outputPortName=\""+port.getName());
|
||||
result.append("\" inputClass=\""+b.getEventObject()+"\" inputPortName=\""+b.getName()+"\" inputPortPassed=\""+b.getEventsPassed());
|
||||
Object o = port.getEventObject();
|
||||
if (o instanceof EventStepController) {
|
||||
result.append("\">\n");
|
||||
EventStepController e = (EventStepController)o;
|
||||
for(EventStep es:e.getEventSteps()) {
|
||||
result.append("\t\t<step stepClass=\""+es+"\"/>\n");
|
||||
}
|
||||
result.append("\t</binding>\n");
|
||||
} else {
|
||||
result.append("\"/>\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
result.append("</bindings>");
|
||||
|
|
Loading…
Reference in a new issue