Add SchemaSourceInfo 76/109576/32
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 2 Jan 2024 19:01:02 +0000 (20:01 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 3 Jan 2024 18:02:49 +0000 (19:02 +0100)
commit1934f55785e33415d45ea7e328f1a71c63313168
treefefedfa80eb3f2ee10a88b2d021fdb4eec123a70
parent5b40348bf837d13117c3b96ebb40d008f529a108
Add SchemaSourceInfo

We typically need to organize SchemaSourceRepresentations in some way
and make consistency inferences against their linkage.

The RFCSs do not specifically call this out, but the information is kept
at the top of the YANG file, so that even a simple text parser can find
it quickly.

Our YANG text processing pipeline has this information available
whenever we need to build a YangModelDependencyInfo -- which is an
optional operation, but the implementation only needs IRSchemaSource.

This patch introduces SchemaSourceInfo, which is a RFC-based opinionated
version YangModelDependencyInfo.

JIRA: YANGTOOLS-1150
Change-Id: I5043f2be3138c6cf599cb8ca29c5bfb0c829625e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
model/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/source/ModuleSourceInfo.java [new file with mode: 0644]
model/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/source/SourceInfo.java [new file with mode: 0644]
model/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/source/SubmoduleSourceInfo.java [new file with mode: 0644]