tdcommon/src/main/java/thredds/server/catalog/DataRootPathMatcher.java
public DataRoot findDataRoot( String reqPath) {
    String path =  findLongestPathMatch(reqPath);
    if (path == null) return null;
    DataRootExt dataRootExt = map.get(path);
    if (dataRootExt == null) {
      logger.error("DataRootPathMatcher found path {} but not in map", path);
      return null;
    }
    return convert2DataRoot(dataRootExt);
  }
public DataRoot findDataRoot( String reqPath) {
    String path =  findLongestPathMatch(reqPath);
    if (path == null) return null;
    DataRootExt dataRootExt = map.get(path);
    if (dataRootExt == null) {
      logger.error("DataRootPathMatcher found path {} but not in map", path);
      return null;
    }
    return convert2DataRoot(dataRootExt);
  }
public DataRoot findDataRoot ( String reqPath ) { String path = findLongestPathMatch ( reqPath ) ; if ( path == null ) return null ; DataRootExt dataRootExt = map . get ( path ) ; if ( dataRootExt == null ) { logger . error ( "DataRootPathMatcher found path {} but not in map" , path ) ; return null ; } return convert2DataRoot ( dataRootExt ) ; }
Find the longest DataRoot match.
@param reqPath find object with longest match where reqPath.startsWith( key)
@return the value whose key is the longest that matches path, or null if none
Find the longest DataRoot match .