Package moise.os.fs
Class Scheme
- java.lang.Object
-
- moise.common.MoiseElement
-
- moise.os.fs.Scheme
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable
,Identifiable
,ToProlog
,ToXML
public class Scheme extends MoiseElement implements ToXML, ToProlog
Represents a Scheme specification.- Author:
- Jomi Fred Hubner
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected FS
fs
protected java.util.Map<java.lang.String,Goal>
goals
protected CardinalitySet<Mission>
missions
protected java.util.Set<Plan>
plans
protected Goal
root
private static long
serialVersionUID
-
Fields inherited from class moise.common.MoiseElement
debug
-
-
Method Summary
Modifier and Type Method Description void
addGoal(Goal g)
void
addMission(Mission m)
void
addPlan(Plan p)
org.w3c.dom.Element
getAsDOM(org.w3c.dom.Document document)
java.lang.String
getAsProlog()
returns a string representing the goal in Prolog syntax, format: scheme_specification(id, goals tree starting by root goal, missions, properties)FS
getFS()
Goal
getGoal(java.lang.String id)
java.util.Set<java.lang.String>
getGoalMissionsId(Goal g)
returns the missions where goal g isjava.util.Collection<Goal>
getGoals()
returns an iterator for GoalSpec objects of this SCHMission
getMission(java.lang.String id)
Cardinality
getMissionCardinality(java.lang.String missionId)
Cardinality
getMissionCardinality(Mission m)
java.util.Collection<Mission>
getMissions()
gets the scheme missions ordered by the preference relationjava.util.Collection<Plan>
getPlans()
Goal
getRoot()
static java.lang.String
getXMLTag()
void
setFromDOM(org.w3c.dom.Element ele)
void
setMissionCardinality(java.lang.String missionId, Cardinality c)
void
setMissionCardinality(Mission m, Cardinality c)
void
setRoot(Goal g)
-
Methods inherited from class moise.common.MoiseElement
compareTo, equals, getBoolProperty, getBoolProperty, getCreationDate, getFullId, getId, getId, getOwner, getPrefix, getPrefix, getProperties, getPropertiesAsDOM, getPropertiesAsProlog, getProperty, getStrProperty, hashCode, setId, setOwner, setPrefix, setPropertiesFromDOM, setProperty, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
missions
protected CardinalitySet<Mission> missions
-
plans
protected java.util.Set<Plan> plans
-
goals
protected java.util.Map<java.lang.String,Goal> goals
-
root
protected Goal root
-
fs
protected FS fs
-
-
Constructor Detail
-
Scheme
public Scheme(java.lang.String id, FS fs)
-
-
Method Detail
-
setRoot
public void setRoot(Goal g)
-
getRoot
public Goal getRoot()
-
getFS
public FS getFS()
-
addPlan
public void addPlan(Plan p)
-
getPlans
public java.util.Collection<Plan> getPlans()
-
addMission
public void addMission(Mission m)
-
setMissionCardinality
public void setMissionCardinality(java.lang.String missionId, Cardinality c) throws MoiseConsistencyException
- Throws:
MoiseConsistencyException
-
setMissionCardinality
public void setMissionCardinality(Mission m, Cardinality c)
-
getMissionCardinality
public Cardinality getMissionCardinality(java.lang.String missionId)
-
getMissionCardinality
public Cardinality getMissionCardinality(Mission m)
-
getMissions
public java.util.Collection<Mission> getMissions()
gets the scheme missions ordered by the preference relation
-
getMission
public Mission getMission(java.lang.String id)
-
addGoal
public void addGoal(Goal g)
-
getGoals
public java.util.Collection<Goal> getGoals()
returns an iterator for GoalSpec objects of this SCH
-
getGoal
public Goal getGoal(java.lang.String id)
-
getGoalMissionsId
public java.util.Set<java.lang.String> getGoalMissionsId(Goal g)
returns the missions where goal g is
-
getAsProlog
public java.lang.String getAsProlog()
returns a string representing the goal in Prolog syntax, format: scheme_specification(id, goals tree starting by root goal, missions, properties)- Specified by:
getAsProlog
in interfaceToProlog
-
getXMLTag
public static java.lang.String getXMLTag()
-
getAsDOM
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
-
setFromDOM
public void setFromDOM(org.w3c.dom.Element ele) throws MoiseException
- Throws:
MoiseException
-
-