private int setDataDescriptors(java.util.List<DdsBean> beanList, DataDescriptor dds, int seqno) {
   for (DataDescriptor key : dds.getSubKeys()) {
     beanList.add(new DdsBean(key, seqno++));
     if (key.getSubKeys() != null) seqno = setDataDescriptors(beanList, key, seqno);
   }
   return seqno;
 }
  public void setBufrFile(RandomAccessFile raf) throws IOException {
    this.raf = raf;
    java.util.List<MessageBean> beanList = new ArrayList<MessageBean>();

    scan = new MessageScanner(raf);
    while (scan.hasNext()) {
      Message m = scan.next();
      if (m == null) continue;

      beanList.add(new MessageBean(m));
    }

    messageTable.setBeans(beanList);
    obsTable.setBeans(new ArrayList());
    ddsTable.setBeans(new ArrayList());
  }
  private void setObs(Message m) {

    java.util.List<ObsBean> beanList = new ArrayList<ObsBean>();
    try {
      NetcdfDataset ncd = getBufrMessageAsDataset(m);
      Variable v = ncd.findVariable(BufrIosp.obsRecord);
      if ((v != null) && (v instanceof Structure)) {
        Structure obs = (Structure) v;
        StructureDataIterator iter = obs.getStructureIterator();
        while (iter.hasNext()) {
          beanList.add(new ObsBean(obs, iter.next()));
        }
      }
    } catch (Exception ex) {
      JOptionPane.showMessageDialog(BufrMessageViewer.this, ex.getMessage());
      ex.printStackTrace();
    }
    obsTable.setBeans(beanList);
  }