@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 @NonNull RevisionSourceIdentifier |
create(String moduleName)
Creates new YANG Schema revision source identifier for sources without
a revision.
|
static @NonNull RevisionSourceIdentifier |
create(String moduleName,
Optional<Revision> revision)
Creates new YANG Schema revision source identifier.
|
static @NonNull RevisionSourceIdentifier |
create(String moduleName,
@Nullable Revision revision)
Creates new YANG Schema revision source identifier.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString() |
getName, getRevision, intern, toYangFilename, toYangFileName
public static @NonNull 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 @NonNull RevisionSourceIdentifier create(String moduleName, @Nullable Revision revision)
moduleName
- Name of schemarevision
- Revision of source, may be nullpublic static @NonNull RevisionSourceIdentifier create(String moduleName)
moduleName
- Name of schemapublic int hashCode()
hashCode
in interface Identifier
hashCode
in class Object
public boolean equals(Object obj)
equals
in interface Identifier
equals
in class Object
public String toString()
toString
in interface Identifier
toString
in class Object
Copyright © 2019 OpenDaylight. All rights reserved.