@Beta
public interface XPathExpression
XPathSchemaContext and may not be
evaluated on XPathDocuments from other context.| Modifier and Type | Method and Description |
|---|---|
Optional<? extends XPathResult<?>> |
evaluate(@NonNull XPathDocument document,
@NonNull YangInstanceIdentifier path)
Evaluate this expression at the specified path in a document.
|
@NonNull SchemaPath |
getApexPath()
Return the SchemaPath of the topmost node which affects the result of evaluation of this expression.
|
@NonNull SchemaPath |
getEvaluationPath()
Return the evaluation context SchemaPath of this expression.
|
Optional<? extends XPathResult<?>> evaluate(@NonNull XPathDocument document, @NonNull YangInstanceIdentifier path) throws XPathExpressionException
XPathResult. If it fails to match anything, it will return Optional.empty(). Implementations
of this method are expected to perform complete evaluation such that accessing data via the resulting
XPathResult will not incur large overhead.document - XPathDocument on which evaluation should take placepath - Path to the node on which to evaluate the expressionXPathResultNullPointerException - if any of the arguments are nullXPathExpressionException - if the expression cannot be evaluatedIllegalArgumentException - if the path does not match the path at which this expression was compiled@NonNull SchemaPath getEvaluationPath()
RelocatableXPathExpression.relocateExpression().SchemaPath@NonNull SchemaPath getApexPath()
DataTree implementations) to minimize the frequency
of evaluation. The apex can be either logically higher or lower in the SchemaPath tree than
getEvaluationPath().SchemaPath.ROOT if it cannot
cannot be conclusively determined.Copyright © 2019 OpenDaylight. All rights reserved.