Package thredds.server.catalog
Class DataRootPathMatcher
java.lang.Object
thredds.server.catalog.DataRootPathMatcher
Find the dataRoot path from the request, by getting the longest match.
Use a TreeSet for minimum in-memory use.
Keep the objects in a separate map that could be off-heap and persistent.
- Since:
- 4/1/2015
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddRoot(DatasetRootConfig config, String catalogRelPath, boolean checkDups) booleanSee if this object already exists in the collectionconvert2DataRoot(DataRootExt dataRootExt) voidextractDataRoots(String catalogRelPath, List<thredds.client.catalog.Dataset> dsList, boolean checkDups, Map<String, String> idMap) Finds datasetScan, datasetFmrc Look for duplicate Ids (give message).findDataRoot(String reqPath) Find the longest DataRoot match.findLongestPathMatch(String reqPath) Find the longest path match.Get an iterator over the dataRoot keys and values.
-
Constructor Details
-
DataRootPathMatcher
-
-
Method Details
-
contains
See if this object already exists in the collection- Parameters:
path- find object that has this key- Returns:
- true if already contains the key
-
get
-
getValues
Get an iterator over the dataRoot keys and values. debug- Returns:
- iterator
-
findLongestPathMatch
Find the longest path match.- Parameters:
reqPath- find object with longest match where reqPath.startsWith( key)- Returns:
- the value whose key is the longest that matches path, or null if none
-
findDataRoot
Find the longest DataRoot match.- Parameters:
reqPath- find object with longest match where reqPath.startsWith( key)- Returns:
- the value whose key is the longest that matches path, or null if none
-
convert2DataRoot
-
extractDataRoots
public void extractDataRoots(String catalogRelPath, List<thredds.client.catalog.Dataset> dsList, boolean checkDups, Map<String, String> idMap) Finds datasetScan, datasetFmrc Look for duplicate Ids (give message). Dont follow catRefs.- Parameters:
dsList- the list of Dataset
-
addRoot
-