if(max!= 0) restrictions.getRestrictions().add(new OntoSpreadRestrictionMaxConcepts(max));
if(minActivation != 0)restrictions.getRestrictions().add(new OntoSpreadRestrictionMinActivationValue(minActivation));
if(context!=null && !context.equals("") && retries!=0)restrictions.getRestrictions().add(new OntoSpreadRestrictionContext(context,retries));
if(time != 0) restrictions.getRestrictions().add(new OntoSpreadRestrictionNotMaxTime(time));
OntoSpreadStrategy stopStrategy = new OntoSpreadSimpleStrategy(restrictions);
return new OntoSpreadStrategyVisitorPair(stopStrategy,new OntoSpreadBooleanRestrictionVisitor());
}