Package moise.os.fs

Class Goal

java.lang.Object
moise.common.MoiseElement
moise.os.fs.Goal
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, Identifiable, ToProlog, ToXML

public class Goal
extends MoiseElement
implements ToXML, ToProlog
Represents a Goal (in the specification).
Author:
Jomi Fred Hubner
See Also:
Serialized Form
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
      Constant Field Values
    • plan

      protected Plan plan
    • inPlan

      protected Plan inPlan
    • sch

      protected Scheme sch
    • desc

      protected java.lang.String desc
    • type

      protected Goal.GoalType type
    • minAgToSat

      protected int minAgToSat
    • args

      protected java.util.Map<java.lang.String,​java.lang.Object> args
    • ttf

      protected java.lang.String ttf
    • dependencies

      protected java.util.List<Goal> dependencies
    • location

      protected java.lang.String location
  • Constructor Details

    • Goal

      public Goal​(java.lang.String goal)
  • Method Details

    • hasArguments

      public boolean hasArguments()
    • addArgument

      public void addArgument​(java.lang.String argId, java.lang.Object value)
    • setScheme

      public void setScheme​(Scheme sch)
    • getScheme

      public Scheme getScheme()
    • setInPlan

      public void setInPlan​(Plan p)
    • getInPlan

      public Plan getInPlan()
    • getArguments

      public java.util.Map<java.lang.String,​java.lang.Object> getArguments()
      returns a map of the goal's arguments (key is the argument, value is the default value)
    • setPlan

      public void setPlan​(Plan p)
    • getPlan

      public Plan getPlan()
      gets the plan to achieve this goal (in case the goal is the head of a plan)
    • hasPlan

      public boolean hasPlan()
    • setDescription

      public void setDescription​(java.lang.String s)
    • getDescription

      public java.lang.String getDescription()
    • addDependence

      public void addDependence​(Goal g)
    • hasDependence

      public boolean hasDependence()
    • getDependencies

      public java.util.List<Goal> getDependencies()
    • getPreConditionGoals

      public java.util.List<Goal> getPreConditionGoals()
    • setMinAgToSatisfy

      public void setMinAgToSatisfy​(int n)
      sets the minimum number of committed agents that should satisfy the goal for the goal to be considered globally satisfied
    • getMinAgToSatisfy

      public int getMinAgToSatisfy()
      gets the minimum number of committed agents that should satisfy the goal for the goal to be considered globally satisfied
    • getType

      public Goal.GoalType getType()
    • setType

      public void setType​(Goal.GoalType t)
    • getTTF

      public java.lang.String getTTF()
    • setTTF

      public void setTTF​(java.lang.String ttf)
    • getLocation

      public java.lang.String getLocation()
    • setLocation

      public void setLocation​(java.lang.String l)
    • getXMLTag

      public static java.lang.String getXMLTag()
    • isRoot

      public boolean isRoot()
    • getDepth

      public int getDepth()
    • getAsProlog

      public java.lang.String getAsProlog()
      returns a string representing the goal in Prolog syntax, format: goal(id, type, description, #ags to satisfy,time to fulfill, list of arguments, plan)[location(L)]
      Specified by:
      getAsProlog in interface ToProlog
    • getAsDOM

      public org.w3c.dom.Element getAsDOM​(org.w3c.dom.Document document)
      Specified by:
      getAsDOM in interface ToXML
    • setFromDOM

      public void setFromDOM​(org.w3c.dom.Element ele, Scheme sch) throws MoiseException
      Throws:
      MoiseException