Package org.eclipse.ditto.things.model
Interface DefinitionIdentifier
- All Superinterfaces:
CharSequence
- All Known Subinterfaces:
ThingDefinition
This interface represents a single fully qualified Identifier of a
Definition both used for
Thing and Feature.-
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns the name of this Identifier.Returns the namespace of ths Identifier.getUrl()Returns the optional URL of this Identifier - if this is present, thenamespace,nameandversionstrings of the definition are empty.Returns the version of this Identifier.toString()Returns the string representation of this Identifier with the following structure: either"namespace:name:version"or"http(s)://some.url:80/some/resource.json"Methods inherited from interface java.lang.CharSequence
charAt, chars, codePoints, isEmpty, length, subSequence
-
Method Details
-
getNamespace
String getNamespace()Returns the namespace of ths Identifier. Might be an empty string when the Identifier contains anurlinstead.- Returns:
- the namespace.
-
getName
String getName()Returns the name of this Identifier. Might be an empty string when the Identifier contains anurlinstead.- Returns:
- the name.
-
getVersion
String getVersion()Returns the version of this Identifier. Might be an empty string when the Identifier contains anurlinstead.- Returns:
- the version.
-
getUrl
Returns the optional URL of this Identifier - if this is present, thenamespace,nameandversionstrings of the definition are empty.- Returns:
- the optional URL.
- Since:
- 2.1.0
-
toString
String toString()Returns the string representation of this Identifier with the following structure:- either
"namespace:name:version" - or
"http(s)://some.url:80/some/resource.json"
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject- Returns:
- the string representation.
- either
-