Move Metrics REST classes to appropriate directories

Moved Metrics Resource classes to net.onrc.onos.core.metrics.web
Moved Metrics Serializer class to net.onrc.onos.core.metrics.web.serializers

Change-Id: I2dec174baaee818feb74333cd17bd9ac61e05d83
diff --git a/src/main/java/net/onrc/onos/core/metrics/OnosMetricsModule.java b/src/main/java/net/onrc/onos/core/metrics/OnosMetricsModule.java
index 6f046cf..4c428ce 100644
--- a/src/main/java/net/onrc/onos/core/metrics/OnosMetricsModule.java
+++ b/src/main/java/net/onrc/onos/core/metrics/OnosMetricsModule.java
@@ -5,6 +5,7 @@
 import net.floodlightcontroller.core.module.IFloodlightModule;
 import net.floodlightcontroller.core.module.IFloodlightService;
 import net.floodlightcontroller.restserver.IRestApiService;
+import net.onrc.onos.core.metrics.web.MetricsWebRoutable;
 import net.onrc.onos.core.registry.IControllerRegistryService;
 
 import java.util.ArrayList;
diff --git a/src/main/java/net/onrc/onos/core/metrics/MetricsObjectResource.java b/src/main/java/net/onrc/onos/core/metrics/web/MetricsObjectResource.java
similarity index 92%
rename from src/main/java/net/onrc/onos/core/metrics/MetricsObjectResource.java
rename to src/main/java/net/onrc/onos/core/metrics/web/MetricsObjectResource.java
index efb0213..64db953 100644
--- a/src/main/java/net/onrc/onos/core/metrics/MetricsObjectResource.java
+++ b/src/main/java/net/onrc/onos/core/metrics/web/MetricsObjectResource.java
@@ -1,4 +1,4 @@
-package net.onrc.onos.core.metrics;
+package net.onrc.onos.core.metrics.web;
 
 
 import com.codahale.metrics.Counter;
@@ -6,6 +6,7 @@
 import com.codahale.metrics.Meter;
 import com.codahale.metrics.Timer;
 import com.codahale.metrics.Histogram;
+import net.onrc.onos.core.metrics.web.serializers.MetricsObjectSerializer;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
 import java.util.List;
@@ -22,7 +23,7 @@
      * Base Metric object that all metrics inherit from.  Defines common
      * attributes.
      */
-    static class BaseMetricObject {
+    public static class BaseMetricObject {
         private final String name;
 
         /**
@@ -47,7 +48,7 @@
     /**
      * Metric object that represents a Timer.
      */
-    static class TimerObjectResource extends BaseMetricObject {
+    public static class TimerObjectResource extends BaseMetricObject {
         private final Timer timer;
 
         /**
@@ -75,7 +76,7 @@
     /**
      * Metric object that represents a Gauge.
      */
-    static class GaugeObjectResource extends BaseMetricObject {
+    public static class GaugeObjectResource extends BaseMetricObject {
         private final Gauge gauge;
 
         /**
@@ -103,7 +104,7 @@
     /**
      * Metric object that represents a Counter.
      */
-    static class CounterObjectResource extends BaseMetricObject {
+    public static class CounterObjectResource extends BaseMetricObject {
         private final Counter counter;
 
         /**
@@ -131,7 +132,7 @@
     /**
      * Metric object that represents a Meter.
      */
-    static class MeterObjectResource extends BaseMetricObject {
+    public static class MeterObjectResource extends BaseMetricObject {
         private final Meter meter;
 
         /**
@@ -159,7 +160,7 @@
     /**
      * Metric objerct that represents a Histogram.
      */
-    static class HistogramObjectResource extends BaseMetricObject {
+    public static class HistogramObjectResource extends BaseMetricObject {
         private final Histogram histogram;
 
         /**
diff --git a/src/main/java/net/onrc/onos/core/metrics/MetricsResource.java b/src/main/java/net/onrc/onos/core/metrics/web/MetricsResource.java
similarity index 97%
rename from src/main/java/net/onrc/onos/core/metrics/MetricsResource.java
rename to src/main/java/net/onrc/onos/core/metrics/web/MetricsResource.java
index f8d8a12..89746e3 100644
--- a/src/main/java/net/onrc/onos/core/metrics/MetricsResource.java
+++ b/src/main/java/net/onrc/onos/core/metrics/web/MetricsResource.java
@@ -1,4 +1,4 @@
-package net.onrc.onos.core.metrics;
+package net.onrc.onos.core.metrics.web;
 
 import com.codahale.metrics.Counter;
 import com.codahale.metrics.Gauge;
@@ -7,6 +7,7 @@
 import com.codahale.metrics.Metric;
 import com.codahale.metrics.MetricFilter;
 import com.codahale.metrics.Timer;
+import net.onrc.onos.core.metrics.OnosMetrics;
 import org.restlet.representation.Representation;
 import org.restlet.resource.Get;
 import org.restlet.resource.ServerResource;
diff --git a/src/main/java/net/onrc/onos/core/metrics/MetricsWebRoutable.java b/src/main/java/net/onrc/onos/core/metrics/web/MetricsWebRoutable.java
similarity index 94%
rename from src/main/java/net/onrc/onos/core/metrics/MetricsWebRoutable.java
rename to src/main/java/net/onrc/onos/core/metrics/web/MetricsWebRoutable.java
index 2761e71..d79e659 100644
--- a/src/main/java/net/onrc/onos/core/metrics/MetricsWebRoutable.java
+++ b/src/main/java/net/onrc/onos/core/metrics/web/MetricsWebRoutable.java
@@ -1,4 +1,4 @@
-package net.onrc.onos.core.metrics;
+package net.onrc.onos.core.metrics.web;
 
 import net.floodlightcontroller.restserver.RestletRoutable;
 import org.restlet.Context;
diff --git a/src/main/java/net/onrc/onos/core/metrics/MetricsObjectSerializer.java b/src/main/java/net/onrc/onos/core/metrics/web/serializers/MetricsObjectSerializer.java
similarity index 97%
rename from src/main/java/net/onrc/onos/core/metrics/MetricsObjectSerializer.java
rename to src/main/java/net/onrc/onos/core/metrics/web/serializers/MetricsObjectSerializer.java
index ba32381..92b6991 100644
--- a/src/main/java/net/onrc/onos/core/metrics/MetricsObjectSerializer.java
+++ b/src/main/java/net/onrc/onos/core/metrics/web/serializers/MetricsObjectSerializer.java
@@ -1,7 +1,8 @@
-package net.onrc.onos.core.metrics;
+package net.onrc.onos.core.metrics.web.serializers;
 
 import com.codahale.metrics.json.MetricsModule;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import net.onrc.onos.core.metrics.web.MetricsObjectResource;
 import org.codehaus.jackson.JsonGenerator;
 import org.codehaus.jackson.map.SerializerProvider;
 import org.codehaus.jackson.map.ser.std.SerializerBase;
diff --git a/src/test/java/net/onrc/onos/api/rest/TestRestMetrics.java b/src/test/java/net/onrc/onos/api/rest/TestRestMetrics.java
index 6b5f453..d0f6b1e 100644
--- a/src/test/java/net/onrc/onos/api/rest/TestRestMetrics.java
+++ b/src/test/java/net/onrc/onos/api/rest/TestRestMetrics.java
@@ -5,7 +5,7 @@
 import net.floodlightcontroller.core.module.FloodlightModuleException;
 import net.onrc.onos.core.intent.runtime.IntentTestMocks;
 import net.onrc.onos.core.intent.runtime.PathCalcRuntimeModule;
-import net.onrc.onos.core.metrics.MetricsWebRoutable;
+import net.onrc.onos.core.metrics.web.MetricsWebRoutable;
 import net.onrc.onos.core.topology.ITopologyService;
 import org.json.JSONArray;
 import org.json.JSONException;