@Ignore @Test @Category(UnitTest.class) public void testWriteProvided() throws IOException { Assert.assertEquals("Classification incorrect", Classification.Continuous, metadata.getClassification()); Assert.assertEquals("Max zoom incorrect", 10, metadata.getMaxZoomLevel()); Assert.assertEquals("Tile size incorrect", MrGeoConstants.MRGEO_MRS_TILESIZE_DEFAULT_INT, metadata.getTilesize()); metadata.setClassification(Classification.Categorical); metadata.setMaxZoomLevel(100); metadata.setTilesize(100); Assert.assertEquals("Classification wasn't overwritten correctly", Classification.Categorical, metadata.getClassification()); Assert.assertEquals("Max zoom wasn't overwritten correctly", 100, metadata.getMaxZoomLevel()); Assert.assertEquals("Tile size wasn't overwritten correctly", 100, metadata.getTilesize()); writer.write(metadata); MrsPyramidMetadata newMeta = reader.read(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); newMeta.save(bos); String newMetaStr = new String(bos.toByteArray()); bos.close(); Assert.assertEquals("Classification wasn't overwritten correctly", Classification.Categorical, newMeta.getClassification()); Assert.assertEquals("Max zoom wasn't overwritten correctly", 100, newMeta.getMaxZoomLevel()); Assert.assertEquals("Tile size wasn't overwritten correctly", 100, newMeta.getTilesize()); Assert.assertFalse("JSON dumps are same!", originalMeta.equals(newMetaStr)); metadata.setClassification(Classification.Continuous); metadata.setMaxZoomLevel(10); metadata.setTilesize(MrGeoConstants.MRGEO_MRS_TILESIZE_DEFAULT_INT); writer.write(metadata); }
@Override public void write() throws IOException { MrsPyramidMetadata metadata = provider.getMetadataReader(null).read(); write(metadata); }
AccumuloMrsPyramidMetadataWriter implements MrsPyramidMetadataWriter { @Override public void write() throws IOException { MrsPyramidMetadata metadata = provider.getMetadataReader(null).read(); write(metadata); } }
AccumuloMrsPyramidMetadataWriter implements MrsPyramidMetadataWriter { @Override public void write() throws IOException { MrsPyramidMetadata metadata = provider.getMetadataReader(null).read(); write(metadata); } AccumuloMrsPyramidMetadataWriter(MrsImageDataProvider provider,
    MrsPyramidMetadataWriterContext context); }
AccumuloMrsPyramidMetadataWriter implements MrsPyramidMetadataWriter { @Override public void write() throws IOException { MrsPyramidMetadata metadata = provider.getMetadataReader(null).read(); write(metadata); } AccumuloMrsPyramidMetadataWriter(MrsImageDataProvider provider,
    MrsPyramidMetadataWriterContext context); @Override void write(); @Override @SuppressWarnings("squid:S1166") // Exception caught and handled void write(MrsPyramidMetadata metadata); void setConnector(Connector conn); }
AccumuloMrsPyramidMetadataWriter implements MrsPyramidMetadataWriter { @Override public void write() throws IOException { MrsPyramidMetadata metadata = provider.getMetadataReader(null).read(); write(metadata); } AccumuloMrsPyramidMetadataWriter(MrsImageDataProvider provider,
    MrsPyramidMetadataWriterContext context); @Override void write(); @Override @SuppressWarnings("squid:S1166") // Exception caught and handled void write(MrsPyramidMetadata metadata); void setConnector(Connector conn);  }