@Test(expected = UnrecognizedPropertyException.class) @Category(UnitTest.class) public void testDeserializeUnknownProperty() throws IOException { final String json = "{\"missing\":null,\"bounds\":{\"n\":41.5,\"e\":25,\"w\":24,\"s\":40.5},\"imageMetadata\":[{\"pixelBounds\":{\"maxY\":728,\"maxX\":728,\"minX\":0,\"minY\":0},\"tileBounds\":{\"maxY\":187,\"maxX\":291,\"minX\":290,\"minY\":185},\"name\":\"9\"}],\"bands\":1,\"defaultValues\":[-32768],\"maxZoomLevel\":3}"; final InputStream is = new ByteArrayInputStream(json.getBytes()); MrsPyramidMetadata.load(is); }
@Deprecated public static MrsPyramidMetadata load(File file) throws IOException { ObjectMapper mapper = new ObjectMapper(); MrsPyramidMetadata metadata = mapper.readValue(file, MrsPyramidMetadata.class); metadata.setPyramid("file: return metadata; }
MrsPyramidMetadata implements Serializable { @Deprecated public static MrsPyramidMetadata load(File file) throws IOException { ObjectMapper mapper = new ObjectMapper(); MrsPyramidMetadata metadata = mapper.readValue(file, MrsPyramidMetadata.class); metadata.setPyramid("file: return metadata; } }
MrsPyramidMetadata implements Serializable { @Deprecated public static MrsPyramidMetadata load(File file) throws IOException { ObjectMapper mapper = new ObjectMapper(); MrsPyramidMetadata metadata = mapper.readValue(file, MrsPyramidMetadata.class); metadata.setPyramid("file: return metadata; } MrsPyramidMetadata();  MrsPyramidMetadata(MrsPyramidMetadata copy); }
MrsPyramidMetadata implements Serializable { @Deprecated public static MrsPyramidMetadata load(File file) throws IOException { ObjectMapper mapper = new ObjectMapper(); MrsPyramidMetadata metadata = mapper.readValue(file, MrsPyramidMetadata.class); metadata.setPyramid("file: return metadata; } MrsPyramidMetadata();  MrsPyramidMetadata(MrsPyramidMetadata copy); @Deprecated static MrsPyramidMetadata load(File file); static MrsPyramidMetadata load(InputStream stream); Bounds getBounds(); void setBounds(Bounds bounds); String getName(int zoomlevel); int getMaxZoomLevel(); void setMaxZoomLevel(int zoomlevel); @JsonIgnore String getPyramid(); void setPyramid(String pyramid); LongRectangle getTileBounds(int zoomlevel); int getTilesize(); void setTilesize(int size); Map<String, String> getTags(); void setTags(Map<String, String> tags); @JsonIgnore String getTag(String tag); @JsonIgnore String getTag(String tag, String defaultValue); String getProtectionLevel(); void setProtectionLevel(String protectionLevel); @JsonIgnore @SuppressFBWarnings(value = "PZLA_PREFER_ZERO_LENGTH_ARRAYS", justification = "api") double[] getQuantiles(int band); double[][] getQuantiles(); void setQuantiles(double[][] quantiles); @JsonIgnore @SuppressFBWarnings(value = "PZLA_PREFER_ZERO_LENGTH_ARRAYS", justification = "api") String[] getCategories(int band); String[][] getCategories(); void setCategories(String[][] categories); void setName(int zoomlevel); void setName(int zoomlevel, String name); @JsonIgnore void setTag(String tag, String value); @JsonIgnore void setQuantiles(int band, double[] quantiles); @JsonIgnore void setCategories(int band, String[] categories); boolean hasPyramids(); int getBands(); void setBands(int bands); @JsonIgnore double getPixelHeight(int zoom); @JsonIgnore double getPixelWidth(int zoom); @JsonIgnore double getDefaultValue(int band); @JsonIgnore byte getDefaultValueByte(int band); @JsonIgnore double getDefaultValueDouble(int band); @JsonIgnore float getDefaultValueFloat(int band); @JsonIgnore int getDefaultValueInt(int band); @JsonIgnore long getDefaultValueLong(int band); double[] getDefaultValues(); void setDefaultValues(double[] defaultValues); @JsonIgnore byte[] getDefaultValuesByte(); @JsonIgnore double[] getDefaultValuesDouble(); @JsonIgnore float[] getDefaultValuesFloat(); @JsonIgnore short getDefaultValueShort(int band); @JsonIgnore int[] getDefaultValuesInt(); @JsonIgnore long[] getDefaultValuesLong(); @JsonIgnore short[] getDefaultValuesShort(); @JsonIgnore double[] getDefaultValuesNumber(); ImageMetadata[] getImageMetadata(); void setImageMetadata(ImageMetadata[] metadata); LongRectangle getPixelBounds(int zoomlevel); @SuppressFBWarnings(value = "PZLA_PREFER_ZERO_LENGTH_ARRAYS", justification = "api") ImageStats[] getImageStats(int zoomlevel); ImageStats getImageStats(int zoomlevel, int band); ImageStats getStats(int band); ImageStats[] getStats(); void setStats(ImageStats[] stats); LongRectangle getOrCreateTileBounds(int zoomlevel); LongRectangle getOrCreatePixelBounds(int zoomlevel); int getTileType(); void setTileType(int tileType); @JsonIgnore boolean isFloatingPoint(); Classification getClassification(); void setClassification(Classification classification); double[] getExtrema(int zoomLevel); String getResamplingMethod(); void setResamplingMethod(String resamplingMethod); @SuppressWarnings("squid:S1166") // Exception caught and handled void save(OutputStream stream); void setPixelBounds(int zoomlevel, LongRectangle pixelBounds); void setTileBounds(int zoomlevel, LongRectangle tileBounds); void setImageStats(int zoomlevel, ImageStats[] stats); }
MrsPyramidMetadata implements Serializable { @Deprecated public static MrsPyramidMetadata load(File file) throws IOException { ObjectMapper mapper = new ObjectMapper(); MrsPyramidMetadata metadata = mapper.readValue(file, MrsPyramidMetadata.class); metadata.setPyramid("file: return metadata; } MrsPyramidMetadata();  MrsPyramidMetadata(MrsPyramidMetadata copy); @Deprecated static MrsPyramidMetadata load(File file); static MrsPyramidMetadata load(InputStream stream); Bounds getBounds(); void setBounds(Bounds bounds); String getName(int zoomlevel); int getMaxZoomLevel(); void setMaxZoomLevel(int zoomlevel); @JsonIgnore String getPyramid(); void setPyramid(String pyramid); LongRectangle getTileBounds(int zoomlevel); int getTilesize(); void setTilesize(int size); Map<String, String> getTags(); void setTags(Map<String, String> tags); @JsonIgnore String getTag(String tag); @JsonIgnore String getTag(String tag, String defaultValue); String getProtectionLevel(); void setProtectionLevel(String protectionLevel); @JsonIgnore @SuppressFBWarnings(value = "PZLA_PREFER_ZERO_LENGTH_ARRAYS", justification = "api") double[] getQuantiles(int band); double[][] getQuantiles(); void setQuantiles(double[][] quantiles); @JsonIgnore @SuppressFBWarnings(value = "PZLA_PREFER_ZERO_LENGTH_ARRAYS", justification = "api") String[] getCategories(int band); String[][] getCategories(); void setCategories(String[][] categories); void setName(int zoomlevel); void setName(int zoomlevel, String name); @JsonIgnore void setTag(String tag, String value); @JsonIgnore void setQuantiles(int band, double[] quantiles); @JsonIgnore void setCategories(int band, String[] categories); boolean hasPyramids(); int getBands(); void setBands(int bands); @JsonIgnore double getPixelHeight(int zoom); @JsonIgnore double getPixelWidth(int zoom); @JsonIgnore double getDefaultValue(int band); @JsonIgnore byte getDefaultValueByte(int band); @JsonIgnore double getDefaultValueDouble(int band); @JsonIgnore float getDefaultValueFloat(int band); @JsonIgnore int getDefaultValueInt(int band); @JsonIgnore long getDefaultValueLong(int band); double[] getDefaultValues(); void setDefaultValues(double[] defaultValues); @JsonIgnore byte[] getDefaultValuesByte(); @JsonIgnore double[] getDefaultValuesDouble(); @JsonIgnore float[] getDefaultValuesFloat(); @JsonIgnore short getDefaultValueShort(int band); @JsonIgnore int[] getDefaultValuesInt(); @JsonIgnore long[] getDefaultValuesLong(); @JsonIgnore short[] getDefaultValuesShort(); @JsonIgnore double[] getDefaultValuesNumber(); ImageMetadata[] getImageMetadata(); void setImageMetadata(ImageMetadata[] metadata); LongRectangle getPixelBounds(int zoomlevel); @SuppressFBWarnings(value = "PZLA_PREFER_ZERO_LENGTH_ARRAYS", justification = "api") ImageStats[] getImageStats(int zoomlevel); ImageStats getImageStats(int zoomlevel, int band); ImageStats getStats(int band); ImageStats[] getStats(); void setStats(ImageStats[] stats); LongRectangle getOrCreateTileBounds(int zoomlevel); LongRectangle getOrCreatePixelBounds(int zoomlevel); int getTileType(); void setTileType(int tileType); @JsonIgnore boolean isFloatingPoint(); Classification getClassification(); void setClassification(Classification classification); double[] getExtrema(int zoomLevel); String getResamplingMethod(); void setResamplingMethod(String resamplingMethod); @SuppressWarnings("squid:S1166") // Exception caught and handled void save(OutputStream stream); void setPixelBounds(int zoomlevel, LongRectangle pixelBounds); void setTileBounds(int zoomlevel, LongRectangle tileBounds); void setImageStats(int zoomlevel, ImageStats[] stats);  }