Class GlossaryEntry

java.lang.Object
org.omegat.gui.glossary.GlossaryEntry
All Implemented Interfaces:
ITranslationEntry

public class GlossaryEntry extends Object implements ITranslationEntry
An entry in the glossary.
  • Constructor Details

    • GlossaryEntry

      public GlossaryEntry(String src, String[] loc, String[] com, boolean[] fromPriorityGlossary, String[] origins)
    • GlossaryEntry

      public GlossaryEntry(String src, String loc, String com, boolean fromPriorityGlossary, @Nullable String origin)
  • Method Details

    • getSrcText

      public String getSrcText()
    • getSourceText

      public String getSourceText()
      Description copied from interface: ITranslationEntry
      Gets the source text
      Specified by:
      getSourceText in interface ITranslationEntry
    • getTranslationText

      public String getTranslationText()
      Description copied from interface: ITranslationEntry
      Gets translation text
      Specified by:
      getTranslationText in interface ITranslationEntry
    • getLocText

      public String getLocText()
      Return the first target-language term string. Glossary entries can have multiple target strings if they have been combined for display purposes. Access all target strings with getLocTerms(boolean).
      Returns:
      The first target-language term string
    • getLocTerms

      public String[] getLocTerms(boolean uniqueOnly)
      Return each individual target-language term that corresponds to the source term.
      Parameters:
      uniqueOnly - Whether or not to filter duplicates from the list
      Returns:
      All target-language terms
    • getCommentText

      public String getCommentText()
      Return the first comment string. Glossary entries can have multiple comment strings if they have been combined for display purposes. Access all comment strings with getComments().
      Returns:
      The first comment string
    • getComments

      public String[] getComments()
    • getPriority

      public boolean getPriority()
    • getPriorities

      public boolean[] getPriorities()
    • getOrigins

      public String[] getOrigins(boolean uniqueOnly)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object