1 package cz.cuni.amis.pogamut.ut2004.analyzer;
2
3 import cz.cuni.amis.pogamut.base.agent.IAgentId;
4 import cz.cuni.amis.pogamut.base.agent.params.IAgentParameters;
5 import cz.cuni.amis.pogamut.base.communication.connection.IWorldConnectionAddress;
6 import cz.cuni.amis.pogamut.ut2004.agent.params.UT2004AgentParameters;
7
8 public class UT2004AnalyzerObserverParameters extends UT2004AgentParameters {
9
10 private String observedAgentId;
11
12 private Boolean waitForMatchRestart = null;
13
14 private String outputPath = null;
15
16
17
18
19 private String fileName;
20
21 public UT2004AnalyzerObserverParameters() {
22 super();
23 }
24
25
26
27
28
29 public String getObservedAgentId() {
30 return observedAgentId;
31 }
32
33
34
35
36
37
38
39
40
41
42 public UT2004AnalyzerObserverParameters setObservedAgentId(String observedAgentId) {
43 this.observedAgentId = observedAgentId;
44 return this;
45 }
46
47 @Override
48 public UT2004AnalyzerObserverParameters setAgentId(IAgentId agentId) {
49 super.setAgentId(agentId);
50 return this;
51 }
52
53 @Override
54 public UT2004AnalyzerObserverParameters setWorldAddress(IWorldConnectionAddress address) {
55 super.setWorldAddress(address);
56 return this;
57 }
58
59
60
61
62
63 public String getOutputPath() {
64 return outputPath;
65 }
66
67
68
69
70
71 public UT2004AnalyzerObserverParameters setOutputPath(String outputPath) {
72 this.outputPath = outputPath;
73 return this;
74 }
75
76
77
78
79
80 public boolean isWaitForMatchRestart() {
81 return waitForMatchRestart == null ? false : waitForMatchRestart;
82 }
83
84
85
86
87
88 public UT2004AnalyzerObserverParameters setWaitForMatchRestart(boolean waitForMatchRestart) {
89 this.waitForMatchRestart = waitForMatchRestart;
90 return this;
91 }
92
93
94
95
96
97 public String getFileName() {
98 return fileName;
99 }
100
101
102
103
104
105 public UT2004AnalyzerObserverParameters setFileName(String fileName) {
106 this.fileName = fileName;
107 return this;
108 }
109
110 @Override
111 public void assignDefaults(IAgentParameters defaults) {
112 super.assignDefaults(defaults);
113 if (defaults instanceof UT2004AnalyzerParameters) {
114 if (waitForMatchRestart == null && ((UT2004AnalyzerObserverParameters)defaults).waitForMatchRestart != null)
115 waitForMatchRestart = ((UT2004AnalyzerObserverParameters)defaults).waitForMatchRestart;
116 if (outputPath == null) outputPath = ((UT2004AnalyzerObserverParameters)defaults).getOutputPath();
117 if (fileName == null) fileName = ((UT2004AnalyzerObserverParameters)defaults).getFileName();
118 }
119 }
120
121
122
123
124
125 }