Package org.opendaylight.yangtools.yang.model.api.meta
@Export
package org.opendaylight.yangtools.yang.model.api.meta
Meta model of YANG model as was defined in RFC6020 and extracted by analysis
of YANG text.
Existence of meta-model allows for better evolution of YANG language as it evolves and allows for better support of different serializations of YANG model.
Statements
YANG source is defined as sequence of statement in RFC6020, Section 6.3. this model is also correct for YIN, which is XML serialisation of YANG source.
Statements are represented as instances / subclasses of
ModelStatement
concept and its two subconcepts which are:
-
DeclaredStatement
- this contains navigable set of statements model as they was defined / present in original processed sources. EffectiveStatement
- navigable set of statements which represents effective model of parsed YANG sources, which is derived by rules present in YANG specification and/or was introduced in form of extensions.
Clear separation of declared / effective model is needed, since statement definition also
contains information how effective model is computed and there is no one to one mapping
between declared and effective model thanks to statements such as uses
,
augment
,deviate
,refine
.
Identifiers and Namespaces
Effective model of YANG has several identifier types and namespaces, which behaves differently and are mostly used during data processing and transformation. Namespaces are typically exposed as a pair of methods in an appropriateSomethingAwareEffectiveStatement
-- one for enumeration and one for lookups.-
ClassDescriptionAbstract base class for
DeclaredStatement
implementations.AbstractEffectiveStatement<A,D extends DeclaredStatement<A>> Abstract base class forEffectiveStatement
implementations.Abstract utility class to handle StatementArgumentDefinition aspect ofStatementDefinition
.Definition of an argument to a YANG statement.ADeclarationReference
to something which resembles file.ADeclarationReference
to a position within a some text document.Reference to a statement declaration.Represents declared statement.DefaultStatementDefinition<A,D extends DeclaredStatement<A>, E extends EffectiveStatement<A, D>> Default implementation of theStatementDefinition
contract.EffectiveStatement<A,D extends DeclaredStatement<A>> Effective model statement which should be used to derive application behaviour.Model statement.AStatementSourceReference
which acts as its ownDeclarationReference
, i.e.AStatementDeclaration
which acts as its ownDeclarationInText
.AStatementDeclaration.InText
which acts as its ownDeclarationInFile
.Definition / model of YANGDeclaredStatement
andEffectiveStatement
.Enumeration of possible origins of a statement.An exception identifying a problem detected at a particular YANG statement.Reference of statement source.