/** @see java.lang.Object#hashCode() */ @Override public int hashCode() { return getSource().hashCode() + getOutput().hashCode() + getDimensions().hashCode(); } }
/** @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object other) { return other instanceof ExtraVariable && getSource().equals(((ExtraVariable) other).getSource()) && getOutput().equals(((ExtraVariable) other).getOutput()) && getDimensions().equals(((ExtraVariable) other).getDimensions()); }
for (NetCDFSettingsContainer.ExtraVariable extra : scalarExtraVariables) { writer.write( writer.findVariable(extra.getOutput()), source.findVariable(extra.getSource()).read());
source.getLocation(), sourceVar.getDimensionsString())); } else if (writer.findVariable(extra.getOutput()) != null) { LOGGER.info( String.format( "Extra variable output '%s' already exists", extra.getOutput())); } else if (extra.getDimensions().split("\\s").length > 1) { LOGGER.info( "Extra variable output '%s' " + "has too many dimensions '%s'", extra.getOutput(), extra.getDimensions())); } else { Variable outputVar = writer.addVariable( null, extra.getOutput(), sourceVar.getDataType(), extra.getDimensions());
source.getLocation(), sourceVar.getDimensionsString())); } else if (writer.findVariable(extra.getOutput()) != null) { LOGGER.info( String.format( "Extra variable output '%s' already exists", extra.getOutput())); } else if (extra.getDimensions().split("\\s").length > 1) { LOGGER.info( "Extra variable output '%s' " + "has too many dimensions '%s'", extra.getOutput(), extra.getDimensions())); } else { Variable outputVar = writer.addVariable( null, extra.getOutput(), sourceVar.getDataType(), extra.getDimensions());
indexing[record.dimensionIndex])) { writer.write( writer.findVariable(record.extraVariable.getOutput()), new int[] {indexing[record.dimensionIndex]}, source.findVariable(record.extraVariable.getSource())
assertEquals("reftime", actualContainer.getExtraVariables().get(0).getSource()); assertEquals( "forecast_reference_time", actualContainer.getExtraVariables().get(0).getOutput()); assertEquals("time", actualContainer.getExtraVariables().get(0).getDimensions());