public class URLMapDefault extends Object implements URLMap
URLMap.Result| Constructor and Description |
|---|
URLMapDefault() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(String urlpath,
String fileprefix)
Add an entry into the map.
|
void |
load(String filepath) |
protected URLMap.Result |
longestmatch(SortedMap<String,String> map,
String prefix) |
URLMap.Result |
mapPath(String path)
Inverse of mapURL; returns a url path and suffix: U,S
such that mapURL(U)+S = path
Return a Pair specifying:
1.
|
URLMap.Result |
mapURL(String urlpath)
Use some maximal prefix of the url path
to locate the associated file path prefix.
|
String |
toString() |
public void addEntry(String urlpath, String fileprefix) throws dap4.core.util.DapException
URLMappublic void load(String filepath) throws IOException
IOExceptionpublic URLMap.Result mapURL(String urlpath) throws dap4.core.util.DapException
URLMapmapURL in interface URLMapurlpath - a string specifying the url path to be mappeddap4.core.util.DapException - if the map fails
Note that this map does not deal with the whole url, only the path part
because as a rule, the host+port is unknown at the time the map is built
and also because there might be multiple hosts using the same map.public URLMap.Result mapPath(String path) throws dap4.core.util.DapException
URLMapprotected URLMap.Result longestmatch(SortedMap<String,String> map, String prefix)