Examples of OntoSpreadCompositeRestriction


Examples of org.ontospread.restrictions.OntoSpreadCompositeRestriction

  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.OntoSpreadCompositeRestriction

      int max,
      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);   
    return new OntoSpreadStrategyVisitorPair(stopStrategy,new OntoSpreadBooleanRestrictionVisitor());   
  }
View Full Code Here

Examples of org.ontospread.restrictions.OntoSpreadCompositeRestriction

  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.OntoSpreadCompositeRestriction

    return ontoDAO;
  }


  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.OntoSpreadCompositeRestriction

    restrictions.getRestrictions().add(new OntoSpreadRestrictionMaxConcepts(10));
    return restrictions;
  }

  public OntoSpreadCompositeRestriction createDefaultSelectConceptRestriction() {
    OntoSpreadCompositeRestriction restrictions = new OntoSpreadCompositeRestriction();   
    return restrictions;
  }
View Full Code Here

Examples of org.ontospread.restrictions.OntoSpreadCompositeRestriction

  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.OntoSpreadCompositeRestriction

      int max,
      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);   
    return new OntoSpreadStrategyVisitorPair(stopStrategy,new OntoSpreadBooleanRestrictionVisitor());   
  }
View Full Code Here

Examples of org.ontospread.restrictions.OntoSpreadCompositeRestriction

  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.OntoSpreadCompositeRestriction

    this.timeRestriction = timeRestriction;
    this.spreadTime = new OntoSpreadRestrictionNotMaxTime(this.timeRestriction.getConfig().getInit());
  }
 
  public OntoSpreadCompositeRestriction asStopRestriction(){
    OntoSpreadCompositeRestriction composite = new OntoSpreadCompositeRestriction();
    addRestrictionToComposite(composite,spreadContext);
    addRestrictionToComposite(composite,spreadMaxConcepts);
    addRestrictionToComposite(composite,spreadMinConcepts);
    addRestrictionToComposite(composite,spreadMinAct);
    addRestrictionToComposite(composite,spreadTime);
View Full Code Here

Examples of org.ontospread.restrictions.OntoSpreadCompositeRestriction

      composite.getRestrictions().add(restriction);
    }
  }
 
  public OntoSpreadCompositeRestriction asSelectRestriction(){
    OntoSpreadCompositeRestriction composite = new OntoSpreadCompositeRestriction();
    addRestrictionToComposite(composite,spreadContext);
    addRestrictionToComposite(composite,spreadMinAct);
    return  composite;
  }
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.