/*
 * BlankNodeDefinition.java
 *
 * Created on December 8, 2004, 5:37 PM
 */

package DDMT.Nodes;

import java.util.Vector;

/**
 *
 * @author  jk3
 */
public class Node implements java.io.Serializable{
    
    //The number of the node
    private int nodeNumber;
    
    //The type of the node
    private String type;
    //The Instances associated with the node.
    //private Instances nodeData;
    
    //Neighbors of this node
    private Vector neighbors;
    
    //Data Location - the location of local data for this node.
    private String dataLocation;
    
    //Network Location - the location on the network of this node
    private String networkLocation;
    
    //X and Y values associated with the node (location)
    private int X;
    private int Y;
        
    /**
     *Method to make a new Node object
     */
    public Node()
    {
        neighbors = new Vector();
        dataLocation = new String("None");
        networkLocation = new String("None");
    }
    
    /**
     *Method to set the node type
     */
    public void setType(String t)
    {
        type = new String(t);
    }
    
    /**
     *Method to get the node type
     */
    public String getType()
    {
        return new String(type);
    }
    
    /**
     *Method to add a neighbor to this node
     */
    public void addNeighbor(Neighbor n)
    {
        neighbors.addElement(new Neighbor(n));
    }
    
    /**
     *Method to return all the neighbors
     */
    public Vector getNeighbors()
    {
        return new Vector(neighbors);
    }
    
    /**
     *Method to set the node number of this node
     */
    public void setNumber(int number)
    {
        nodeNumber = number;
    }
    
    /**
     *Method to set the node number
     */
    public int getNumber()
    {
        return nodeNumber;
    }
    
    /**
     *Method to get the network location of the node
     */
    public String getNetworkLocation()
    {
        return new String(networkLocation);
    }
    
    /**
     *method to set the network location of the node
     */
    public void setNetworkLocation( String loc)
    {
        networkLocation = new String(loc);
    }
    
    /**
     *Method to set the current path for this nodes data
     */
    public void setDataLocation( String loc)
    {
        dataLocation = new String(loc);
    }
    
    /**
     *Method to set the current path for this nodes data
     */
    public String getDataLocation()
    {
        return new String(dataLocation);
    }
    
    /**
     *Method to set the X position of the node
     */
    public void setX( int x)
    {
        X = x;
    }
    
    /**
     *Method to get the X position of the node
     */
    public int getX()
    {
        return X;
    }
    
    /**
     *Method to set the Y position of the node
     */
    public void setY(int y)
    {
        Y = y;
    }
    
    /**
     *Method to get the Y position of the node
     */
    public int getY()
    {
        return Y;
    }
    
    /**
     *The code executed when this node recieves a message
     */
 
    /**
     *Class that models a message recieved
     */
}
