cdm/src/main/java/thredds/client/catalog/CatalogRef.java
protected String translatePathToReletiveLocation(String dsPath, String configPath) {
    if (dsPath == null) return null;
    if (dsPath.length() == 0) return null;

    if (dsPath.startsWith("/"))
      dsPath = dsPath.substring(1);

    if (!dsPath.startsWith(configPath))
      return null;

    // remove the matching part, the rest is the "reletive location"
    String dataDir = dsPath.substring(configPath.length());
    if (dataDir.startsWith("/"))
      dataDir = dataDir.substring(1);

    return dataDir;
  }
protected String translatePathToReletiveLocation(String dsPath, String configPath) {
    if (dsPath == null) return null;
    if (dsPath.length() == 0) return null;

    if (dsPath.startsWith("/"))
      dsPath = dsPath.substring(1);

    if (!dsPath.startsWith(configPath))
      return null;

    // remove the matching part, the rest is the "reletive location"
    String dataDir = dsPath.substring(configPath.length());
    if (dataDir.startsWith("/"))
      dataDir = dataDir.substring(1);

    return dataDir;
  }
///////////////////////////////////////////////