@Test public void testParseMetadata() throws Exception { String json = IOUtils.toString( getClass().getResourceAsStream("vectorLayers.json"), Charset.forName("UTF-8")); VectorLayersMetadata layersMetadata = VectorLayersMetadata.parseMetadata(json); List<VectorLayerMetadata> layers = layersMetadata.getLayers(); assertEquals(15, layers.size()); VectorLayerMetadata water = layers.get(1); assertEquals("waterway", water.getId()); assertEquals(Integer.valueOf(0), water.getMinZoom()); assertEquals(Integer.valueOf(14), water.getMaxZoom()); assertEquals("String", water.getFields().get("class")); VectorLayerMetadata mountainPeak = layers.get(4); assertEquals("mountain_peak", mountainPeak.getId()); assertEquals(Integer.valueOf(0), mountainPeak.getMinZoom()); assertEquals(Integer.valueOf(14), mountainPeak.getMaxZoom()); assertEquals("Number", mountainPeak.getFields().get("rank")); }
static VectorLayersMetadata parseMetadata(String json) throws IOException { return (VectorLayersMetadata) MAPPER.readValue(json, VectorLayersMetadata.class); }
VectorLayersMetadata { static VectorLayersMetadata parseMetadata(String json) throws IOException { return (VectorLayersMetadata) MAPPER.readValue(json, VectorLayersMetadata.class); } }
VectorLayersMetadata { static VectorLayersMetadata parseMetadata(String json) throws IOException { return (VectorLayersMetadata) MAPPER.readValue(json, VectorLayersMetadata.class); }  }
VectorLayersMetadata { static VectorLayersMetadata parseMetadata(String json) throws IOException { return (VectorLayersMetadata) MAPPER.readValue(json, VectorLayersMetadata.class); }  List<VectorLayerMetadata> getLayers(); void setLayers(List<VectorLayerMetadata> layers); LinkedHashMap<String, VectorLayerMetadata> getLayersMap(); }
VectorLayersMetadata { static VectorLayersMetadata parseMetadata(String json) throws IOException { return (VectorLayersMetadata) MAPPER.readValue(json, VectorLayersMetadata.class); }  List<VectorLayerMetadata> getLayers(); void setLayers(List<VectorLayerMetadata> layers); LinkedHashMap<String, VectorLayerMetadata> getLayersMap();  }