Package moise.os.fs
Class Mission
java.lang.Object
moise.common.MoiseElement
moise.os.fs.Mission
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable,Identifiable,ToProlog,ToXML
public class Mission extends MoiseElement implements ToXML, ToProlog
Represents a Mission. The mission id is prefixed by the scheme id.
- Author:
- Jomi Fred Hubner
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<Goal>goalsprotected java.util.Set<Mission>preferableprotected Schemeschprivate static longserialVersionUIDFields inherited from class moise.common.MoiseElement
debug -
Constructor Summary
-
Method Summary
Modifier and Type Method Description GoaladdGoal(java.lang.String goalSpecId)voidaddPreferable(java.lang.String missionId)intcompareTo(java.lang.Object o)java.util.Collection<Mission>getAllPreferables()returns a collection of Mission objects preferable to this mission including the transitivity of the preference relation.org.w3c.dom.ElementgetAsDOM(org.w3c.dom.Document document)java.lang.StringgetAsProlog()returns a string representing the goal in Prolog syntax, format: mission(id,min,max cardinality,list of goals,list of preferred missions)java.util.Collection<Goal>getGoals()returns a collection of GoalSpec objects of this Missionjava.util.Collection<Mission>getPreferables()returns a collection of Mission objects preferable to this missionstatic java.lang.StringgetXMLTag()voidsetFromDOM(org.w3c.dom.Element ele)java.lang.StringtoString()Methods inherited from class moise.common.MoiseElement
equals, getBoolProperty, getBoolProperty, getCreationDate, getFullId, getId, getId, getOwner, getPrefix, getPrefix, getProperties, getPropertiesAsDOM, getPropertiesAsProlog, getProperty, getStrProperty, hashCode, setId, setOwner, setPrefix, setPropertiesFromDOM, setPropertyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
- Constant Field Values
-
goals
-
preferable
-
sch
-
-
Constructor Details
-
Mission
Creates a new Mission- Parameters:
id- the identification of the role
-
-
Method Details
-
addGoal
- Throws:
MoiseConsistencyException
-
getGoals
returns a collection of GoalSpec objects of this Mission -
addPreferable
- Throws:
MoiseConsistencyException
-
getPreferables
returns a collection of Mission objects preferable to this 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:
compareToin interfacejava.lang.Comparable- Overrides:
compareToin classMoiseElement
-
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:
getAsPrologin interfaceToProlog
-
getXMLTag
public static java.lang.String getXMLTag() -
getAsDOM
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document) -
setFromDOM
- Throws:
MoiseException
-
toString
public java.lang.String toString()- Overrides:
toStringin classMoiseElement
-