final Object right = obj.rightExpr.accept(this, arg);
// Constant
if (left instanceof String[]){
final String[] constArray = (String[])left;
final ConstantOperator constOpL = new ConstantOperator();
constOpL.setConstant(constArray[1]);
constOpL.setComboBoxEntries(this.comboBoxEntries);
constOpL.setVisualRifEditor(this.visualRifEditor);
constOpL.getConstantComboBox().setSelectedItem(constArray[0]);
constOpL.setSelectedPrefix(constArray[0]);
switch((Integer) obj.rightExpr.accept(this.scout, arg)){
case Scout.RULEVARIABLE:
final VariableOperator varOpR = new VariableOperator();
varOpR.setVariable((String)right);
final OperatorIDTuple<Operator> oidtVar = new OperatorIDTuple<Operator> (varOpR, 0);
constOpL.addSucceedingOperator(oidtVar);
break;
case Scout.CONSTANT:
final ConstantOperator constOpR = new ConstantOperator();
constOpR.setVisualRifEditor(this.visualRifEditor);
constOpR.setComboBoxEntries(this.comboBoxEntries);
final String[] prefConst = (String[]) obj.rightExpr.accept(this, arg);
constOpR.setConstant(prefConst[1]);
constOpR.getConstantComboBox().setSelectedItem(prefConst[0]);
constOpR.setSelectedPrefix(prefConst[0]);
final OperatorIDTuple<Operator> oidtConst = new OperatorIDTuple<Operator> (constOpR, 0);
constOpL.addSucceedingOperator(oidtConst);
break;
case Scout.RULEPREDICATE:
if(right instanceof UnitermOperator){
final UnitermOperator factOpR = (UnitermOperator) right;
final OperatorIDTuple<Operator> oidtRulePred = new OperatorIDTuple<Operator> (factOpR, 0);
constOpL.addSucceedingOperator(oidtRulePred);
}
break;
case Scout.EXTERNAL:
if(right instanceof UnitermOperator){
final UnitermOperator factOpR = (UnitermOperator) right;
final OperatorIDTuple<Operator> oidtRulePred = new OperatorIDTuple<Operator> (factOpR, 0);
constOpL.addSucceedingOperator(oidtRulePred);
}
break;
case Scout.RULELIST:
final ListOperator listOpR = (ListOperator) right;
final OperatorIDTuple<Operator> oidt = new OperatorIDTuple<Operator> (listOpR, 0);
constOpL.addSucceedingOperator(oidt);
break;
default:
break;
}
return constOpL;
} // End Constant
// Variable
if (left instanceof String){
final VariableOperator varOpL = new VariableOperator();
varOpL.setVariable((String)left);
switch((Integer) obj.rightExpr.accept(this.scout, arg)){
case Scout.RULEVARIABLE:
final VariableOperator varOpR = new VariableOperator();
varOpR.setVariable((String)right);
final OperatorIDTuple<Operator> oidtVar = new OperatorIDTuple<Operator> (varOpR, 0);
varOpL.addSucceedingOperator(oidtVar);
break;
case Scout.CONSTANT:
final ConstantOperator constOpR = new ConstantOperator();
constOpR.setVisualRifEditor(this.visualRifEditor);
constOpR.setComboBoxEntries(this.comboBoxEntries);
final String[] prefConst = (String[]) obj.rightExpr.accept(this, arg);
constOpR.setConstant(prefConst[1]);
constOpR.getConstantComboBox().setSelectedItem(prefConst[0]);
constOpR.setSelectedPrefix(prefConst[0]);
final OperatorIDTuple<Operator> oidtConst = new OperatorIDTuple<Operator> (constOpR, 0);
varOpL.addSucceedingOperator(oidtConst);
break;
case Scout.RULEPREDICATE:
if(right instanceof UnitermOperator){
final UnitermOperator factOpR = (UnitermOperator) right;
final OperatorIDTuple<Operator> oidtRulePred = new OperatorIDTuple<Operator> (factOpR, 0);
varOpL.addSucceedingOperator(oidtRulePred);
}
break;
case Scout.EXTERNAL:
if(right instanceof UnitermOperator){
final UnitermOperator factOpR = (UnitermOperator) right;
final OperatorIDTuple<Operator> oidtRulePred = new OperatorIDTuple<Operator> (factOpR, 0);
varOpL.addSucceedingOperator(oidtRulePred);
}
break;
case Scout.RULELIST:
final ListOperator listOpR = (ListOperator) right;
final OperatorIDTuple<Operator> oidt = new OperatorIDTuple<Operator> (listOpR, 0);
varOpL.addSucceedingOperator(oidt);
break;
default:
break;
}
return varOpL;
}// End Variable
// Uniterm
if (left instanceof UnitermOperator){
final UnitermOperator unitermOperator = (UnitermOperator) left;
switch((Integer) obj.rightExpr.accept(this.scout, arg)){
case Scout.RULEVARIABLE:
final VariableOperator varOpR = new VariableOperator();
varOpR.setVariable((String)right);
final OperatorIDTuple<Operator> oidtVar = new OperatorIDTuple<Operator> (varOpR, 0);
unitermOperator.addSucceedingOperator(oidtVar);
break;
case Scout.CONSTANT:
final ConstantOperator constOpR = new ConstantOperator();
constOpR.setVisualRifEditor(this.visualRifEditor);
constOpR.setComboBoxEntries(this.comboBoxEntries);
final String[] prefConst = (String[]) obj.rightExpr.accept(this, arg);
constOpR.setConstant(prefConst[1]);
constOpR.getConstantComboBox().setSelectedItem(prefConst[0]);
constOpR.setSelectedPrefix(prefConst[0]);
final OperatorIDTuple<Operator> oidtConst = new OperatorIDTuple<Operator> (constOpR, 0);
unitermOperator.addSucceedingOperator(oidtConst);
break;
case Scout.RULEPREDICATE:
if(right instanceof UnitermOperator){
final UnitermOperator factOpR = (UnitermOperator) right;
final OperatorIDTuple<Operator> oidtRulePred = new OperatorIDTuple<Operator> (factOpR, 0);
unitermOperator.addSucceedingOperator(oidtRulePred);
}
break;
case Scout.EXTERNAL:
if(right instanceof UnitermOperator){
final UnitermOperator factOpR = (UnitermOperator) right;
final OperatorIDTuple<Operator> oidtRulePred = new OperatorIDTuple<Operator> (factOpR, 0);
unitermOperator.addSucceedingOperator(oidtRulePred);
}
break;
case Scout.RULELIST:
final ListOperator listOpR = (ListOperator) right;
final OperatorIDTuple<Operator> oidt = new OperatorIDTuple<Operator> (listOpR, 0);
unitermOperator.addSucceedingOperator(oidt);
break;
default:
break;
}
return unitermOperator;
}// End Uniterm
// List
if (left instanceof ListOperator){
final ListOperator listOperator = (ListOperator) left;
switch((Integer) obj.rightExpr.accept(this.scout, arg)){
case Scout.RULEVARIABLE:
final VariableOperator varOpR = new VariableOperator();
varOpR.setVariable((String)right);
final OperatorIDTuple<Operator> oidtVar = new OperatorIDTuple<Operator> (varOpR, 0);
listOperator.addSucceedingOperator(oidtVar);
break;
case Scout.CONSTANT:
final ConstantOperator constOpR = new ConstantOperator();
constOpR.setVisualRifEditor(this.visualRifEditor);
constOpR.setComboBoxEntries(this.comboBoxEntries);
final String[] prefConst = (String[]) obj.rightExpr.accept(this, arg);
constOpR.setConstant(prefConst[1]);
constOpR.getConstantComboBox().setSelectedItem(prefConst[0]);
constOpR.setSelectedPrefix(prefConst[0]);
final OperatorIDTuple<Operator> oidtConst = new OperatorIDTuple<Operator> (constOpR, 0);
listOperator.addSucceedingOperator(oidtConst);
break;
case Scout.RULEPREDICATE:
if(right instanceof UnitermOperator){
final UnitermOperator factOpR = (UnitermOperator) right;
final OperatorIDTuple<Operator> oidtRulePred = new OperatorIDTuple<Operator> (factOpR, 0);
listOperator.addSucceedingOperator(oidtRulePred);
}
break;
case Scout.EXTERNAL:
if(right instanceof UnitermOperator){
final UnitermOperator factOpR = (UnitermOperator) right;
final OperatorIDTuple<Operator> oidtRulePred = new OperatorIDTuple<Operator> (factOpR, 0);
listOperator.addSucceedingOperator(oidtRulePred);
}
break;
case Scout.RULELIST:
final ListOperator listOpR = (ListOperator) right;
final OperatorIDTuple<Operator> oidt = new OperatorIDTuple<Operator> (listOpR, 0);
listOperator.addSucceedingOperator(oidt);
break;
default:
break;
}
return listOperator;
}// End List
// Frame
if (left instanceof FrameOperator){
final FrameOperator frameOperator = (FrameOperator) left;
switch((Integer) obj.rightExpr.accept(this.scout, arg)){
case Scout.RULEVARIABLE:
final VariableOperator varOpR = new VariableOperator();
varOpR.setVariable((String)right);
final OperatorIDTuple<Operator> oidtVar = new OperatorIDTuple<Operator> (varOpR, 0);
frameOperator.addSucceedingOperator(oidtVar);
break;
case Scout.CONSTANT:
final ConstantOperator constOpR = new ConstantOperator();
constOpR.setVisualRifEditor(this.visualRifEditor);
constOpR.setComboBoxEntries(this.comboBoxEntries);
final String[] prefConst = (String[]) obj.rightExpr.accept(this, arg);
constOpR.setConstant(prefConst[1]);
constOpR.getConstantComboBox().setSelectedItem(prefConst[0]);
constOpR.setSelectedPrefix(prefConst[0]);
final OperatorIDTuple<Operator> oidtConst = new OperatorIDTuple<Operator> (constOpR, 0);
frameOperator.addSucceedingOperator(oidtConst);
break;
case Scout.RULEPREDICATE: