public NetCDFLayerSettingsContainer(NetCDFSettingsContainer globalContainer) { setCompressionLevel(globalContainer.getCompressionLevel()); setDataPacking(globalContainer.getDataPacking()); setGlobalAttributes(globalContainer.getGlobalAttributes()); setShuffle(globalContainer.isShuffle()); }
container.setShuffle(true); container.setDataPacking(isPackedLayer ? DataPacking.SHORT : DataPacking.NONE);
container.setShuffle(true); container.setDataPacking(isPackedLayer ? DataPacking.SHORT : DataPacking.NONE);
public NetCDFLayerSettingsContainer(NetCDFSettingsContainer globalContainer) { setCompressionLevel(globalContainer.getCompressionLevel()); setDataPacking(globalContainer.getDataPacking()); setShuffle(globalContainer.isShuffle()); setCopyAttributes(globalContainer.isCopyAttributes()); setCopyGlobalAttributes(globalContainer.isCopyGlobalAttributes()); setGlobalAttributes(globalContainer.getGlobalAttributes()); setVariableAttributes(globalContainer.getVariableAttributes()); setExtraVariables(globalContainer.getExtraVariables()); }
@Override protected void convertInput() { globalAttributes.visitChildren(new Component.IVisitor<Component>() { @Override public Object component(Component component) { if (component instanceof FormComponent) { FormComponent<?> formComponent = (FormComponent<?>) component; formComponent.processInput(); } return Component.IVisitor.CONTINUE_TRAVERSAL; } }); compressionLevel.processInput(); dataPacking.processInput(); shuffle.processInput(); standardName.processInput(); uom.processInput(); List<GlobalAttribute> info = globalAttributes.getModelObject(); NetCDFLayerSettingsContainer convertedInput = new NetCDFLayerSettingsContainer(); convertedInput.setCompressionLevel(compressionLevel.getModelObject()); convertedInput.setGlobalAttributes(info); convertedInput.setDataPacking(dataPacking.getModelObject()); convertedInput.setShuffle(shuffle.getModelObject()); convertedInput.setLayerName(standardName.getModelObject()); convertedInput.setLayerUOM(uom.getModelObject()); setConvertedInput(convertedInput); } }
NetCDFLayerSettingsContainer container = new NetCDFLayerSettingsContainer(); container.setCompressionLevel(0); container.setShuffle(true); container.setDataPacking(DataPacking.SHORT); String key = "NetCDFOutput.Key";
convertedInput.setExtraVariables(extraVariables.getModelObject()); convertedInput.setDataPacking(dataPacking.getModelObject()); convertedInput.setShuffle(shuffle.getModelObject()); convertedInput.setCopyAttributes(copyAttributes.getModelObject()); convertedInput.setCopyGlobalAttributes(copyGlobalAttributes.getModelObject());