View Javadoc

1   
2   	 	/**
3            IMPORTANT !!!
4   
5            DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbcommands BY
6            THE JavaClassesGenerator.xslt. MODIFY THAT FILE INSTEAD OF THIS ONE.
7            
8            Use Ant task process-gb-messages after that to generate .java files again.
9            
10           IMPORTANT END !!!
11          */
12   	package cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
13   		/**
14   		 * Representation of the GameBots2004 command GETPATH.
15   		 *
16   		 * 
17  		Get a path to a specified location or a navigation point. An ordered list of path
18  		nodes will be returned to you by IPTH messages.
19  	
20           */
21   	public class GetPath 
22  		extends CommandMessage
23  	        {
24  	        	
25  		        
26      	/** Example how the message looks like - used during parser tests. */
27      	public static final String PROTOTYPE =
28      		" {Id text}  {Target unreal_id}  {Location 0,0,0} ";
29      
30  		/**
31  		 * Creates new instance of command GetPath.
32  		 * 
33  		Get a path to a specified location or a navigation point. An ordered list of path
34  		nodes will be returned to you by IPTH messages.
35  	
36  		 * Corresponding GameBots message for this command is
37  		 * GETPATH.
38  		 *
39  		 * 
40  		 *    @param Id 
41  			Message Id made up by you and echoed in response so you can
42  			match up response with query.
43  		
44  		 *    @param Target UnrealId of navigation point you want to find path to. Will be parsed BEFORE Location attribute. If supported, Location attribute won't be parsed. If the point does not exists, blank path will be returned.
45  		 *    @param Location Location you want to go to.
46  		 */
47  		public GetPath(
48  			String Id,  UnrealId Target,  Location Location
49  		) {
50  			
51  				this.Id = Id;
52              
53  				this.Target = Target;
54              
55  				this.Location = Location;
56              
57  		}
58  
59  		
60  			/**
61  			 * Creates new instance of command GetPath.
62  			 * 
63  		Get a path to a specified location or a navigation point. An ordered list of path
64  		nodes will be returned to you by IPTH messages.
65  	
66  			 * Corresponding GameBots message for this command is
67  			 * GETPATH.
68  			 * <p></p>
69  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
70  		     */
71  		    public GetPath() {
72  		    }
73  			
74  		
75  		/**
76  		 * Cloning constructor.
77  		 *
78  		 * @param original
79  		 */
80  		public GetPath(GetPath original) {
81  		   
82  		        this.Id = original.Id;
83  		   
84  		        this.Target = original.Target;
85  		   
86  		        this.Location = original.Location;
87  		   
88  		}
89      
90  	        /**
91  	        
92  			Message Id made up by you and echoed in response so you can
93  			match up response with query.
94  		 
95  	        */
96  	        protected
97  	         String Id =
98  	       	
99  	        		null
100 	        	;
101 	
102 	        
103 	        
104  		/**
105          * 
106 			Message Id made up by you and echoed in response so you can
107 			match up response with query.
108 		 
109          */
110         public String getId()
111  	
112 	        {
113 	            return
114 	        	 Id;
115 	        }
116 	        
117 	        
118 	        
119  		
120  		/**
121          * 
122 			Message Id made up by you and echoed in response so you can
123 			match up response with query.
124 		 
125          */
126         public GetPath 
127         setId(String Id)
128  	
129 			{
130 				this.Id = Id;
131 				return this;
132 			}
133 		
134 	        /**
135 	        UnrealId of navigation point you want to find path to. Will be parsed BEFORE Location attribute. If supported, Location attribute won't be parsed. If the point does not exists, blank path will be returned. 
136 	        */
137 	        protected
138 	         UnrealId Target =
139 	       	
140 	        		null
141 	        	;
142 	
143 	        
144 	        
145  		/**
146          * UnrealId of navigation point you want to find path to. Will be parsed BEFORE Location attribute. If supported, Location attribute won't be parsed. If the point does not exists, blank path will be returned. 
147          */
148         public UnrealId getTarget()
149  	
150 	        {
151 	            return
152 	        	 Target;
153 	        }
154 	        
155 	        
156 	        
157  		
158  		/**
159          * UnrealId of navigation point you want to find path to. Will be parsed BEFORE Location attribute. If supported, Location attribute won't be parsed. If the point does not exists, blank path will be returned. 
160          */
161         public GetPath 
162         setTarget(UnrealId Target)
163  	
164 			{
165 				this.Target = Target;
166 				return this;
167 			}
168 		
169 	        /**
170 	        Location you want to go to. 
171 	        */
172 	        protected
173 	         Location Location =
174 	       	
175 	        		null
176 	        	;
177 	
178 	        
179 	        
180  		/**
181          * Location you want to go to. 
182          */
183         public Location getLocation()
184  	
185 	        {
186 	            return
187 	        	 Location;
188 	        }
189 	        
190 	        
191 	        
192  		
193  		/**
194          * Location you want to go to. 
195          */
196         public GetPath 
197         setLocation(Location Location)
198  	
199 			{
200 				this.Location = Location;
201 				return this;
202 			}
203 		
204  	    public String toString() {
205             return toMessage();
206         }
207  	
208  		public String toHtmlString() {
209 			return super.toString() + "[<br/>" +
210             	
211             	"<b>Id</b> = " +
212             	String.valueOf(getId()
213  	) +
214             	" <br/> " +
215             	
216             	"<b>Target</b> = " +
217             	String.valueOf(getTarget()
218  	) +
219             	" <br/> " +
220             	
221             	"<b>Location</b> = " +
222             	String.valueOf(getLocation()
223  	) +
224             	" <br/> " +
225             	 
226             	"<br/>]"
227             ;
228 		}
229  	
230 		public String toMessage() {
231      		StringBuffer buf = new StringBuffer();
232      		buf.append("GETPATH");
233      		
234 						if (Id != null) {
235 							buf.append(" {Id " + Id + "}");
236 						}
237 					
238 						if (Target != null) {
239 							buf.append(" {Target " + Target.getStringId() + "}");
240 						}
241 					
242 					    if (Location != null) {
243 					        buf.append(" {Location " +
244 					            Location.getX() + "," +
245 					            Location.getY() + "," +
246 					            Location.getZ() + "}");
247 					    }
248 					
249    			return buf.toString();
250    		}
251  	
252  		// --- Extra Java from XML BEGIN (extra/code/java)
253         	
254 		// --- Extra Java from XML END (extra/code/java)
255  	
256 	        }
257