
            /**
            IMPORTANT !!!
       
            DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbinfomessages BY
            THE JavaClassesGenerator.xslt. MODIFY THESE FILES INSTEAD OF THIS ONE.
       
            IMPORTANT END !!!
            */
            package
            cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
	    		import java.util.*;    
    import javax.vecmath.*;    
    import cz.cuni.amis.pogamut.base.communication.messages.*;    
    import cz.cuni.amis.pogamut.base.agent.worldview.*;    
    import cz.cuni.amis.pogamut.base.agent.worldview.objects.*;    
    import cz.cuni.amis.pogamut.base.communication.translator.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;    
    import cz.cuni.amis.pogamut.base.exceptions.*;    
    import cz.cuni.amis.pogamut.base3d.worldview.objects.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.messages.*;    
    import cz.cuni.amis.pogamut.ut2004.agent.worldview.objects.*;    
                
            
            /**
              
		Synchronous message. Domination points can be found in UT2004
		double domination game type. If you want to score in double
		domination game, you have to control all domination points in
		the map for some amount of time. The attributes of
		DominationPoint are the same as of NavPoint except the
		DominationPoint contains the attribute Controller - number of
		the team which controls the point.
	
                          Corresponding GameBots message is 
                          DOM.
                      
             */
            
            public class
            DominationPoint
                    extends GBObjectUpdate
                
	            	implements IGBWorldObjectEvent, IWorldObject, INavPoint, IGBViewable
                        
            {
            
            
            
    	/** Example how the message looks like - used during parser tests. */
    	public static final String PROTOTYPE = 
    		"DOM {Id unreal_id} {Location 0,0,0} {Visible False} {Reachable False} {Item unreal_id} {Flag text} {Rotation 0,0,0} {RoamingSpot False} {SnipingSpot False} {PreferedWeapon text} {Controller 0}";
    
            
            /////// Properties BEGIN
            
        /**
        
			A unique Id of this navigation point assigned by the game.
		 */
        protected
         UnrealId Id = 
        	null;
        
        
        /**
        
			A unique Id of this navigation point assigned by the game.
		 */
        public
        UnrealId getId() {
            return
         Id;
        }
        

        
        /**
        Location of navigation point. */
        protected
         Location Location = 
        	null;
        
        
        /**
        Location of navigation point. */
        public
        Location getLocation() {
            return
         Location;
        }
        

        
        /**
        
			If the point is in the field of view of the bot.
		 */
        protected
         boolean Visible = 
        	false;
        
        
        /**
        
			If the point is in the field of view of the bot.
		 */
        public
        boolean isVisible() {
            return
         Visible;
        }
        

        
        /**
        
			If the bot can reach the point directly.
		 */
        protected
         boolean Reachable = 
        	false;
        
        
        /**
        
			If the bot can reach the point directly.
		 */
        public
        boolean isReachable() {
            return
         Reachable;
        }
        

        
        /**
        
			Unique Id of the respawned item (the item respawns at this
			point).
		 */
        protected
         UnrealId Item = 
        	null;
        
        
        /**
        
			Unique Id of the respawned item (the item respawns at this
			point).
		 */
        public
        UnrealId getItem() {
            return
         Item;
        }
        

        
        /**
        
			What type is this NavPoint. The types are: PathNode,
			PlayerStart, InventorySpot and AIMarker. If the type is
			AIMarker, more attributes appear in NAV message - see below.
		 */
        protected
         String Flag = 
        	null;
        
        
        /**
        
			What type is this NavPoint. The types are: PathNode,
			PlayerStart, InventorySpot and AIMarker. If the type is
			AIMarker, more attributes appear in NAV message - see below.
		 */
        public
        String getFlag() {
            return
         Flag;
        }
        

        
        /**
        
			If the type is AIMarker. The rotation the bot should be
			facing, when doing the action specified by AIMarker.
		 */
        protected
         Rotation Rotation = 
        	null;
        
        
        /**
        
			If the type is AIMarker. The rotation the bot should be
			facing, when doing the action specified by AIMarker.
		 */
        public
        Rotation getRotation() {
            return
         Rotation;
        }
        

        
        /**
        
			Some ambush point, where is good chance to intercept
			approaching opponents.
		 */
        protected
         boolean RoamingSpot = 
        	false;
        
        
        /**
        
			Some ambush point, where is good chance to intercept
			approaching opponents.
		 */
        public
        boolean isRoamingSpot() {
            return
         RoamingSpot;
        }
        

        
        /**
        Point good for sniping. */
        protected
         boolean SnipingSpot = 
        	false;
        
        
        /**
        Point good for sniping. */
        public
        boolean isSnipingSpot() {
            return
         SnipingSpot;
        }
        

        
        /**
        
			Class of the weapon that should be prefered when using this
			point for AIMarker specified action.
		 */
        protected
         String PreferedWeapon = 
        	null;
        
        
        /**
        
			Class of the weapon that should be prefered when using this
			point for AIMarker specified action.
		 */
        public
        String getPreferedWeapon() {
            return
         PreferedWeapon;
        }
        

        
        /**
        Which team controls this point. */
        protected
         int Controller = 
        	0;
        
        
        /**
        Which team controls this point. */
        public
        int getController() {
            return
         Controller;
        }
        

        
            /////// Properties END
            
            /////// Extra Java code BEGIN
                        	
            	/////// Additional code from xslt BEGIN            	 
            		
       							protected double Time = 0;
       							
       							protected double getTime() {
       								return Time;
       							}
       							
       							protected void setTime(double time) {
       								this.Time = time;
       							}
       						
       							public double getLastSeenTime() {
       								return Time;
       							}
       						
       					
       					public boolean equals(Object obj) {
	                      if (!(obj instanceof DominationPoint)) return false;
	                      DominationPoint cast = (DominationPoint)obj;
	                      if (this.getId() != null) return this.getId().equals(cast.getId());
	                      else return cast.getId() == null;
	                    }
	                    
	                    public int hashCode() {
	                      if (getId() != null) return getId().hashCode();
	                      return 0;
	                    }
            			
            			
            		
            		
            	/////// Additional code from xslt END            
				                    
	            /////// Extra Java from XML BEGIN
            		

				/** * Maps neighbour-navpoint-UnrealId to neighbour
				link. */ protected Map<UnrealId,
				NavPointNeighbourLink> neighbourLinks;

				/** * Retuns map with links to navpoint neighbours. Maps
				neighbour-navpoint-UnrealId to neighbour link. */ public
				Map<UnrealId, NavPointNeighbourLink>
				getNeighbourLinks() { return this.neighbourLinks; }

				/** * Setter for neighbour links of the navpoint,
				<b>DO NOT USE IT!</b> Reserved * for
				GBNavListHandler only! */ public void
				setNeighbourLinks(Map<UnrealId,
				NavPointNeighbourLink> neighbourLinks) {
				this.neighbourLinks = neighbourLinks; }


			
            	/////// Extra Java from XML END
            	    
            /////// Extra Java code END
            
            
            
            /**
              * Cloning constructor.
              */
             public DominationPoint(DominationPoint original) {
                
                     this.Id=original.Id;
                
                     this.Location=original.Location;
                
                     this.Visible=original.Visible;
                
                     this.Reachable=original.Reachable;
                
                     this.Item=original.Item;
                
                     this.Flag=original.Flag;
                
                     this.Rotation=original.Rotation;
                
                     this.RoamingSpot=original.RoamingSpot;
                
                     this.SnipingSpot=original.SnipingSpot;
                
                     this.PreferedWeapon=original.PreferedWeapon;
                
                     this.Controller=original.Controller;
                
             }   
             
             
                 /**
                  * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
                  */
	             public DominationPoint() {
	             }
             
	    		
	    		     /**
	    		      * Used to drop Visible flag from the object.
	    		      */
	    		     public static class ObjectDisappeared implements IGBWorldObjectDisappeared {
	    		     
	    		         private IWorldObject orig;
	    		         
	    		         public ObjectDisappeared(IWorldObject orig) {
	    		             this.orig = orig;
	    		         }
	    		         
	    		         public IWorldObjectId getId() {
	    		             return orig.getId();
	    		         }
    
                         public IWorldObject update(IWorldObject obj) {
                            if (obj == null) {
                                throw new PogamutRuntimeException("not meant to create new object, probably wanted to update non-existing object of id: " + getId(), this);
                            }
                            if (!(obj instanceof DominationPoint)) {
                                throw new PogamutRuntimeException("can't update object of class " + obj.getClass() + ", meant to update DominationPoint", this);
                            } 
                            orig = obj;
                            DominationPoint toUpdate = (DominationPoint)obj;
                            toUpdate.Visible = false;
                            return toUpdate;
                         }
    
                         public IWorldObject getObject() {
                            return orig;
                         }
                         
                         public String toString() {
                            return "ObjectDisappeared[" + orig.getClass().getName().substring(getClass().getName().lastIndexOf(".")+1) + " " + orig.getId() + "]"; 
                         }
	    		         
	    		     }
	    		
	    		     /**
	    		      * Used to create event that drops the Visible flag of the item.
	    		      */
	    		     public DominationPoint(DominationPoint Original, boolean Visible) {
	    		         this(Original);
	    		         this.Visible = Visible;
	    		     }
	    		     
	    		     public IGBWorldObjectDisappeared createDisappearEvent() {
	    		         return new ObjectDisappeared(this);
	    		     }
	    		
	    		
	    		/**
	    		 * Here we save the original object for which this object is an update.
	    		 */ 
	    		private IWorldObject orig = null;
	    		
	            public IWorldObject update(IWorldObject obj) {
		            if(obj == null) {
		               orig = this;
		               return this;
		            }
		            orig = obj;
		            // typecast
		            DominationPoint  o = (DominationPoint)obj;
		            
		            
		                o.Location=Location;
		            
		                o.Visible=Visible;
		            
		                o.Reachable=Reachable;
		            
								o.Time = Time;
							
		            
		            return o;
		        }
	        
	            /**
	             * Returns original object (if method update() has already been called, for bot-programmer that is always true
	             * as the original object is updated and then the event is propagated).
	             */ 
		        public IWorldObject getObject() {
		            if (orig == null) return this;
		            return orig;
		        }
	        
                
                 
            public String toString() {
                return
                
                		super.toString() + " | " +
                		
				               "Id = " + 
				               String.valueOf(Id) + " | " +
				            
				               "Location = " + 
				               String.valueOf(Location) + " | " +
				            
				               "Visible = " + 
				               String.valueOf(Visible) + " | " +
				            
				               "Reachable = " + 
				               String.valueOf(Reachable) + " | " +
				            
				               "Item = " + 
				               String.valueOf(Item) + " | " +
				            
				               "Flag = " + 
				               String.valueOf(Flag) + " | " +
				            
				               "Rotation = " + 
				               String.valueOf(Rotation) + " | " +
				            
				               "RoamingSpot = " + 
				               String.valueOf(RoamingSpot) + " | " +
				            
				               "SnipingSpot = " + 
				               String.valueOf(SnipingSpot) + " | " +
				            
				               "PreferedWeapon = " + 
				               String.valueOf(PreferedWeapon) + " | " +
				            
				               "Controller = " + 
				               String.valueOf(Controller) + " | " +
				             "";
                	 
             }
             
             public String toHtmlString() {
                return super.toString() +
             
            "<b>Id</b> : " + 
            String.valueOf(Id) + 
            " <br/> " +
             
            "<b>Location</b> : " + 
            String.valueOf(Location) + 
            " <br/> " +
             
            "<b>Visible</b> : " + 
            String.valueOf(Visible) + 
            " <br/> " +
             
            "<b>Reachable</b> : " + 
            String.valueOf(Reachable) + 
            " <br/> " +
             
            "<b>Item</b> : " + 
            String.valueOf(Item) + 
            " <br/> " +
             
            "<b>Flag</b> : " + 
            String.valueOf(Flag) + 
            " <br/> " +
             
            "<b>Rotation</b> : " + 
            String.valueOf(Rotation) + 
            " <br/> " +
             
            "<b>RoamingSpot</b> : " + 
            String.valueOf(RoamingSpot) + 
            " <br/> " +
             
            "<b>SnipingSpot</b> : " + 
            String.valueOf(SnipingSpot) + 
            " <br/> " +
             
            "<b>PreferedWeapon</b> : " + 
            String.valueOf(PreferedWeapon) + 
            " <br/> " +
             
            "<b>Controller</b> : " + 
            String.valueOf(Controller) + 
            " <br/> " +
             "";
             }            
             
             
             
             }
                         
        