Class RootPathMap
Object
RootPathMap
A collection of root-paths indexed by their name.
Currently exists as a singleton.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFromXmlFile
(Path path) Adds root-paths contained in a list of XML Beans in an xml fileFinds a root to match a name and debug/statusstatic RootPathMap
instance()
Given a path, it splits the *root* portion of the path from the remainder, trying a root identified by the rootName and debugMode (and if this fails, also trying with debugMode==false)
-
Method Details
-
split
public SplitPath split(Path pathIn, String rootName, boolean debugMode) throws PathDifferenceException Given a path, it splits the *root* portion of the path from the remainder, trying a root identified by the rootName and debugMode (and if this fails, also trying with debugMode==false)- Parameters:
pathIn
- path to splitrootName
- identifier for a root to usedebugMode
- whether we are in debug mode or not- Returns:
- the split-path
- Throws:
PathDifferenceException
- if the path cannot be matched against the root
-
instance
-
addFromXmlFile
Adds root-paths contained in a list of XML Beans in an xml file- Parameters:
path
- the path to the XML file containing the root-paths- Throws:
OperationFailedException
-
findRoot
Finds a root to match a name and debug/status- Parameters:
name
- this name must matchdebug
- if true, priority is given to root paths which also match debug.- Returns:
- the found root, or an exception if one cannot be found
- Throws:
PathDifferenceException
-