Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-1463

YangTextSchemaContextResolver needs to we aware of supported features

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: High High
    • 11.0.0, 10.0.5
    • None
    • parser

      YangTextSchemaContextResolver does not currently provide a way to affect which features are supported – the effective model always supports all features.

      Add the ability to select features used in building the effective model, which will work in an additive way with backwards compatibility. Specifically expose a new method,

      public final class YangTextSchemaContextResolver {
        public @NonNull Registration registerSupportedFeatures(QNameModule module, Set<QName> features) {
          // ...
        }
      }
      

      The mechanics should work like this:

      • when there are no features registered, 'null' should be passed to the parser
      • if there is any module registered, a specialized implementation of Set<QName> is passed to the parser, which evaluates contains(Object) on the set of registered modules – if the module is not mentioned if a registerSupportedFeatures() call, it should report as true, if it is mention, it should report true only if the feature is also enumerated in the passed Set.

            matusmatok Matúš Matok
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: