com.konakart.appif
Interface SnippetOptionsIf

All Known Implementing Classes:
SnippetOptions

public interface SnippetOptionsIf

Used to configure snippets which are text fragments returned by the search engine surrounding the search text.


Method Summary
 int getNumberOfSnippets()
          Number of snippets returned.
 java.lang.String getPostKeywordHighlight()
          The text inserted after the keywords in order to highlight them.
 java.lang.String getPreKeywordHighlight()
          The text inserted before the keywords in order to highlight them.
 int getSnippetSizeInChars()
          The snippet length in characters.
 boolean isEnableSnippets()
          Snippets are enabled when set to true.
 boolean isEscapeHTML()
          Escape and HTML characters in the snippet.
 void setEnableSnippets(boolean enableSnippets)
          Snippets are enabled when set to true.
 void setEscapeHTML(boolean escapeHTML)
          Escape and HTML characters in the snippet.
 void setNumberOfSnippets(int numberOfSnippets)
          Number of snippets returned.
 void setPostKeywordHighlight(java.lang.String postKeywordHighlight)
          The text inserted after the keywords in order to highlight them.
 void setPreKeywordHighlight(java.lang.String preKeywordHighlight)
          The text inserted before the keywords in order to highlight them.
 void setSnippetSizeInChars(int snippetSizeInChars)
          The snippet length in characters.
 

Method Detail

isEnableSnippets

boolean isEnableSnippets()
Snippets are enabled when set to true.

Returns:
the enableSnippets

setEnableSnippets

void setEnableSnippets(boolean enableSnippets)
Snippets are enabled when set to true.

Parameters:
enableSnippets - the enableSnippets to set

getNumberOfSnippets

int getNumberOfSnippets()
Number of snippets returned. The default is 3.

Returns:
the numberOfSnippets

setNumberOfSnippets

void setNumberOfSnippets(int numberOfSnippets)
Number of snippets returned. The default is 3.

Parameters:
numberOfSnippets - the numberOfSnippets to set

getSnippetSizeInChars

int getSnippetSizeInChars()
The snippet length in characters. The default is 100.

Returns:
the snippetSizeInChars

setSnippetSizeInChars

void setSnippetSizeInChars(int snippetSizeInChars)
The snippet length in characters. The default is 100.

Parameters:
snippetSizeInChars - the snippetSizeInChars to set

getPreKeywordHighlight

java.lang.String getPreKeywordHighlight()
The text inserted before the keywords in order to highlight them. Defaults to .

Returns:
the preKeywordHighlight

setPreKeywordHighlight

void setPreKeywordHighlight(java.lang.String preKeywordHighlight)
The text inserted before the keywords in order to highlight them. Defaults to .

Parameters:
preKeywordHighlight - the preKeywordHighlight to set

getPostKeywordHighlight

java.lang.String getPostKeywordHighlight()
The text inserted after the keywords in order to highlight them. Defaults to .

Returns:
the postKeywordHighlight

setPostKeywordHighlight

void setPostKeywordHighlight(java.lang.String postKeywordHighlight)
The text inserted after the keywords in order to highlight them. Defaults to .

Parameters:
postKeywordHighlight - the postKeywordHighlight to set

setEscapeHTML

void setEscapeHTML(boolean escapeHTML)
Escape and HTML characters in the snippet. i.e. "<" becomes "<". Defaults to false.

Parameters:
escapeHTML - the escapeHTML to set

isEscapeHTML

boolean isEscapeHTML()
Escape and HTML characters in the snippet. i.e. "<" becomes "<". Defaults to false.

Returns:
the escapeHTML


Copyright © 2011 DS Data Systems UK Ltd.