Interface SchemaSourceRepresentation
-
- All Superinterfaces:
Identifiable<SourceIdentifier>
,Immutable
,MutationBehaviour<Immutable>
- All Known Subinterfaces:
YangSchemaSourceRepresentation
,YinSchemaSourceRepresentation
,YinXmlSchemaSource
- All Known Implementing Classes:
IRSchemaSource
,YangTextSchemaSource
,YinDomSchemaSource
,YinTextSchemaSource
@Beta public interface SchemaSourceRepresentation extends Identifiable<SourceIdentifier>, Immutable
Common interface for schema source representations. A schema source is an atomic piece of the overall schema context. In YANG terms, a schema source is semantically equivalent to a single YANG text file, be it a module or a submodule.A schema source can exist in various forms, which we call representations. Again, in YANG terms, each representation is semantically equivalent, but from implementation perspective certain operations on a schema source may require it to be first transformed into a particular representation before they can be applied. Such transformations are affected via instances of SchemaSourceTransformation.
Typical examples of a schema source representation include:
- a
String
- textual representation of source code - a
InputStream
- input stream containing source code - a
ByteSource
- source for input streams containing source code - Parsed abstract syntax tree (AST), which is the result of a syntactic parser
Implementations of this interface expected to comply with the
Immutable
contract.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SourceIdentifier
getIdentifier()
Return this objects Identifier.default Optional<String>
getSymbolicName()
Return the symbolic name, if available.@NonNull Class<? extends SchemaSourceRepresentation>
getType()
Return the concrete representation type.
-
-
-
Method Detail
-
getIdentifier
SourceIdentifier getIdentifier()
Description copied from interface:Identifiable
Return this objects Identifier.- Specified by:
getIdentifier
in interfaceIdentifiable<SourceIdentifier>
- Returns:
- Object's identifier, must not be null.
-
getType
@NonNull Class<? extends SchemaSourceRepresentation> getType()
Return the concrete representation type.- Returns:
- The type of representation.
-
-