Add AnnotationSchemaNodeAware interface 81/80681/5
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 5 Mar 2019 09:32:15 +0000 (10:32 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 5 Mar 2019 10:32:40 +0000 (11:32 +0100)
commit366d11917e78439aea6dfe0b1cb5aefc9978158d
treefe4c00577bc56e3f364b20801e94274f2044f420
parent4395031e4e0769ad035c8b6cd69a91ec67930ee4
Add AnnotationSchemaNodeAware interface

It seems that having annotations indexed at the SchemaContext level.
To support that, add AnnotationSchemaNodeAware interface and make it
trivially implemented by SimpleSchemaContext.

Also retrofit AnnotationSchemaNode.find(SchemaContext) to recognize
AnnotationSchemaNodeAware and defer to the index if its available.

JIRA: YANGTOOLS-960
Change-Id: I1f3cd68a8356b20bceb2d0d620992ade10649e5b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/rfc7952-model-api/src/main/java/org/opendaylight/yangtools/rfc7952/model/api/AnnotationSchemaNode.java
yang/rfc7952-model-api/src/main/java/org/opendaylight/yangtools/rfc7952/model/api/AnnotationSchemaNodeAware.java [new file with mode: 0644]
yang/rfc7952-model-api/src/main/java/org/opendaylight/yangtools/rfc7952/model/api/AnnotationSchemaNodeAwareSchemaContext.java [new file with mode: 0644]
yang/yang-model-util/pom.xml
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SimpleSchemaContext.java
yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SimpleSchemaContextTest.java