Examples of OntoSpreadRestrictionMinConcepts


Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinConcepts

      double minActivation,
      String context,
      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);   
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinConcepts

  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

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinConcepts

  }


  public OntoSpreadCompositeRestriction createDefaultStopRestrictions() {
    OntoSpreadCompositeRestriction restrictions = new OntoSpreadCompositeRestriction();
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMinConcepts(2));
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMaxConcepts(10));
    return restrictions;
  }
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinConcepts

      double minActivation,
      String context,
      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);   
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinConcepts

  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

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinConcepts

  }

  public void setMinConceptsRestriction(
      MinConceptsRestriction minConceptsRestriction) {
    this.minConceptsRestriction = minConceptsRestriction;
    this.spreadMinConcepts = new OntoSpreadRestrictionMinConcepts(this.minConceptsRestriction.getConfig().getInit());
  }
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinConcepts

public class OntoSpreadBooleanRestrictionVisitorTest extends TestCase {

  public void testVisitOntoSpreadCompositeRestriction() {
    OntoSpreadCompositeRestriction restrictions = new OntoSpreadCompositeRestriction();
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMinConcepts(2));
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMaxConcepts(10));   
    OntoSpreadState state = new OntoSpreadState();
    OntoSpreadBooleanRestrictionVisitor visitor = new OntoSpreadBooleanRestrictionVisitor();
    visitor.setOntoSpreadState(state);
    Object stop = visitor.visit(restrictions);
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinConcepts

    assertFalse(((Boolean)stop).booleanValue());
   
  }

  public void testVisitOntoSpreadSimpleRestriction() {
    OntoSpreadRestriction restriction = new OntoSpreadRestrictionMinConcepts(2);
    OntoSpreadState state = new OntoSpreadState();
    OntoSpreadBooleanRestrictionVisitor visitor = new OntoSpreadBooleanRestrictionVisitor();
    visitor.setOntoSpreadState(state);
    Object stop = visitor.visit(restriction);
    assertEquals(stop.getClass(),Boolean.class);
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinConcepts

public class OntoSpreadStrategyVisitorPairTest extends TestCase {

  public void testApplyStopStrategy() {
    //Restrictions
    OntoSpreadCompositeRestriction restrictions = new OntoSpreadCompositeRestriction();
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMinConcepts(2));
    restrictions.getRestrictions().add(new OntoSpreadRestrictionMaxConcepts(10));
    //State   
    OntoSpreadState state = new OntoSpreadState();
   
    OntoSpreadStrategy strategy = new OntoSpreadSimpleStrategy(restrictions);   
View Full Code Here

Examples of org.ontospread.restrictions.common.OntoSpreadRestrictionMinConcepts

    return new OntoSpreadStrategyVisitorPair(selectStrategy,new OntoSpreadBooleanRestrictionVisitor());   
  }

  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.