com.konakart.app
Class SnippetOptions

java.lang.Object
  extended by com.konakart.app.SnippetOptions
All Implemented Interfaces:
SnippetOptionsIf

public class SnippetOptions
extends java.lang.Object
implements SnippetOptionsIf

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


Constructor Summary
SnippetOptions()
          Constructor
 
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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnippetOptions

public SnippetOptions()
Constructor

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Returns a string containing the attributes of the Product object and those of its Options.

isEnableSnippets

public boolean isEnableSnippets()
Description copied from interface: SnippetOptionsIf
Snippets are enabled when set to true.

Specified by:
isEnableSnippets in interface SnippetOptionsIf
Returns:
the enableSnippets

setEnableSnippets

public void setEnableSnippets(boolean enableSnippets)
Description copied from interface: SnippetOptionsIf
Snippets are enabled when set to true.

Specified by:
setEnableSnippets in interface SnippetOptionsIf
Parameters:
enableSnippets - the enableSnippets to set

getNumberOfSnippets

public int getNumberOfSnippets()
Description copied from interface: SnippetOptionsIf
Number of snippets returned. The default is 3.

Specified by:
getNumberOfSnippets in interface SnippetOptionsIf
Returns:
the numberOfSnippets

setNumberOfSnippets

public void setNumberOfSnippets(int numberOfSnippets)
Description copied from interface: SnippetOptionsIf
Number of snippets returned. The default is 3.

Specified by:
setNumberOfSnippets in interface SnippetOptionsIf
Parameters:
numberOfSnippets - the numberOfSnippets to set

getSnippetSizeInChars

public int getSnippetSizeInChars()
Description copied from interface: SnippetOptionsIf
The snippet length in characters. The default is 100.

Specified by:
getSnippetSizeInChars in interface SnippetOptionsIf
Returns:
the snippetSizeInChars

setSnippetSizeInChars

public void setSnippetSizeInChars(int snippetSizeInChars)
Description copied from interface: SnippetOptionsIf
The snippet length in characters. The default is 100.

Specified by:
setSnippetSizeInChars in interface SnippetOptionsIf
Parameters:
snippetSizeInChars - the snippetSizeInChars to set

getPreKeywordHighlight

public java.lang.String getPreKeywordHighlight()
Description copied from interface: SnippetOptionsIf
The text inserted before the keywords in order to highlight them. Defaults to .

Specified by:
getPreKeywordHighlight in interface SnippetOptionsIf
Returns:
the preKeywordHighlight

setPreKeywordHighlight

public void setPreKeywordHighlight(java.lang.String preKeywordHighlight)
Description copied from interface: SnippetOptionsIf
The text inserted before the keywords in order to highlight them. Defaults to .

Specified by:
setPreKeywordHighlight in interface SnippetOptionsIf
Parameters:
preKeywordHighlight - the preKeywordHighlight to set

getPostKeywordHighlight

public java.lang.String getPostKeywordHighlight()
Description copied from interface: SnippetOptionsIf
The text inserted after the keywords in order to highlight them. Defaults to .

Specified by:
getPostKeywordHighlight in interface SnippetOptionsIf
Returns:
the postKeywordHighlight

setPostKeywordHighlight

public void setPostKeywordHighlight(java.lang.String postKeywordHighlight)
Description copied from interface: SnippetOptionsIf
The text inserted after the keywords in order to highlight them. Defaults to .

Specified by:
setPostKeywordHighlight in interface SnippetOptionsIf
Parameters:
postKeywordHighlight - the postKeywordHighlight to set

setEscapeHTML

public void setEscapeHTML(boolean escapeHTML)
Description copied from interface: SnippetOptionsIf
Escape and HTML characters in the snippet. i.e. "<" becomes "<". Defaults to false.

Specified by:
setEscapeHTML in interface SnippetOptionsIf
Parameters:
escapeHTML - the escapeHTML to set

isEscapeHTML

public boolean isEscapeHTML()
Description copied from interface: SnippetOptionsIf
Escape and HTML characters in the snippet. i.e. "<" becomes "<". Defaults to false.

Specified by:
isEscapeHTML in interface SnippetOptionsIf
Returns:
the escapeHTML


Copyright © 2011 DS Data Systems UK Ltd.