private void execIterateRestriction(RestrictionType restriction, Test test, RestrictionManagerHelper manager) throws ConceptNotFoundException {
logger.info("::Iterating with restriction "+restriction.getClass().getSimpleName()+" ::");
//FIXME:refactor: polimorfismo
if(restriction instanceof MaxConceptsRestriction){
while(!manager.hasStopMaxConcepts()){
StateDAOPairTO state = execute(test, manager);
showState(state.getOntoSpreadState());
reportIteration(test, state, manager);
manager.buildMaxRestriction(true);
}
}else if(restriction instanceof MinConceptsRestriction){
while(!manager.hasStopMinConcepts()){
StateDAOPairTO state = execute(test, manager);
showState(state.getOntoSpreadState());
reportIteration(test, state, manager);
manager.buildMinRestriction(true);
}
}else if(restriction instanceof ActivationRestriction){
while(!manager.hasStopAct()){
StateDAOPairTO state = execute(test, manager);
showState(state.getOntoSpreadState());
reportIteration(test, state, manager);
manager.buildActivationRestriction(true);
}
}else if(restriction instanceof ContextRestriction){
while(!manager.hasStopContextRetries()){
StateDAOPairTO state = execute(test, manager);
showState(state.getOntoSpreadState());
reportIteration(test, state, manager);
manager.buildContextRestriction(true);
}
}else if(restriction instanceof TimeRestriction){
while(!manager.hasStopTime()){
StateDAOPairTO state = execute(test, manager);
showState(state.getOntoSpreadState());
reportIteration(test, state, manager);
manager.buildTimeRestriction(true);
}
}else{