@Beta public abstract class SourceIdentifier extends Object implements Identifier, Immutable
Source identifiers are designated to be carry only necessary information to look-up YANG model source and to be used by various SchemaSourceProviders.
(For further reference see: http://tools.ietf.org/html/rfc6020#section-5.2 and http://tools.ietf.org/html/rfc6022#section-3.1 ).
Modifier and Type | Method and Description |
---|---|
@NonNull String |
getName()
Returns model name.
|
Optional<Revision> |
getRevision()
Returns revision of source or null if revision was not supplied.
|
@NonNull SourceIdentifier |
intern()
Return an interned reference to a equivalent SemVerSourceIdentifier.
|
@NonNull String |
toYangFilename()
Returns filename for this YANG module as specified in RFC 6020.
|
static @NonNull String |
toYangFileName(String moduleName,
Optional<Revision> revision)
Returns filename for this YANG module as specified in RFC 6020.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, toString
public @NonNull SourceIdentifier intern()
public @NonNull String getName()
public Optional<Revision> getRevision()
public @NonNull String toYangFilename()
Returns filename in format name ['@' revision] '.yang'
, where revision is date in format YYYY-mm-dd.
public static @NonNull String toYangFileName(String moduleName, Optional<Revision> revision)
Returns filename in format moduleName ['@' revision] '.yang'
,
where Where revision-date is in format YYYY-mm-dd.
See http://tools.ietf.org/html/rfc6020#section-5.2
Copyright © 2019 OpenDaylight. All rights reserved.