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
ConstructorsConstructorDescriptionConfPath(Cdb cdb, ConfObject[] kp) ConfPath(ConfObject[] kp) Initializes a new instance of this class from a given reverted ConfObject[] keypath where elements is eitherConfTagorConfKey.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 aConfPathfrom 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.voidpop()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
encode, encodeIKP, equals, getCSNode, getKP, 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
ConfPathfrom 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 eitherConfTagorConfKey.- 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:
toStringin 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 allCSNodeobjects contained in the resultingConfPathobject after appending s. This list is used as a cache to speedupConfPathconstruction.- 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:
toXPathStringin classInstancePath- Returns:
- XPath string representation
-