Introducing Antlr4 for cpsPath parsing 03/121503/9
authorToineSiebelink <toine.siebelink@est.tech>
Thu, 20 May 2021 15:44:21 +0000 (16:44 +0100)
committerToineSiebelink <toine.siebelink@est.tech>
Tue, 1 Jun 2021 09:12:55 +0000 (10:12 +0100)
commitc37678a3eb62685d32a1581729e2a4e26002bffc
tree1901f7e3517ae339f99905f7ffc0021553874842
parent9de3b68373dd8554e64f34bb3093403521f8759f
Introducing Antlr4 for cpsPath parsing

-created new module for cpPathParser
-added antlr rule for cpsPathWithSingleLeafCondition
-added antlr rule for cpsPathWithDescendant (and with leaf conditions)
-added antlr rule for ancestor axis
-added unit test (copied from existing CpsPathQuerySpec)
-udpated cps-ri to use new cpPathQuery from parser module
-'imported' lexer rules from publix xPath grammar
-Re-used existing CpsPathException but conversion happens in cps-ri to prevent additional dependency in cps-path-parser module

Issue-ID: CPS-376

Change-Id: I2c5df98969402cbf69f6573c52705879450ce606
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
18 files changed:
cps-dependencies/pom.xml
cps-parent/pom.xml
cps-path-parser/lombok.config [new file with mode: 0644]
cps-path-parser/pom.xml [new file with mode: 0644]
cps-path-parser/src/main/antlr4/org/onap/cps/cpspath/parser/antlr4/CpsPath.g4 [new file with mode: 0644]
cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathBuilder.java [new file with mode: 0644]
cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathQuery.java [new file with mode: 0644]
cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathQueryType.java [moved from cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQueryType.java with 94% similarity]
cps-path-parser/src/test/groovy/org/onap/cps/cpspath/parser/CpsPathQuerySpec.groovy [moved from cps-ri/src/test/groovy/org/onap/cps/spi/query/CpsPathQuerySpec.groovy with 59% similarity]
cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
cps-ri/pom.xml
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQuery.java [deleted file]
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy
cps-service/src/main/java/org/onap/cps/spi/exceptions/CpsPathException.java
cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy
pom.xml
spotbugs/src/main/resources/spotbugs-exclude.xml