/** * This will get a list of all RHS bound variables. */ public List<String> getAllRHSVariables() { List<String> result = new ArrayList<String>(); for ( int i = 0; i < this.rhs.length; i++ ) { IAction pat = this.rhs[i]; if ( pat instanceof ActionInsertFact ) { ActionInsertFact fact = (ActionInsertFact) pat; if ( fact.isBound() ) { result.add( fact.getBoundName() ); } } } return result; }
/** * This will get a list of all RHS bound variables. */ public List<String> getAllRHSVariables() { List<String> result = new ArrayList<String>(); for ( int i = 0; i < this.rhs.length; i++ ) { IAction pat = this.rhs[i]; if ( pat instanceof ActionInsertFact ) { ActionInsertFact fact = (ActionInsertFact) pat; if ( fact.isBound() ) { result.add( fact.getBoundName() ); } } } return result; }
@Override public List<String> getAllRHSVariables() { Set<String> variables = new HashSet<String>(); for ( ActionCol52 col : dtable.getActionCols() ) { if ( col instanceof ActionInsertFactCol52 ) { ActionInsertFactCol52 action = (ActionInsertFactCol52) col; variables.add( action.getBoundName() ); } else if ( col instanceof BRLActionColumn ) { BRLActionColumn brl = (BRLActionColumn) col; for ( IAction a : brl.getDefinition() ) { if ( a instanceof ActionInsertFact ) { ActionInsertFact action = (ActionInsertFact) a; if ( action.isBound() ) { variables.add( action.getBoundName() ); } } } } } variables.addAll( super.getAllRHSVariables() ); return new ArrayList<String>( variables ); }
@Override public List<String> getRHSBoundFacts() { final Set<String> variables = new HashSet<String>(); for ( ActionCol52 col : dtable.getActionCols() ) { if ( col instanceof ActionInsertFactCol52 ) { ActionInsertFactCol52 action = (ActionInsertFactCol52) col; variables.add( action.getBoundName() ); } else if ( col instanceof BRLActionColumn ) { BRLActionColumn brl = (BRLActionColumn) col; for ( IAction a : brl.getDefinition() ) { if ( a instanceof ActionInsertFact ) { ActionInsertFact action = (ActionInsertFact) a; if ( action.isBound() ) { variables.add( action.getBoundName() ); } } } } } variables.addAll( super.getRHSBoundFacts() ); return new ArrayList<String>( variables ); }
@Override public List<String> getAllRHSVariables() { Set<String> variables = new HashSet<String>(); for ( ActionCol52 col : dtable.getActionCols() ) { if ( col instanceof ActionInsertFactCol52 ) { ActionInsertFactCol52 action = (ActionInsertFactCol52) col; variables.add( action.getBoundName() ); } else if ( col instanceof BRLActionColumn ) { BRLActionColumn brl = (BRLActionColumn) col; for ( IAction a : brl.getDefinition() ) { if ( a instanceof ActionInsertFact ) { ActionInsertFact action = (ActionInsertFact) a; if ( action.isBound() ) { variables.add( action.getBoundName() ); } } } } } variables.addAll( super.getAllRHSVariables() ); return new ArrayList<String>( variables ); }
@Override public List<String> getRHSBoundFacts() { final Set<String> variables = new HashSet<String>(); for ( ActionCol52 col : dtable.getActionCols() ) { if ( col instanceof ActionInsertFactCol52 ) { ActionInsertFactCol52 action = (ActionInsertFactCol52) col; variables.add( action.getBoundName() ); } else if ( col instanceof BRLActionColumn ) { BRLActionColumn brl = (BRLActionColumn) col; for ( IAction a : brl.getDefinition() ) { if ( a instanceof ActionInsertFact ) { ActionInsertFact action = (ActionInsertFact) a; if ( action.isBound() ) { variables.add( action.getBoundName() ); } } } } } variables.addAll( super.getRHSBoundFacts() ); return new ArrayList<String>( variables ); }
@Override public ActionInsertFact getRHSBoundFact(String var) { for ( ActionCol52 col : dtable.getActionCols() ) { if ( col instanceof ActionInsertFactCol52 ) { ActionInsertFactCol52 action = (ActionInsertFactCol52) col; if ( action.getBoundName().equals( var ) ) { if ( action.isInsertLogical() ) { return new ActionInsertFactCol52ActionInsertLogicalFactAdaptor( action ); } return new ActionInsertFactCol52ActionInsertFactAdaptor( action ); } } else if ( col instanceof BRLActionColumn ) { BRLActionColumn brl = (BRLActionColumn) col; for ( IAction a : brl.getDefinition() ) { if ( a instanceof ActionInsertFact ) { ActionInsertFact action = (ActionInsertFact) a; if ( action.isBound() ) { if ( action.getBoundName().equals( var ) ) { return action; } } } } } } return super.getRHSBoundFact( var ); }
@Override public ActionInsertFact getRHSBoundFact(String var) { for ( ActionCol52 col : dtable.getActionCols() ) { if ( col instanceof ActionInsertFactCol52 ) { ActionInsertFactCol52 action = (ActionInsertFactCol52) col; if ( action.getBoundName().equals( var ) ) { if ( action.isInsertLogical() ) { return new ActionInsertFactCol52ActionInsertLogicalFactAdaptor( action ); } return new ActionInsertFactCol52ActionInsertFactAdaptor( action ); } } else if ( col instanceof BRLActionColumn ) { BRLActionColumn brl = (BRLActionColumn) col; for ( IAction a : brl.getDefinition() ) { if ( a instanceof ActionInsertFact ) { ActionInsertFact action = (ActionInsertFact) a; if ( action.isBound() ) { if ( action.getBoundName().equals( var ) ) { return action; } } } } } } return super.getRHSBoundFact( var ); }