Commit ff1ecdb7 authored by Sascha Herzinger's avatar Sascha Herzinger

fixing operator state issues

parent b1154536
Pipeline #14066 failed with stage
in 22 minutes and 37 seconds
......@@ -59,7 +59,10 @@ abstract class LogicalOperatorProcessor extends GlyphProcessor {
.filter(arc -> ArcClazz.fromClazz(arc.getClazz()) == ArcClazz.LOGIC_ARC)
.filter(arc -> arc.getTarget().equals(firstPort) || arc.getTarget().equals(secondPort))
.map(arc -> arc2Reactant(arc, model))
.forEach(reaction::addReactant);
.forEach(reactant -> {
reaction.addReactant(reactant);
operator.addInput(reactant);
});
return reaction;
}
......
......@@ -32,6 +32,7 @@ abstract class ModulatingArcProcessor extends ArcProcessor {
} else { // remove placeholder reaction
model.removeReaction(reaction);
}
reaction.getOperators().get(0).addOutput(product);
reaction.addProduct(product);
reaction.setLine(line);
reaction.getNodes().forEach(node -> node.setLine(line));
......
......@@ -135,7 +135,7 @@ public class SBGNAFConverterTest {
Reaction reaction = model.getReactions().iterator().next();
assertEquals(1, reaction.getOperators().size());
NodeOperator operator = reaction.getOperators().get(0);
assertEquals(3, operator.getInputs().size());
assertEquals(2, operator.getInputs().size());
assertEquals(1, operator.getOutputs().size());
assertTrue(operator.isReactantOperator());
assertEquals(2, reaction.getReactants().size());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment