Add rfc8040.ApiPath 03/97503/34
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 16 Sep 2021 02:09:00 +0000 (04:09 +0200)
committerTomas Cere <tomas.cere@pantheon.tech>
Wed, 6 Oct 2021 11:53:12 +0000 (11:53 +0000)
commitd6609539cb860c2a617651389ee795ab4ca7cba6
treeb43c2792bdba496803648e51e89979b5d994a57e
parent4ce087c00ded24533b40629c6ee9ced42e4a5e07
Add rfc8040.ApiPath

Our YangInstanceIdentifierSerializer is a rather complex piece of
machinery, which is a maintenance burden and cannot be modified easily.

In order to deal with it, we will split parsing into two steps:

1) structural tokenization, which splits the input string into a
   representation of 'api-path' ABNF producation.

2) semantic binding to an EffectiveModelContext, which reconciles the
   structure with the context, producing YangInstanceIdentifier in the
   process.

This patch deals with item 1) by introducing an ApiPath class, which
can be constructed from a string.

JIRA: NETCONF-631
Change-Id: I44c8ad1308b27ee459f95f8617f54c8537ea9c65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb-rfc8040/pom.xml
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/ApiPath.java [new file with mode: 0644]
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/ApiPathParser.java [new file with mode: 0644]
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/Utf8Buffer.java [new file with mode: 0644]
restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/ApiPathTest.java [new file with mode: 0644]