Fix Absolute Path to list with Integer/String key 38/128238/16
authorLathish <lathishbabu.ganesan@est.tech>
Thu, 31 Mar 2022 16:29:22 +0000 (17:29 +0100)
committerLathish <lathishbabu.ganesan@est.tech>
Mon, 25 Apr 2022 17:33:28 +0000 (18:33 +0100)
commit2f09266fd3231529e41ce97b02577bc5b82a8c03
treed3c2dc83eadd5904775ecfa2621152d9d0e73da8
parent3a13b2e965569304822fe4d56838a4fee4e7ad44
Fix Absolute Path to list with Integer/String key

 - Introduced normalizedXpath to normalize the xpath and cpspath
 - Introduced normalizedAncestorpath to normalize the ancestor path in xpath and cpspath
 - Added new condition in the ANTLR Grammar to capture the invalid path in the xpath
 - Introduced PathParsingException to replace the IllegalStateException

Issue-ID: CPS-961
Change-Id: Ie10f5c6cfc466387e79eec184b933297d1d79587
Signed-off-by: Lathish <lathishbabu.ganesan@est.tech>
13 files changed:
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/main/java/org/onap/cps/cpspath/parser/CpsPathUtil.java [new file with mode: 0644]
cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/PathParsingException.java [new file with mode: 0755]
cps-path-parser/src/test/groovy/org/onap/cps/cpspath/parser/CpsPathQuerySpec.groovy
cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceIntegrationSpec.groovy
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceSpec.groovy
cps-ri/src/test/resources/data/cps-path-query.sql
cps-ri/src/test/resources/data/fragment.sql