Interface PathExpression
-
- All Superinterfaces:
Immutable
,MutationBehaviour<Immutable>
- All Known Implementing Classes:
AbstractPathExpression
,PathExpressionImpl
@Beta @NonNullByDefault public interface PathExpression extends Immutable
An expression as defined in RFC7950 Section 9.9.2, i.e. the argument of apath
statement.Semantically a
PathExpression
is similar to aYangXPathExpression
with guarantees around what subexpressions it can contain:- the root expression must be a
YangLocationPath
- it can contain steps only along
YangXPathAxis.CHILD
andYangXPathAxis.PARENT
axis - all steps along
YangXPathAxis.CHILD
axis areYangLocationPath.QNameStep
- the only function invocation is
YangFunction.CURRENT
- only
YangBinaryOperator.EQUALS
is allowed - no literals nor numbers are allowed
- all qualified node identifiers must me resolved
- Author:
- Robert Varga
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description YangLocationPath
getLocation()
Return theYangLocationPath
of this expression.String
getOriginalString()
Returns the path expression formatted string as is defined in model.default boolean
isAbsolute()
Returnstrue
if the XPapth starts in root of YANG model, otherwise returnsfalse
.
-
-
-
Method Detail
-
getOriginalString
String getOriginalString()
Returns the path expression formatted string as is defined in model. For example:/prefix:container/prefix:container::cond[when()=foo]/prefix:leaf
- Returns:
- the path expression formatted string as is defined in model.
-
getLocation
YangLocationPath getLocation()
Return theYangLocationPath
of this expression.- Returns:
- The location path
- Throws:
UnsupportedOperationException
- if the implementation has not parsed the string. Implementations are strongly encouraged to perform proper parsing.
-
isAbsolute
default boolean isAbsolute()
Returnstrue
if the XPapth starts in root of YANG model, otherwise returnsfalse
.- Returns:
true
if the XPapth starts in root of YANG model, otherwise returnsfalse
-
-