Codota Logo
jadex.rules.rulesystem.rules
Code IndexAdd Codota to your IDE (free)

How to use jadex.rules.rulesystem.rules

Best Java code snippets using jadex.rules.rulesystem.rules (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Create querygoal processing rule.
 */
protected static Rule createQuerygoalProcessingRule()
{
  Variable rgoal = new Variable("?rgoal", OAVBDIRuntimeModel.goal_type);
  
  ObjectCondition    goalcon    = new ObjectCondition(OAVBDIRuntimeModel.goal_type);
  goalcon.addConstraint(new BoundConstraint(null, rgoal));
  goalcon.addConstraint(new LiteralConstraint(OAVBDIRuntimeModel.goal_has_lifecyclestate, OAVBDIRuntimeModel.GOALLIFECYCLESTATE_ACTIVE));
  goalcon.addConstraint(new LiteralConstraint(OAVBDIRuntimeModel.goal_has_processingstate, OAVBDIRuntimeModel.GOALPROCESSINGSTATE_IDLE));
  goalcon.addConstraint(new LiteralConstraint(OAVBDIRuntimeModel.element_has_model, OAVBDIMetaModel.querygoal_type, IOperator.INSTANCEOF));
  ObjectCondition    capcon    = new ObjectCondition(OAVBDIRuntimeModel.capability_type);
  capcon.addConstraint(new BoundConstraint(OAVBDIRuntimeModel.capability_has_goals, rgoal, IOperator.CONTAINS));
  Rule querygoal_processing = new Rule("querygoal_processing", new AndCondition(new ICondition[]{goalcon, capcon}), GOAL_PROCESSING);
  return querygoal_processing;
}
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Evaluate two objects with respect to the
 *  operator semantics.
 *  @param state The state.
 *  @param val1 The first object.
 *  @param val2 The second object.
 *  @return True, if objects fit wrt. the operator semantics.
 */
public boolean evaluate(IOAVState state, Object val1, Object val2)
{
  val1 = val1 instanceof ILazyValue? ((ILazyValue)val1).getValue(): val1; 
  val2 = val2 instanceof ILazyValue? ((ILazyValue)val2).getValue(): val2; 
  return val1!=null && val2!=null && compare(val1, val2)<=0;
}
 
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Test if a variable is contained in the expression.
 *  @param var    The variable.
 *  @return    True, when the variable is contained.
 */
public boolean	containsVariable(Variable var)
{
  return var.equals(variable);
}
 
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Evaluate two objects with respect to the
 *  operator semantics.
 *  @param state The state.
 *  @param val1 The first object.
 *  @param val2 The second object.
 *  @return True, if objects fit wrt. the operator semantics.
 */
public boolean evaluate(IOAVState state, Object val1, Object val2)
{
  val1 = val1 instanceof ILazyValue? ((ILazyValue)val1).getValue(): val1; 
  val2 = val2 instanceof ILazyValue? ((ILazyValue)val2).getValue(): val2; 
  return !contains(val1, val2);
}
 
origin: org.activecomponents.jadex/jadex-rules

  /**
   *  Get the string representation.
   *  @return The string representation.
   */
  public String toString()
  {
    return "("+getValueSource()+getOperator()+value+")";
  }
}
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Get the variables.
 *  @return The declared variables.
 */
public List getVariables()
{
  return funcall.getVariables();
}
 
origin: org.activecomponents.jadex/jadex-rules

  /**
   *  Get the string representation.
   *  @return The string representation.
   */
  public String toString()
  {
    //return "Variable(name="+name+")";//, type="+type+")";
    //return (!isMulti()? "Variable(": "Multivariable(")+name+")";
//        return (!isMulti()? "Variable(": "Multivariable(")+name+": "+type!=null? type.getName(): "null"+")";
    return (!isMulti()? "Variable(": "Multivariable(")+name+")";
  }
}
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Create a new object condition.
 */
public CollectCondition(ObjectCondition ocon, List constraints)
{
  this(createList(ocon), constraints);
}
 
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Get the variables.
 *  @return The declared variables.
 */
public List getVariables()
{
  return constraint.getVariables();
}
origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Create achievegoal processing rule.
 */
protected static Rule createAchievegoalProcessingRule()
{
  Variable rgoal = new Variable("?rgoal", OAVBDIRuntimeModel.goal_type);
  
  ObjectCondition    goalcon    = new ObjectCondition(OAVBDIRuntimeModel.goal_type);
  goalcon.addConstraint(new BoundConstraint(null, rgoal));
  goalcon.addConstraint(new LiteralConstraint(OAVBDIRuntimeModel.goal_has_lifecyclestate, OAVBDIRuntimeModel.GOALLIFECYCLESTATE_ACTIVE));
  goalcon.addConstraint(new LiteralConstraint(OAVBDIRuntimeModel.goal_has_processingstate, OAVBDIRuntimeModel.GOALPROCESSINGSTATE_IDLE));
  goalcon.addConstraint(new LiteralConstraint(OAVBDIRuntimeModel.element_has_model, OAVBDIMetaModel.achievegoal_type, IOperator.INSTANCEOF));
  
  ObjectCondition    capcon    = new ObjectCondition(OAVBDIRuntimeModel.capability_type);
  capcon.addConstraint(new BoundConstraint(OAVBDIRuntimeModel.capability_has_goals, rgoal, IOperator.CONTAINS));
  Rule achievegoal_processing    = new Rule("achievegoal_processing", new AndCondition(new ICondition[]{goalcon, capcon}), GOAL_PROCESSING);
  return achievegoal_processing;
}
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Evaluate two objects with respect to the
 *  operator semantics.
 *  @param state The state.
 *  @param val1 The first object.
 *  @param val2 The second object.
 *  @return True, if objects fit wrt. the operator semantics.
 */
public boolean evaluate(IOAVState state, Object val1, Object val2)
{
  val1 = val1 instanceof ILazyValue? ((ILazyValue)val1).getValue(): val1; 
  val2 = val2 instanceof ILazyValue? ((ILazyValue)val2).getValue(): val2; 
  return val1!=null && val2!=null && compare(val1, val2)>0;
}
 
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Evaluate two objects with respect to the
 *  operator semantics.
 *  @param state The state.
 *  @param val1 The first object.
 *  @param val2 The second object.
 *  @return True, if objects fit wrt. the operator semantics.
 */
public boolean evaluate(IOAVState state, Object val1, Object val2)
{
  val1 = val1 instanceof ILazyValue? ((ILazyValue)val1).getValue(): val1; 
  val2 = val2 instanceof ILazyValue? ((ILazyValue)val2).getValue(): val2; 
  return contains(val1, val2);
}
 
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Test if a variable is contained in the expression.
 *  @param var    The variable.
 *  @return    True, when the variable is contained.
 */
public boolean	containsVariable(Variable var)
{
  return var.equals(variable);
}
 
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Get the variables.
 *  @return The declared variables.
 */
public List getVariables()
{
  return funcall.getVariables();
}
 
origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Create the goal failed rule (when no plans available).
 *  (state = nocandidates, recur = false)
 */
protected static Rule createGoalFailedRule()
{
  Variable rgoal = new Variable("?rgoal", OAVBDIRuntimeModel.goal_type);
  ObjectCondition    goalcon    = new ObjectCondition(OAVBDIRuntimeModel.goal_type);
  goalcon.addConstraint(new BoundConstraint(null, rgoal));
  goalcon.addConstraint(new LiteralConstraint(OAVBDIRuntimeModel.processableelement_has_state, OAVBDIRuntimeModel.PROCESSABLEELEMENT_NOCANDIDATES));
  goalcon.addConstraint(new LiteralConstraint(new OAVAttributeType[]{OAVBDIRuntimeModel.element_has_model, OAVBDIMetaModel.goal_has_recur}, Boolean.FALSE));
  
  Rule goal_failed = new Rule("goal_failed", goalcon, GOAL_FAILED);
  return goal_failed;
}
 
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Evaluate two objects with respect to the
 *  operator semantics.
 *  @param state The state.
 *  @param val1 The first object.
 *  @param val2 The second object.
 *  @return True, if objects fit wrt. the operator semantics.
 */
public boolean evaluate(IOAVState state, Object val1, Object val2)
{
  val1 = val1 instanceof ILazyValue? ((ILazyValue)val1).getValue(): val1; 
  val2 = val2 instanceof ILazyValue? ((ILazyValue)val2).getValue(): val2; 
  return val1!=null && val2!=null && compare(val1, val2)>=0;
}
 
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Evaluate two objects with respect to the
 *  operator semantics.
 *  @param state The state.
 *  @param val1 The first object.
 *  @param val2 The second object.
 *  @return True, if objects fit wrt. the operator semantics.
 */
public boolean evaluate(IOAVState state, Object val1, Object val2)
{
  val1 = val1 instanceof ILazyValue? ((ILazyValue)val1).getValue(): val1; 
  val2 = val2 instanceof ILazyValue? ((ILazyValue)val2).getValue(): val2; 
  return !contains(val1, val2);
}
 
origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Create performgoal processing rule.
 */
protected static Rule createPerformgoalProcessingRule()
{
  Variable rgoal = new Variable("?rgoal", OAVBDIRuntimeModel.goal_type);
  
  ObjectCondition    goalcon    = new ObjectCondition(OAVBDIRuntimeModel.goal_type);
  goalcon.addConstraint(new BoundConstraint(null, rgoal));
  goalcon.addConstraint(new LiteralConstraint(OAVBDIRuntimeModel.goal_has_lifecyclestate, OAVBDIRuntimeModel.GOALLIFECYCLESTATE_ACTIVE));
  goalcon.addConstraint(new LiteralConstraint(OAVBDIRuntimeModel.goal_has_processingstate, OAVBDIRuntimeModel.GOALPROCESSINGSTATE_IDLE));
  goalcon.addConstraint(new LiteralConstraint(OAVBDIRuntimeModel.element_has_model, OAVBDIMetaModel.performgoal_type, IOperator.INSTANCEOF));
  
  ObjectCondition    capacon    = new ObjectCondition(OAVBDIRuntimeModel.capability_type);
  capacon.addConstraint(new BoundConstraint(OAVBDIRuntimeModel.capability_has_goals, rgoal, IOperator.CONTAINS));
  Rule performgoal_processing    = new Rule("performgoal_processing", new AndCondition(new ICondition[]{goalcon, capacon}), GOAL_PROCESSING);
  return performgoal_processing;
}
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Evaluate two objects with respect to the
 *  operator semantics.
 *  @param state The state.
 *  @param val1 The first object.
 *  @param val2 The second object.
 *  @return True, if objects fit wrt. the operator semantics.
 */
public boolean evaluate(IOAVState state, Object val1, Object val2)
{
  val1 = val1 instanceof ILazyValue? ((ILazyValue)val1).getValue(): val1; 
  val2 = val2 instanceof ILazyValue? ((ILazyValue)val2).getValue(): val2; 
  return val1!=null && val2!=null && compare(val1, val2)<=0;
}
 
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Evaluate two objects with respect to the
 *  operator semantics.
 *  @param state The state.
 *  @param val1 The first object.
 *  @param val2 The second object.
 *  @return True, if objects fit wrt. the operator semantics.
 */
public boolean evaluate(IOAVState state, Object val1, Object val2)
{
  val1 = val1 instanceof ILazyValue? ((ILazyValue)val1).getValue(): val1; 
  val2 = val2 instanceof ILazyValue? ((ILazyValue)val2).getValue(): val2; 
  return val1!=null && val2!=null && compare(val1, val2)>=0;
}
 
jadex.rules.rulesystem.rules

Most used classes

  • AndCondition
    Condition for and-ing contained conditions.
  • BoundConstraint
    A BoundConstraint assures that ( var)
  • FunctionCall
    Represents a function call.
  • LiteralConstraint
    A literal contraint assures that an object field/method has the specified (return) value. LiteralCon
  • NotCondition
    Condition for negating another condition.
  • OrConstraint,
  • PredicateConstraint,
  • Rule,
  • Variable,
  • OperatorFunction,
  • AndConstraint,
  • CollectCondition,
  • Constant,
  • ConstrainableCondition,
  • Constraint,
  • ILazyValue,
  • LiteralReturnValueConstraint,
  • TestCondition,
  • ValueSourceReturnValueConstraint
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now