public class Mission extends MoiseElement implements ToXML, ToProlog
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<Goal> |
goals |
protected java.util.Set<Mission> |
preferable |
protected Scheme |
sch |
debug
Constructor and Description |
---|
Mission(java.lang.String id,
Scheme sch)
Creates a new Mission
|
Modifier and Type | Method and Description |
---|---|
void |
addGoal(java.lang.String goalSpecId) |
void |
addPreferable(java.lang.String missionId) |
int |
compareTo(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.Element |
getAsDOM(org.w3c.dom.Document document) |
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)
|
java.util.Collection<Goal> |
getGoals()
returns a collection of GoalSpec objects of this Mission
|
java.util.Collection<Mission> |
getPreferables()
returns a collection of Mission objects preferable to this mission
|
static java.lang.String |
getXMLTag() |
void |
setFromDOM(org.w3c.dom.Element ele) |
java.lang.String |
toString() |
equals, getBoolProperty, getBoolProperty, getCreationDate, getFullId, getId, getId, getOwner, getPrefix, getPrefix, getProperties, getPropertiesAsDOM, getPropertiesAsProlog, getProperty, getStrProperty, hashCode, setId, setOwner, setPrefix, setPropertiesFromDOM, setProperty
protected java.util.Set<Goal> goals
protected java.util.Set<Mission> preferable
protected Scheme sch
public Mission(java.lang.String id, Scheme sch)
id
- the identification of the rolepublic void addGoal(java.lang.String goalSpecId) throws MoiseConsistencyException
MoiseConsistencyException
public java.util.Collection<Goal> getGoals()
public void addPreferable(java.lang.String missionId) throws MoiseConsistencyException
MoiseConsistencyException
public java.util.Collection<Mission> getPreferables()
public java.util.Collection<Mission> getAllPreferables()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
compareTo
in class MoiseElement
public java.lang.String getAsProlog()
getAsProlog
in interface ToProlog
public static java.lang.String getXMLTag()
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
public void setFromDOM(org.w3c.dom.Element ele) throws MoiseException
MoiseException
public java.lang.String toString()
toString
in class MoiseElement