Class ConfPath
- Direct Known Subclasses:
ConfCdbUpgradePath
Class Representing an KeyPath path.
String representations e.g "/n:rootA/nodeB/listC{key1}/leafD"
User applications usually needs to construct string representations
of paths in this way. To construct a ConfPath
from this
representation use ConfPath(String, Object...)
-
Constructor Summary
ConstructorDescriptionConfPath
(Cdb cdb, ConfObject[] kp) ConfPath
(ConfObject[] kp) Initializes a new instance of this class from a given reverted ConfObject[] keypath where elements is eitherConfTag
orConfKey
.ConfPath
(MountIdInterface mountIdCb, ConfObject[] kp) ConfPath
(MountIdInterface mountIdCb, String fmt, Object... arguments) ConfPath
(MountIdInterface mountGetter, List<com.tailf.conf.gen.PathParser.PathElement> pl) ConfPath
(Maapi maapi, int tid, ConfObject[] kp) Initialize a ConfPath.Initialize a ConfPath.Construct aConfPath
from a string path representation and of optional arguments. -
Method Summary
Modifier and TypeMethodDescriptionAppends suffix path to existing keypathappend
(String s, List<MaapiSchemas.CSNode> pathNodes) Appends suffix path to existing keypathclone()
Clones the ConfPathcopyAppend
(String s) CopyAppends to the keypathcopyPop()
Creates a new ConfPath with the current path minus the last element including list keys.void
pop()
Pops the last element from the path including list keys.toString()
Default String representation of this path, which is the keypath string representationReturns this path as an XPath stringMethods inherited from class com.tailf.conf.InstancePath
atoString, encode, encodeIKP, equals, getCSNode, getKP, getLatestMountId, getMountIdGetter, hashCode, isKey, isParsingDeferred, isRel, setMountIdGetter
-
Constructor Details
-
ConfPath
-
ConfPath
Initialize a ConfPath. (This constructor is rarely used for applications; usually for internal use)- Parameters:
o
- element constitute aConfPath
- Throws:
ConfException
-
ConfPath
Initialize a ConfPath. (This constructor is rarely used for applications; usually for internal uses)- Parameters:
o
- element (reversed) constitute aConfPath
-
ConfPath
Construct a
ConfPath
from a string path representation and of optional arguments.The path is expressed as a format string that could contain fixed text with zero to many embedded format specifiers.
For each specifier one argument in the variable argument list is expected.
format specifiers in the Java API is:%d - requiring an integer parameter (type int) to be substituted.
%s - requiring a java.lang.String parameter to be substituted.
%x - requiring subclasses of type com.tailf.conf.ConfValue to be substituted.
- Parameters:
fmt
- path string representationarguments
- optional parameters for substitution in fmt- Throws:
ConfException
-
ConfPath
- Throws:
ConfException
-
ConfPath
- Throws:
ConfException
-
ConfPath
- Throws:
ConfException
-
ConfPath
Initializes a new instance of this class from a given reverted ConfObject[] keypath where elements is eitherConfTag
orConfKey
.- Parameters:
kp
- reverted keypath
-
ConfPath
-
ConfPath
- Throws:
ConfException
-
ConfPath
-
ConfPath
-
-
Method Details
-
toString
Default String representation of this path, which is the keypath string representation- Overrides:
toString
in classInstancePath
- Returns:
- Default string representation
-
clone
Clones the ConfPath -
append
Appends suffix path to existing keypath- Parameters:
s
- path to append- Throws:
ConfException
-
append
Appends suffix path to existing keypath- Parameters:
s
- path to appendpathNodes
- sorted list of allCSNode
objects contained in the resultingConfPath
object after appending s. This list is used as a cache to speedupConfPath
construction.- Throws:
ConfException
-
copyAppend
CopyAppends to the keypath- Throws:
ConfException
-
pop
Pops the last element from the path including list keys.- Throws:
ConfException
-
copyPop
Creates a new ConfPath with the current path minus the last element including list keys.- Throws:
ConfException
-
toXPathString
Returns this path as an XPath string- Overrides:
toXPathString
in classInstancePath
- Returns:
- XPath string representation
-