public boolean compare(NetcdfFile org, NetcdfFile copy, ObjFilter filter, boolean showCompare, boolean showEach, boolean compareData) { this.compareData = compareData; this.showCompare = showCompare; this.showEach = showEach; f.format(" First file = %s%n", org.getLocation()); f.format(" Second file= %s%n", copy.getLocation()); long start = System.currentTimeMillis(); boolean ok = compareGroups(org.getRootGroup(), copy.getRootGroup(), filter); f.format(" Files are the same = %s%n", ok); long took = System.currentTimeMillis() - start; f.format(" Time to compare = %d msecs%n", took); // coordinate systems if (org instanceof NetcdfDataset && copy instanceof NetcdfDataset) { NetcdfDataset orgds = (NetcdfDataset) org; NetcdfDataset copyds = (NetcdfDataset) copy; List matches = new ArrayList(); ok &= checkAll("Dataset CS:", orgds.getCoordinateSystems(), copyds.getCoordinateSystems(), matches); for (int i = 0; i < matches.size(); i += 2) { CoordinateSystem orgCs = (CoordinateSystem) matches.get(i); CoordinateSystem copyCs = (CoordinateSystem) matches.get(i + 1); ok &= compareCoordinateSystem(orgCs, copyCs, filter); } } return ok; }
public boolean compare(NetcdfFile org, NetcdfFile copy, ObjFilter filter, boolean showCompare, boolean showEach, boolean compareData) { this.compareData = compareData; this.showCompare = showCompare; this.showEach = showEach; f.format(" First file = %s%n", org.getLocation()); f.format(" Second file= %s%n", copy.getLocation()); long start = System.currentTimeMillis(); boolean ok = compareGroups(org.getRootGroup(), copy.getRootGroup(), filter); f.format(" Files are the same = %s%n", ok); long took = System.currentTimeMillis() - start; f.format(" Time to compare = %d msecs%n", took); // coordinate systems if (org instanceof NetcdfDataset && copy instanceof NetcdfDataset) { NetcdfDataset orgds = (NetcdfDataset) org; NetcdfDataset copyds = (NetcdfDataset) copy; List matches = new ArrayList(); ok &= checkAll("Dataset CS:", orgds.getCoordinateSystems(), copyds.getCoordinateSystems(), matches); for (int i = 0; i < matches.size(); i += 2) { CoordinateSystem orgCs = (CoordinateSystem) matches.get(i); CoordinateSystem copyCs = (CoordinateSystem) matches.get(i + 1); ok &= compareCoordinateSystem(orgCs, copyCs, filter); } } return ok; }
CoordinateSystem orgCs = (CoordinateSystem) matches.get(i); CoordinateSystem copyCs = (CoordinateSystem) matches.get(i + 1); ok &= compareCoordinateSystem(orgCs, copyCs, filter);
CoordinateSystem orgCs = (CoordinateSystem) matches.get(i); CoordinateSystem copyCs = (CoordinateSystem) matches.get(i + 1); ok &= compareCoordinateSystem(orgCs, copyCs, filter);