ui/src/main/java/ucar/nc2/ui/grib/Grib2DataPanel.java
public void setCollection(String spec) throws IOException {
    this.spec = spec;
    this.cust = null;

    Formatter f = new Formatter();
    this.dcm = scanCollection(spec, f);
    if (dcm == null) {
      javax.swing.JOptionPane.showMessageDialog(this, "Collection is null\n" + f.toString());
      return;
    }

    Map<Grib2Variable, Grib2ParameterBean> pdsSet = new HashMap<>();
    Map<Integer, Grib2SectionGridDefinition> gdsSet = new HashMap<>();

    java.util.List<Grib2ParameterBean> params = new ArrayList<>();

    int fileno = 0;
    for (MFile mfile : fileList) {
      f.format("%n %s%n", mfile.getPath());
      try (ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.RandomAccessFile(mfile.getPath(), "r")) {
        raf.order(ByteOrder.BIG_ENDIAN);
        processGribFile(mfile, fileno++, raf, pdsSet, gdsSet, params, f);
      }
    }
    param2BeanTable.setBeans(params);
  }
public void setCollection(String spec) throws IOException {
    this.spec = spec;
    this.cust = null;

    Formatter f = new Formatter();
    this.dcm = scanCollection(spec, f);
    if (dcm == null) {
      javax.swing.JOptionPane.showMessageDialog(this, "Collection is null\n" + f.toString());
      return;
    }

    Map<Grib2Variable, Grib2ParameterBean> pdsSet = new HashMap<>();
    Map<Integer, Grib2SectionGridDefinition> gdsSet = new HashMap<>();

    java.util.List<Grib2ParameterBean> params = new ArrayList<>();

    int fileno = 0;
    for (MFile mfile : fileList) {
      f.format("%n %s%n", mfile.getPath());
      try (ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.RandomAccessFile(mfile.getPath(), "r")) {
        raf.order(ByteOrder.BIG_ENDIAN);
        processGribFile(mfile, fileno++, raf, pdsSet, gdsSet, params, f);
      }
    }
    param2BeanTable.setBeans(params);
  }
/* public void setCollection(String filename) throws IOException {
if (filename.endsWith(GribCollection.IDX_EXT)) {
openIndex(filename);
} else {
openCollection(filename);
}
}

private void openIndex(String filename) throws IOException {
GribCollection gribCollection = new GribCollection(null);
if (!gribCollection.readIndex(filename))
throw new FileNotFoundException();

this.cust = GribTables.factory(gribCollection.center, gribCollection.subcenter, gribCollection.master, gribCollection.local);

java.util.List<Grib2ParameterBean> params = new ArrayList<Grib2ParameterBean>();
java.util.List<Gds2Bean> gdsList = new ArrayList<Gds2Bean>();

for (GribCollection.GroupHcs gHcs : gribCollection.getGroups()) {
for (GribCollection.VariableIndex vi : gHcs.varIndex) {
for (vi.records)
}
}
addGroup(ncfile, g, useGroups);


int fileno = 0;
fileList = dcm.getFiles();
for (MFile mfile : fileList) {
f.format("%n %s%n", mfile.getPath());
processGribFile(mfile.getPath(), fileno++, pdsSet, gdsSet, params);
}
param2BeanTable.setBeans(params);

for (Grib2SectionGridDefinition gds : gdsSet.values()) {
gdsList.add(new Gds2Bean( gds));
}
gds2Table.setBeans(gdsList);
}