legacy/src/main/java/thredds/catalog/InvCatalogFactory.java
public InvCatalogImpl readXML(String uriString) {
    
    URI uri;
    try {
      uri = new URI(uriString);
    } catch (URISyntaxException e) {
      InvCatalogImpl cat = new InvCatalogImpl(uriString, null, null);
      cat.appendErrorMessage("**Fatal:  InvCatalogFactory.readXML URISyntaxException on URL (" +
          uriString + ") " + e.getMessage() + "\n", true);
      return cat;
    }

    /* if (uriString.startsWith("file:")) {
      String filename = uriString.substring(5);
      File f = new File(filename);
      if (f.exists()) {
        try {
          return readXML(new FileInputStream(f), uri);

        } catch (Exception e) {
          InvCatalogImpl cat = new InvCatalogImpl(uriString, null, null);
          cat.appendErrorMessage("**Fatal:  InvCatalogFactory.readXML error (" +
              uriString + ") " + e.getMessage() + "\n", true);
        }
      }
    }  */

    return readXML(uri);
  }
public InvCatalogImpl readXML(String uriString) {
    
    URI uri;
    try {
      uri = new URI(uriString);
    } catch (URISyntaxException e) {
      InvCatalogImpl cat = new InvCatalogImpl(uriString, null, null);
      cat.appendErrorMessage("**Fatal:  InvCatalogFactory.readXML URISyntaxException on URL (" +
          uriString + ") " + e.getMessage() + "\n", true);
      return cat;
    }

    /* if (uriString.startsWith("file:")) {
      String filename = uriString.substring(5);
      File f = new File(filename);
      if (f.exists()) {
        try {
          return readXML(new FileInputStream(f), uri);

        } catch (Exception e) {
          InvCatalogImpl cat = new InvCatalogImpl(uriString, null, null);
          cat.appendErrorMessage("**Fatal:  InvCatalogFactory.readXML error (" +
              uriString + ") " + e.getMessage() + "\n", true);
        }
      }
    }  */

    return readXML(uri);
  }
Create an InvCatalog from an XML document at a named URI.
Failures and exceptions are handled
by causing validate() to fail. Therefore, be sure to call validate() before trying
to use the InvCatalog object.

@param uriString : the URI name that the XML doc is at. May start with a "file:"
@return an InvCatalogImpl object