Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-72

VSE: Populate xpath for fragments (nodes) during parsing of json data

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • None

      Currently the ODL Yang Parser is used to iterator over a yang instance data tree and converted to a simple Fragment POJO ready for insertion in the generic schema Fragment table.

      Each fragment can have a collection of child fragments so starting at the root one can simple reclusively iterate over all the fragments in a data instance tree.

      This user story is to ensure the xpath gets populated (currently it is populated but not correctly) correctly for all instances in the bookstore yang example in cps-service/src/test/resources/bookstore.yang

      xpaths need to be complete ie. include the xpath to the parent

      xpaths will look something like  (need to check with xpath documentation regarding exact syntax)

      • /bookstore/
      • /bookstore/categories[name='SciFi']/
      • /bookstore/categories[name='SciFi']/books[title='Feersum Endjinn']
      • /bookstore/categories[name='SciFi']/books[title='Far Horizons']
      • /bookstore/categories[name='kids']/
      • /bookstore/categories[name='kids']/books[title='he Golden Compass']

      Unfortunately ODL Yang Parser does not provide easy access to the xpaths although the information is available in certain (toString method of) Objects. 

       

      Storing the object in the DB is NOT in scope, that will be done in a separate user story.

       

            rkashapov rkashapov
            ToineSiebelink Toine Siebelink
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: