@Beta public final class RevisionSourceIdentifier extends SourceIdentifier
Simple transfer object represents revision identifier of source for YANG schema (module or submodule), which consists of
SourceIdentifier.getName()
SourceIdentifier.getRevision())
Revision source identifier is designated to be carry only necessary information to look-up YANG model source and to be used by various SchemaSourceProviders.
Note:On source retrieval layer it is impossible to distinguish between YANG module and/or submodule unless source is present.
(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 |
|---|---|
static RevisionSourceIdentifier |
create(String moduleName)
Creates new YANG Schema revision source identifier for sources without
a revision.
|
static RevisionSourceIdentifier |
create(String moduleName,
Optional<Revision> revision)
Creates new YANG Schema revision source identifier.
|
static RevisionSourceIdentifier |
create(String moduleName,
Revision revision)
Creates new YANG Schema revision source identifier.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString() |
getName, getRevision, intern, toYangFilename, toYangFileNamepublic static RevisionSourceIdentifier create(String moduleName, Optional<Revision> revision)
moduleName - Name of schemarevision - Revision of source in format YYYY-mm-dd. If not present,
default value will be used.public static RevisionSourceIdentifier create(String moduleName, @Nullable Revision revision)
moduleName - Name of schemarevision - Revision of source, may be nullpublic static RevisionSourceIdentifier create(String moduleName)
moduleName - Name of schemapublic int hashCode()
hashCode in interface IdentifierhashCode in class Objectpublic boolean equals(Object obj)
equals in interface Identifierequals in class Objectpublic String toString()
toString in interface IdentifiertoString in class ObjectCopyright © 2019 OpenDaylight. All rights reserved.