Interface PathExpression

All Superinterfaces:
Immutable
All Known Implementing Classes:
AbstractPathExpression

@NonNullByDefault public interface PathExpression extends Immutable
An expression as defined in RFC7950 Section 9.9.2, i.e. the argument of a path statement.

Semantically a PathExpression is similar to a YangXPathExpression with guarantees around what subexpressions it can contain:

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Steps of a PathExpression which is a combination of deref() function call and a relative path, corresponding to Errata 5617.
    static final class 
    Steps of a PathExpression which is a LocationPath, corresponding to RFC7950 base specification.
    static class 
    Abstract base class for expressing steps of a PathExpression.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the path expression formatted string as is defined in model.
    Return the path of this expression, which can either be a YangLocationPath (compliant to RFC7950) or a YangPathExpr with filter being an invocation of YangFunction.DEREF.
    default boolean
    Returns true if the XPapth starts in root of YANG model, otherwise returns false.
  • Method Details

    • 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.
    • getSteps

      Return the path of this expression, which can either be a YangLocationPath (compliant to RFC7950) or a YangPathExpr with filter being an invocation of YangFunction.DEREF.
      Returns:
      The path's steps
      Throws:
      UnsupportedOperationException - if the implementation has not parsed the string. Implementations are strongly encouraged to perform proper parsing.
    • isAbsolute

      default boolean isAbsolute()
      Returns true if the XPapth starts in root of YANG model, otherwise returns false.
      Returns:
      true if the XPapth starts in root of YANG model, otherwise returns false