Examples of OntoSpreadRestrictionMinActivationValue


Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinActivationValue

  private final static Random rand = new Random();
 
  public static OntoSpreadStrategyVisitorPair createSelectStrategy(){
    //Restrictions: Strategy Select
    OntoSpreadCompositeRestriction restrictionsSelect = new OntoSpreadCompositeRestriction();
    restrictionsSelect.getRestrictions().add(new OntoSpreadRestrictionMinActivationValue(10.0));
    OntoSpreadStrategy selectStrategy = new OntoSpreadSelectConceptStrategy(restrictionsSelect);   
    return new OntoSpreadStrategyVisitorPair(selectStrategy,new OntoSpreadBooleanRestrictionVisitor());   
  }
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinActivationValue

      int retries,
      long time){
    OntoSpreadCompositeRestriction restrictions = new OntoSpreadCompositeRestriction();
    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.restrictions.common.OntoSpreadRestrictionMinActivationValue

      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

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinActivationValue

  private final static Random rand = new Random();
 
  public static OntoSpreadStrategyVisitorPair createSelectStrategy(){
    //Restrictions: Strategy Select
    OntoSpreadCompositeRestriction restrictionsSelect = new OntoSpreadCompositeRestriction();
    restrictionsSelect.getRestrictions().add(new OntoSpreadRestrictionMinActivationValue(10.0));
    OntoSpreadStrategy selectStrategy = new OntoSpreadSelectConceptStrategy(restrictionsSelect);   
    return new OntoSpreadStrategyVisitorPair(selectStrategy,new OntoSpreadBooleanRestrictionVisitor());   
  }
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinActivationValue

      int retries,
      long time){
    OntoSpreadCompositeRestriction restrictions = new OntoSpreadCompositeRestriction();
    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.restrictions.common.OntoSpreadRestrictionMinActivationValue

      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

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinActivationValue

    return activation;
  }

  public void setActivation(ActivationRestriction activation) {
    this.activation = activation;
    this.spreadMinAct = new   OntoSpreadRestrictionMinActivationValue(this.activation.getConfig().getInit());
  }
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinActivationValue

  }
 
  public void testApplySelectConceptStrategy() {
    //Restrictions
    OntoSpreadCompositeRestriction restrictions = new OntoSpreadCompositeRestriction();
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMinActivationValue(10.0));
    //State   
    OntoSpreadState state = new OntoSpreadState();
   
   
    ConceptTO conceptTO = new ConceptTO("http://uri.to.test");
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinActivationValue

public class OntoSpreadTestUtils {

  public static OntoSpreadStrategyVisitorPair createSelectStrategy(){
    //Restrictions: Strategy Select
    OntoSpreadCompositeRestriction restrictionsSelect = new OntoSpreadCompositeRestriction();
    restrictionsSelect.getRestrictions().add(new OntoSpreadRestrictionMinActivationValue(10.0));
    OntoSpreadStrategy selectStrategy = new OntoSpreadSelectConceptStrategy(restrictionsSelect);   
    return new OntoSpreadStrategyVisitorPair(selectStrategy,new OntoSpreadBooleanRestrictionVisitor());   
  }
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinActivationValue

  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.