[Cps Path Parser] Introduce Attribute axis 87/139587/3
authordanielhanrahan <daniel.hanrahan@est.tech>
Wed, 27 Nov 2024 15:38:41 +0000 (15:38 +0000)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Mon, 2 Dec 2024 13:30:15 +0000 (13:30 +0000)
commitd262e1c3f4671673a02ea402366a8c9b93fe4e53
tree8805f57e86733f5766e02eed6bb218f54f000282
parent7cd33c3f6784b5df58cb242847719c4faec7eca3
[Cps Path Parser] Introduce Attribute axis

Add grammar and tests for attribute-axis to match cps paths like:

  //books/@title

which should return the titles of all books (a subsequent patch will
implement the logic). The syntax is compatible with XPath standard.

Issue-ID: CPS-2416
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I25164b23670147c504f0f0f6c0cc8ff15997f2a3
cps-path-parser/src/main/antlr4/org/onap/cps/cpspath/parser/antlr4/CpsPath.g4
cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathBuilder.java
cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathQuery.java
cps-path-parser/src/test/groovy/org/onap/cps/cpspath/parser/CpsPathQuerySpec.groovy