diff options
Diffstat (limited to 'cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathQuery.java')
-rw-r--r-- | cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathQuery.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathQuery.java b/cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathQuery.java index c9df8df90..398545526 100644 --- a/cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathQuery.java +++ b/cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathQuery.java @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021-2022 Nordix Foundation + * Copyright (C) 2021-2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,4 +80,13 @@ public class CpsPathQuery { return textFunctionConditionLeafName != null; } + /** + * Returns boolean indicating xpath is an absolute path to a list element. + * + * @return true if xpath is an absolute path to a list element + */ + public boolean isPathToListElement() { + return cpsPathPrefixType == ABSOLUTE && hasLeafConditions(); + } + } |