Interface DefinitionIdentifier

All Superinterfaces:
CharSequence
All Known Subinterfaces:
ThingDefinition

public interface DefinitionIdentifier extends CharSequence
This interface represents a single fully qualified Identifier of a Definition both used for Thing and Feature.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of this Identifier.
    Returns the namespace of ths Identifier.
    Returns the optional URL of this Identifier - if this is present, the namespace, name and version strings of the definition are empty.
    Returns the version of this Identifier.
    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 an url instead.
      Returns:
      the namespace.
    • getName

      String getName()
      Returns the name of this Identifier. Might be an empty string when the Identifier contains an url instead.
      Returns:
      the name.
    • getVersion

      String getVersion()
      Returns the version of this Identifier. Might be an empty string when the Identifier contains an url instead.
      Returns:
      the version.
    • getUrl

      Optional<URL> getUrl()
      Returns the optional URL of this Identifier - if this is present, the namespace, name and version strings 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:
      toString in interface CharSequence
      Overrides:
      toString in class Object
      Returns:
      the string representation.