Index: trunk/src/tmcsim/highwaymodel/Station.java
===================================================================
--- trunk/src/atmsdriver/model/Station.java	(revision 343)
+++ trunk/src/tmcsim/highwaymodel/Station.java	(revision 422)
@@ -1,5 +1,5 @@
-package atmsdriver.model;
-
-import atmsdriver.model.LoopDetector.DOTCOLOR;
+package tmcsim.highwaymodel;
+
+import tmcsim.highwaymodel.LoopDetector.DOTCOLOR;
 import java.util.ArrayList;
 import java.util.List;
@@ -9,5 +9,5 @@
 /**
  * A Station (VDS or Vehicle Detector Station) represents a group of lane detectors
- * across all lanes in one direction at a particular point on a highway. A station is identified
+ * across all lanes in ONE direction at a particular point on a highway. A station is identified
  * by its highway number and postmile. A station has an associated direction
  * used to establish which direction is Main and which is Opposite. The MLTotVol
@@ -194,13 +194,9 @@
             outputUpdateMessage(dotColor, direction.toString());
 
+            // Set the values for all lanes at this station
             for (LoopDetector loop : loops)
             {
-                // THIS DECISION ISN'T NEEDED after JD's BuildHighwayFile pgm
-                // creates a highway map based on VDS instead of Controller (LDS).
-    //            if (loop.loopLocation.startsWith(laneDir))
-    //            {
-                    // UPDATE LOOP WITH VALUES
-                    loop.updateLoop(dotColor.volume(), dotColor.occupancy());
-    //            }
+                // Set loop detector attributes given the desired color
+                loop.setAttributes(dotColor);
             }
 
@@ -210,65 +206,37 @@
     }
     /**
-     * Return the color for the lanes in a given direction.
-     * @return character representing color of this station's traffic flow
-     * '@' = red, '+' = yellow, '-' = green
-     */
-    public char getColor()
+     * Compute the color for the lanes in a given direction.
+     * @return DOTCOLOR of this station's traffic flow
+     */
+    public DOTCOLOR getColor()
     {
         /* For now just use the color of the first lane. 
-         * TODO: Average the color in ALL the lanes for the given direction */
+         * TODO: Average the color in ALL the lanes  */
 
         String laneDir = "";
         
-            // THIS DECISION ISN'T NEEDED after JD's BuildHighwayFile pgm
-            // creates a highway map based on VDS instead of Controller (LDS).
-//        if (direction.equals(this.direction))
-//        {
-//            laneDir = "ML";
-//        }
-//        else if (direction.equals(this.direction.getOpposite()))
-//        {
-//            laneDir = "OS";
-//        }
-        // Search lanes to find specified direction
-        for (LoopDetector loop : loops)
-        {
-            // THIS DECISION ISN'T NEEDED after JD's BuildHighwayFile pgm
-            // creates a highway map based on VDS instead of Controller (LDS).
-//            if (loop.loopLocation.substring(0,2).equals(laneDir))
-//            {
-                // Return color according to loop volume of first matching lane
-                if (loop.vol == 1)
-                {
-                    return '@';
-                }
-                if (loop.vol == 3)
-                {
-                    return '+';
-                }
-                if (loop.vol == 0)
-                {
-                    return '-';
-                }
-//            }
-        }
-        // Default case for when the route is not on this direction
-        return ' ';
-    }
-    /**
-     * Return the color name for the traffic volume of this station.
-     */
-    public String getColorName()
-    {
-        String colorName = "";
-        switch (this.getColor())
-        {
-            case '@': colorName = "red";break;
-            case '+': colorName = "yellow"; break;
-            case '-': colorName = "lime";break;
-            case ' ': colorName = "lime";break;
-        }
-        return colorName;
-    }
+        // FOR FUTURE USE we will need to examine all detectors for this station
+        // and perform an average
+        // for (LoopDetector loop : loops)
+        {
+            // for now, Return color according to loop volume of first lane
+            if (loops.get(0).vol == 1)
+            {
+                return DOTCOLOR.RED;
+            }
+            if (loops.get(0).vol == 3)
+            {
+                return DOTCOLOR.YELLOW;
+            }
+            if (loops.get(0).vol == 0)
+            {
+                return DOTCOLOR.GREEN;
+            }
+        }
+        
+        // Default case for invalid data
+        return DOTCOLOR.GREEN;
+    }
+
     /**
      * Output for updateByDirection. Logs the update to the console.
