Package moise.os.fs

Class Mission

    • Field Detail

      • goals

        protected java.util.Set<Goal> goals
      • preferable

        protected java.util.Set<Mission> preferable
    • Constructor Detail

      • Mission

        public Mission​(java.lang.String id,
                       Scheme sch)
        Creates a new Mission
        Parameters:
        id - the identification of the role
    • Method Detail

      • getGoals

        public java.util.Collection<Goal> getGoals()
        returns a collection of GoalSpec objects of this Mission
      • getPreferables

        public java.util.Collection<Mission> getPreferables()
        returns a collection of Mission objects preferable to this mission
      • getAllPreferables

        public java.util.Collection<Mission> getAllPreferables()
        returns a collection of Mission objects preferable to this mission including the transitivity of the preference relation. For instance, if one has m1 < m2 (m2 has greater preference); m2 < m3; m2 < m4; m4 < m5, for m1, this method will return {m2, m3, m4, m5}
      • compareTo

        public int compareTo​(java.lang.Object o)
        Specified by:
        compareTo in interface java.lang.Comparable
        Overrides:
        compareTo in class MoiseElement
      • getAsProlog

        public java.lang.String getAsProlog()
        returns a string representing the goal in Prolog syntax, format: mission(id,min,max cardinality,list of goals,list of preferred missions)
        Specified by:
        getAsProlog in interface ToProlog
      • getXMLTag

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

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