Package org.omegat.core.search
Class SearchResultEntry
java.lang.Object
org.omegat.core.search.SearchResultEntry
Storage for a search result entry.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSearchResultEntry(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. -
Method Summary
Modifier and TypeMethodDescriptionstatic SearchResultEntry.Builderbuilder()intReturns the number of the corresponding entry within a project.@Nullable StringgetNote()Returns the note text of the corresponding entry within a project.@Nullable SearchMatch[]@Nullable StringReturns information about where this entry comes from.@Nullable String@Nullable SearchMatch[]@Nullable SearchMatch[]@Nullable StringReturns the source text of the corresponding entry within a project.@Nullable SearchMatch[]@Nullable StringReturns the target text of the corresponding entry within a project.voidsetPreamble(String preamble)
-
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 projectpreamble- Information about where this entry comes fromsrc- Source text of the corresponding entry within a projecttarget- Target text of the corresponding entry within a projectnote- 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
Returns information about where this entry comes from. -
setPreamble
-
getSrcText
Returns the source text of the corresponding entry within a project. -
getTranslation
Returns the target text of the corresponding entry within a project. -
getNote
Returns the note text of the corresponding entry within a project. -
getProperties
-
getSrcPrefix
-
getSrcMatch
-
getTargetMatch
-
getNoteMatch
-
getPropertiesMatch
-
builder
-