1 package cz.cuni.amis.pogamut.ut2004.analyzer;
2
3 import java.io.PrintWriter;
4
5 import cz.cuni.amis.pogamut.base.agent.IAgentId;
6 import cz.cuni.amis.pogamut.base.agent.params.IAgentParameters;
7 import cz.cuni.amis.pogamut.base.communication.connection.IWorldConnectionAddress;
8 import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
9 import cz.cuni.amis.pogamut.ut2004.agent.params.UT2004AgentParameters;
10 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Self;
11
12 public class UT2004AnalyzerFullObserverParameters extends UT2004AgentParameters {
13
14 private String observedAgentId;
15
16 private Boolean waitForMatchRestart = null;
17
18 private String outputPath = null;
19
20 private Boolean humanLike_observingEnabled = null;
21
22
23
24
25 private String fileName;
26
27 private PrintWriter humanLike_writer;
28
29 private String humanLike_botName;
30
31 public UT2004AnalyzerFullObserverParameters() {
32 super();
33 }
34
35
36
37
38
39 public String getObservedAgentId() {
40 return observedAgentId;
41 }
42
43
44
45
46
47
48
49
50
51
52 public UT2004AnalyzerFullObserverParameters setObservedAgentId(String observedAgentId) {
53 this.observedAgentId = observedAgentId;
54 return this;
55 }
56
57 @Override
58 public UT2004AnalyzerFullObserverParameters setAgentId(IAgentId agentId) {
59 super.setAgentId(agentId);
60 return this;
61 }
62
63 @Override
64 public UT2004AnalyzerFullObserverParameters setWorldAddress(IWorldConnectionAddress address) {
65 super.setWorldAddress(address);
66 return this;
67 }
68
69
70
71
72
73 public String getOutputPath() {
74 return outputPath;
75 }
76
77
78
79
80
81 public UT2004AnalyzerFullObserverParameters setOutputPath(String outputPath) {
82 this.outputPath = outputPath;
83 return this;
84 }
85
86
87
88
89
90 public boolean isWaitForMatchRestart() {
91 return waitForMatchRestart == null ? false : waitForMatchRestart;
92 }
93
94
95
96
97
98 public UT2004AnalyzerFullObserverParameters setWaitForMatchRestart(boolean waitForMatchRestart) {
99 this.waitForMatchRestart = waitForMatchRestart;
100 return this;
101 }
102
103
104
105
106
107 public String getFileName() {
108 return fileName;
109 }
110
111
112
113
114
115 public UT2004AnalyzerFullObserverParameters setFileName(String fileName) {
116 this.fileName = fileName;
117 return this;
118 }
119
120
121
122
123
124 public Boolean isHumanLikeObservingEnabled() {
125 return humanLike_observingEnabled;
126 }
127
128 public PrintWriter getHumanLikeWriter() {
129 return humanLike_writer;
130 }
131
132 public String getHumanLikeBotName() {
133 return humanLike_botName;
134 }
135
136 public UT2004AnalyzerFullObserverParameters setHumanLikeObserving(String botName, PrintWriter humanLikeWriter) {
137 this.humanLike_observingEnabled = humanLikeWriter != null;
138 this.humanLike_botName = humanLikeWriter != null ? botName : null;
139 this.humanLike_writer = humanLikeWriter;
140 return this;
141 }
142
143 @Override
144 public void assignDefaults(IAgentParameters defaults) {
145 super.assignDefaults(defaults);
146 if (defaults instanceof UT2004AnalyzerFullObserverParameters) {
147 if (waitForMatchRestart == null && ((UT2004AnalyzerFullObserverParameters)defaults).waitForMatchRestart != null)
148 waitForMatchRestart = ((UT2004AnalyzerFullObserverParameters)defaults).waitForMatchRestart;
149 if (outputPath == null) outputPath = ((UT2004AnalyzerFullObserverParameters)defaults).getOutputPath();
150 if (fileName == null) fileName = ((UT2004AnalyzerFullObserverParameters)defaults).getFileName();
151 if (humanLike_observingEnabled == null) humanLike_observingEnabled = ((UT2004AnalyzerFullObserverParameters)defaults).isHumanLikeObservingEnabled();
152 if (humanLike_botName == null) humanLike_botName = ((UT2004AnalyzerFullObserverParameters)defaults).getHumanLikeBotName();
153 if (humanLike_writer == null) humanLike_writer = ((UT2004AnalyzerFullObserverParameters)defaults).getHumanLikeWriter();
154 }
155 }
156
157
158
159
160
161 }