public class RootPathMap extends Object
Currently exists as a singleton.
Modifier and Type | Method and Description |
---|---|
void |
addFromXmlFile(Path path)
Adds root-paths contained in a list of XML Beans in an xml file
|
RootPath |
findRoot(String name,
boolean debug)
Finds a root to match a name and debug/status
|
static RootPathMap |
instance() |
SplitPath |
split(Path pathIn,
String rootName,
boolean debugMode)
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)
|
public SplitPath split(Path pathIn, String rootName, boolean debugMode) throws PathDifferenceException
pathIn
- path to splitrootName
- identifier for a root to usedebugMode
- whether we are in debug mode or notPathDifferenceException
- if the path cannot be matched against the rootpublic static RootPathMap instance()
public void addFromXmlFile(Path path) throws OperationFailedException
path
- the path to the XML file containing the root-pathsOperationFailedException
public RootPath findRoot(String name, boolean debug) throws PathDifferenceException
name
- this name must matchdebug
- if true, priority is given to root paths which also match debug.PathDifferenceException
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.