ui/src/main/java/thredds/ui/catalog/CatalogTreeView.java
public void setCatalog(Catalog catalog) {
    if (catalog == null) return;
    String catalogName = catalog.getBaseURI().toString();
    this.catalog = catalog;

    // send catalog event
    setCatalogURL( catalogName);

    // display tree
    // this sends TreeNode events
    model = new InvCatalogTreeModel(catalog);
    tree.setModel( model);

      // debug
    if (debugTree) {
      System.out.println("*** catalog/showJTree =");
      showNode(tree.getModel(), tree.getModel().getRoot());
      System.out.println("*** ");
    }

    // look for a specific dataset
    int pos = catalogName.indexOf('#');
    if (pos >= 0) {
      String id = catalogName.substring( pos+1);
      Dataset dataset = catalog.findDatasetByID( id);
      if (dataset != null) {
        setSelectedDataset(dataset);
        firePropertyChangeEvent( new PropertyChangeEvent(this, "Selection", null, dataset));
      }
    }

    // send catalog event
    firePropertyChangeEvent(new PropertyChangeEvent(this, "Catalog", null, catalogName));
  }
public void setCatalog(Catalog catalog) {
    if (catalog == null) return;
    String catalogName = catalog.getBaseURI().toString();
    this.catalog = catalog;

    // send catalog event
    setCatalogURL( catalogName);

    // display tree
    // this sends TreeNode events
    model = new InvCatalogTreeModel(catalog);
    tree.setModel( model);

      // debug
    if (debugTree) {
      System.out.println("*** catalog/showJTree =");
      showNode(tree.getModel(), tree.getModel().getRoot());
      System.out.println("*** ");
    }

    // look for a specific dataset
    int pos = catalogName.indexOf('#');
    if (pos >= 0) {
      String id = catalogName.substring( pos+1);
      Dataset dataset = catalog.findDatasetByID( id);
      if (dataset != null) {
        setSelectedDataset(dataset);
        firePropertyChangeEvent( new PropertyChangeEvent(this, "Selection", null, dataset));
      }
    }

    // send catalog event
    firePropertyChangeEvent(new PropertyChangeEvent(this, "Catalog", null, catalogName));
  }
Set the catalog to be displayed. If ok, then a "Catalog" PropertyChangeEvent is sent.
@param catalog to be displayed