legacy/src/main/java/thredds/catalog/InvCatalogRef.java
public synchronized void readAsynch(InvCatalogFactory factory, CatalogSetCallback caller) {
    if (init) {
      caller.setCatalog((InvCatalogImpl) getParentCatalog());
      return;
    }

    // may be reletive
    String hrefResolved;
    try {
      java.net.URI uri = getParentCatalog().resolveUri(href);
      hrefResolved = uri.toString();
    }
    catch (java.net.URISyntaxException e) {
      // this is to display an error message
      proxy = new InvDatasetImpl(null, "HREF ERROR");
      if (debug)
        System.out.println("HREF ERROR =\n  " + href + " err= " + e.getMessage());
      proxy.addProperty(new InvProperty("HREF ERROR", href));
      datasets.add(proxy);
      return;
    }

    // open and read the referenced catalog XML asynchronously
    // setCatalog will be called when ready
    try {
      if (debug) System.out.println(" InvCatalogRef readXMLasynch " + getFullName() +
          "  hrefResolved = " + hrefResolved);
      factory.readXMLasynch(hrefResolved, new Callback(caller));
    } catch (Exception e) {
      // this is to display an error message
      proxy = new InvDatasetImpl(null, "HREF ERROR");
      if (debug)
        System.out.println("HREF ERROR =\n  " + href + " err= " + e.getMessage());
      proxy.addProperty(new InvProperty("HREF ERROR", href));
      datasets.add(proxy);
    }
  }
public synchronized void readAsynch(InvCatalogFactory factory, CatalogSetCallback caller) {
    if (init) {
      caller.setCatalog((InvCatalogImpl) getParentCatalog());
      return;
    }

    // may be reletive
    String hrefResolved;
    try {
      java.net.URI uri = getParentCatalog().resolveUri(href);
      hrefResolved = uri.toString();
    }
    catch (java.net.URISyntaxException e) {
      // this is to display an error message
      proxy = new InvDatasetImpl(null, "HREF ERROR");
      if (debug)
        System.out.println("HREF ERROR =\n  " + href + " err= " + e.getMessage());
      proxy.addProperty(new InvProperty("HREF ERROR", href));
      datasets.add(proxy);
      return;
    }

    // open and read the referenced catalog XML asynchronously
    // setCatalog will be called when ready
    try {
      if (debug) System.out.println(" InvCatalogRef readXMLasynch " + getFullName() +
          "  hrefResolved = " + hrefResolved);
      factory.readXMLasynch(hrefResolved, new Callback(caller));
    } catch (Exception e) {
      // this is to display an error message
      proxy = new InvDatasetImpl(null, "HREF ERROR");
      if (debug)
        System.out.println("HREF ERROR =\n  " + href + " err= " + e.getMessage());
      proxy.addProperty(new InvProperty("HREF ERROR", href));
      datasets.add(proxy);
    }
  }
public synchronized void readAsynch ( InvCatalogFactory factory , CatalogSetCallback caller ) { if ( init ) { caller . setCatalog ( ( InvCatalogImpl ) getParentCatalog ( ) ) ; return ; } // may be reletive String hrefResolved ; try { java . net . URI uri = getParentCatalog ( ) . resolveUri ( href ) ; hrefResolved = uri . toString ( ) ; } catch ( java . net . URISyntaxException e ) { // this is to display an error message proxy = new InvDatasetImpl ( null , "HREF ERROR" ) ; if ( debug ) System . out . println ( "HREF ERROR =\n  " + href + " err= " + e . getMessage ( ) ) ; proxy . addProperty ( new InvProperty ( "HREF ERROR" , href ) ) ; datasets . add ( proxy ) ; return ; } // open and read the referenced catalog XML asynchronously // setCatalog will be called when ready try { if ( debug ) System . out . println ( " InvCatalogRef readXMLasynch " + getFullName ( ) + "  hrefResolved = " + hrefResolved ) ; factory . readXMLasynch ( hrefResolved , new Callback ( caller ) ) ; } catch ( Exception e ) { // this is to display an error message proxy = new InvDatasetImpl ( null , "HREF ERROR" ) ; if ( debug ) System . out . println ( "HREF ERROR =\n  " + href + " err= " + e . getMessage ( ) ) ; proxy . addProperty ( new InvProperty ( "HREF ERROR" , href ) ) ; datasets . add ( proxy ) ; } }
Read the referenced catalog asynchronously, if the catalog factory supports it.
If it doesnt, this method will work equivilently to read(), which is called the first time
getDatasets() is called. If the catalog is already read in, the callback will be called
immediately, before this method exits.

@param factory : use this catalog factory
@param caller  when catalog is read
@see CatalogSetCallback
Read the referenced catalog asynchronously if the catalog factory supports it . If it doesnt this method will work equivilently to read () which is called the first time getDatasets () is called . If the catalog is already read in the callback will be called immediately before this method exits .