Draft at proposal where the DataNodeBuilder 'replaces' yang Utils to buidl a DataNode 18/117118/10
authorToineSiebelink <toine.siebelink@est.tech>
Mon, 25 Jan 2021 18:46:20 +0000 (18:46 +0000)
committerputhuparambil.aditya <aditya.puthuparambil@bell.ca>
Wed, 27 Jan 2021 16:01:33 +0000 (16:01 +0000)
commit099f89eda3b0c94d20612ebf1d62795ab7dc833a
tree9ac4eeb64c92bdf8b4de1773dcfd195158b30a6c
parent34afca00d1f8b2fabe7708c76be714687e136d68
Draft at proposal where the DataNodeBuilder 'replaces' yang Utils to buidl a DataNode

Most complexity is related to immutable collections and the fact taht we are adding data while recursing
over the orignal data in an uncontrolled order.

I cleaned it up as best I could with no logic in DataNode.
Espcially the handling of LitLeaves requires some specialed handling. Thsi is just a draft solution for that
I still propose we get back to that in dedicated user stories for handling the various types of Yang elements

Hope this helps...

Issue-ID: CPS-137

Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Iab7cfcff67412c01bcdab95e707e1350bf60fab1
cps-ri/src/test/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceTest.java
cps-service/src/main/java/org/onap/cps/api/impl/Fragment.java [deleted file]
cps-service/src/main/java/org/onap/cps/spi/model/DataNode.java
cps-service/src/main/java/org/onap/cps/spi/model/DataNodeBuilder.java [new file with mode: 0644]
cps-service/src/main/java/org/onap/cps/utils/YangUtils.java
cps-service/src/test/groovy/org/onap/cps/model/DataNodeBuilderSpec.groovy [new file with mode: 0644]
cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy