Class SemanticTagImpl

java.lang.Object
org.openhab.core.semantics.SemanticTagImpl
All Implemented Interfaces:
Identifiable<String>, SemanticTag

@NonNullByDefault public class SemanticTagImpl extends Object implements SemanticTag
This is the main implementing class of the SemanticTag interface.
Author:
Laurent Garnier - Initial contribution
  • Constructor Details

    • SemanticTagImpl

      public SemanticTagImpl(String uid, @Nullable String label, @Nullable String description, @Nullable List<String> synonyms)
    • SemanticTagImpl

      public SemanticTagImpl(String uid, @Nullable String label, @Nullable String description, @Nullable String synonyms)
  • Method Details

    • getUID

      public String getUID()
      Description copied from interface: Identifiable
      Get the unique identifier.
      Specified by:
      getUID in interface Identifiable<String>
      Returns:
      the unique identifier
    • getName

      public String getName()
      Description copied from interface: SemanticTag
      Returns the name of the semantic tag.
      Specified by:
      getName in interface SemanticTag
      Returns:
      the name of the semantic tag
    • getParentUID

      public String getParentUID()
      Description copied from interface: SemanticTag
      Returns the UID of the parent tag.
      Specified by:
      getParentUID in interface SemanticTag
      Returns:
      the UID of the parent tag
    • getLabel

      public String getLabel()
      Description copied from interface: SemanticTag
      Returns the label of the semantic tag.
      Specified by:
      getLabel in interface SemanticTag
      Returns:
      semantic tag label or an empty string if undefined
    • getDescription

      public String getDescription()
      Description copied from interface: SemanticTag
      Returns the description of the semantic tag.
      Specified by:
      getDescription in interface SemanticTag
      Returns:
      semantic tag description or an empty string if undefined
    • getSynonyms

      public List<String> getSynonyms()
      Description copied from interface: SemanticTag
      Returns the synonyms of the semantic tag.
      Specified by:
      getSynonyms in interface SemanticTag
      Returns:
      semantic tag synonyms as a List
    • localized

      public SemanticTag localized(Locale locale)
      Description copied from interface: SemanticTag
      Returns the localized semantic tag.
      Specified by:
      localized in interface SemanticTag
      Parameters:
      locale - the locale to be used
      Returns:
      the localized semantic tag