Examples of OntoSpreadSimpleStrategy


Examples of org.ontospread.strategy.OntoSpreadSimpleStrategy

    if(min!= 0) restrictions.getRestrictions().add(new OntoSpreadRestrictionMinConcepts(min));
    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());   
  }
View Full Code Here

Examples of org.ontospread.strategy.OntoSpreadSimpleStrategy

      double minActivation){
    OntoSpreadCompositeRestriction restrictions = new OntoSpreadCompositeRestriction();
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMinConcepts(min));
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMaxConcepts(max))
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMinActivationValue(minActivation));
    OntoSpreadStrategy stopStrategy = new OntoSpreadSimpleStrategy(restrictions);   
    return new OntoSpreadStrategyVisitorPair(stopStrategy,new OntoSpreadBooleanRestrictionVisitor());   
  }
View Full Code Here

Examples of org.ontospread.strategy.OntoSpreadSimpleStrategy

    OntoSpreadStrategy selectStrategy = new OntoSpreadSelectConceptStrategy(restrictions);   
    return new OntoSpreadStrategyVisitorPair(selectStrategy,new OntoSpreadBooleanRestrictionVisitor());   
  }

  public static OntoSpreadStrategyVisitorPair createStopStrategy(OntoSpreadRestriction restrictions){
    OntoSpreadStrategy stopStrategy = new OntoSpreadSimpleStrategy(restrictions);   
    return new OntoSpreadStrategyVisitorPair(stopStrategy,new OntoSpreadBooleanRestrictionVisitor());   
  }
View Full Code Here

Examples of org.ontospread.strategy.OntoSpreadSimpleStrategy

  }


  public OntoSpreadStrategyVisitorPair createManagerStopStrategy(){
    return new OntoSpreadStrategyVisitorPair(
                new OntoSpreadSimpleStrategy(createDefaultStopRestrictions()),
                new OntoSpreadBooleanRestrictionVisitor());
  }
View Full Code Here

Examples of org.ontospread.strategy.OntoSpreadSimpleStrategy

    return new OntoSpreadStrategyVisitorPair(
                new OntoSpreadSimpleStrategy(createDefaultStopRestrictions()),
                new OntoSpreadBooleanRestrictionVisitor());
  }
  public OntoSpreadStrategyVisitorPair createManagerSelectConceptStrategy(){
    return new OntoSpreadStrategyVisitorPair(new OntoSpreadSimpleStrategy(
                createDefaultSelectConceptRestriction()),
                new OntoSpreadRestrictionVisitorAdapter());
  }
View Full Code Here

Examples of org.ontospread.strategy.OntoSpreadSimpleStrategy

    if(min!= 0) restrictions.getRestrictions().add(new OntoSpreadRestrictionMinConcepts(min));
    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());   
  }
View Full Code Here

Examples of org.ontospread.strategy.OntoSpreadSimpleStrategy

      double minActivation){
    OntoSpreadCompositeRestriction restrictions = new OntoSpreadCompositeRestriction();
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMinConcepts(min));
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMaxConcepts(max))
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMinActivationValue(minActivation));
    OntoSpreadStrategy stopStrategy = new OntoSpreadSimpleStrategy(restrictions);   
    return new OntoSpreadStrategyVisitorPair(stopStrategy,new OntoSpreadBooleanRestrictionVisitor());   
  }
View Full Code Here

Examples of org.ontospread.strategy.OntoSpreadSimpleStrategy

    restrictions.getRestrictions().add(new OntoSpreadRestrictionMinConcepts(2));
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMaxConcepts(10));
    //State   
    OntoSpreadState state = new OntoSpreadState();
   
    OntoSpreadStrategy strategy = new OntoSpreadSimpleStrategy(restrictions);   
    OntoSpreadStrategyVisitorPair pair = new OntoSpreadStrategyVisitorPair(strategy,new OntoSpreadBooleanRestrictionVisitor());
   
    Object continues = pair.applyStrategy(state) ;
    assertEquals(continues.getClass(),Boolean.class);
    assertTrue(((Boolean)continues).booleanValue());
View Full Code Here

Examples of org.ontospread.strategy.OntoSpreadSimpleStrategy

  public static OntoSpreadStrategyVisitorPair createStopStrategy(int min, int max, double minActivation){
    OntoSpreadCompositeRestriction restrictions = new OntoSpreadCompositeRestriction();
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMinConcepts(min));
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMaxConcepts(max))
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMinActivationValue(minActivation));
    OntoSpreadStrategy stopStrategy = new OntoSpreadSimpleStrategy(restrictions);   
    return new OntoSpreadStrategyVisitorPair(stopStrategy,new OntoSpreadBooleanRestrictionVisitor());   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.