Class SearchResultEntry

java.lang.Object
org.omegat.core.search.SearchResultEntry

public class SearchResultEntry extends Object
Storage for a search result entry.
  • Constructor Details

    • SearchResultEntry

      public SearchResultEntry(int num, @Nullable String preamble, @Nullable String srcPrefix, String src, @Nullable String target, @Nullable String note, @Nullable String properties, @Nullable SearchMatch[] srcMatch, @Nullable SearchMatch[] targetMatch, @Nullable SearchMatch[] noteMatch, @Nullable SearchMatch[] propertiesMatch)
      Creates a new search result entry with properties set to given values.
      Parameters:
      num - Number of the corresponding entry within a project
      preamble - Information about where this entry comes from
      src - Source text of the corresponding entry within a project
      target - Target text of the corresponding entry within a project
      note - Note text of the corresponding entry within a project
  • Method Details

    • getEntryNum

      public int getEntryNum()
      Returns the number of the corresponding entry within a project. The returned value is > 0 if the entry belongs to one of the source files of the project; it is -1 if the entry doesn't belong to any of the source files (the entry is stored in the TM or we are searching in a given directory)
    • getPreamble

      public @Nullable String getPreamble()
      Returns information about where this entry comes from.
    • setPreamble

      public void setPreamble(String preamble)
    • getSrcText

      public String getSrcText()
      Returns the source text of the corresponding entry within a project.
    • getTranslation

      public @Nullable String getTranslation()
      Returns the target text of the corresponding entry within a project.
    • getNote

      public @Nullable String getNote()
      Returns the note text of the corresponding entry within a project.
    • getProperties

      public @Nullable String getProperties()
    • getSrcPrefix

      public @Nullable String getSrcPrefix()
    • getSrcMatch

      public @Nullable SearchMatch[] getSrcMatch()
    • getTargetMatch

      public @Nullable SearchMatch[] getTargetMatch()
    • getNoteMatch

      public @Nullable SearchMatch[] getNoteMatch()
    • getPropertiesMatch

      public @Nullable SearchMatch[] getPropertiesMatch()
    • builder

      public static SearchResultEntry.Builder builder()