01 package dk.deepthought.sidious.supportsystem;
02
03 import dk.deepthought.sidious.blackboard.BlackBoard;
04 import dk.deepthought.sidious.blackboard.BlackBoardEngine;
05 import dk.deepthought.sidious.goalhandler.GoalHandler;
06 import dk.deepthought.sidious.goalhandler.GoalHandlerEngine;
07 import dk.deepthought.sidious.planner.Planner;
08 import dk.deepthought.sidious.planner.PlannerEngine;
09 import dk.deepthought.sidious.ruleengine.RuleEngine;
10 import dk.deepthought.sidious.ruleengine.RuleEngineImpl;
11
12 /**
13 * This class acts as a factory for the major modules of the system.
14 *
15 * @author Deepthought
16 *
17 */
18 public class Repository {
19
20 /**
21 * Planner instance.
22 */
23 private static final Planner planner = PlannerEngine.getInstance();
24
25 /**
26 * Blackboard instance.
27 */
28 private static final BlackBoard blackboard = BlackBoardEngine.getInstance();
29
30 /**
31 * Goal handler instance.
32 */
33 private static final GoalHandler goalHandler = GoalHandlerEngine
34 .getInstance();
35
36 /**
37 * Rule engine instance.
38 */
39 private static final RuleEngine ruleEngine = new RuleEngineImpl();
40
41 /**
42 * Private empty constructor to facilitate non instantiability.
43 */
44 private Repository() {
45 }
46
47 /**
48 * Gets the BlackBoard instance.
49 *
50 * @return the blackboard
51 */
52 public static BlackBoard getBlackboard() {
53 return blackboard;
54 }
55
56 /**
57 * Gets the GoalHandler instance.
58 *
59 * @return the goalHandler
60 */
61 public static GoalHandler getGoalHandler() {
62 return goalHandler;
63 }
64
65 /**
66 * Gets the Planner instance.
67 *
68 * @return the planner
69 */
70 public static Planner getPlanner() {
71 return planner;
72 }
73
74 /**
75 * Gets a RuleEngine instance.
76 *
77 * @return the ruleEngine
78 */
79 public static RuleEngine getRuleEngine() {
80 return ruleEngine;
81 }
82
83
84 }
|