com.konakart.json.app
Class J_SnippetOptions

java.lang.Object
  extended by com.konakart.json.app.J_SnippetOptions
All Implemented Interfaces:
java.io.Serializable

public class J_SnippetOptions
extends java.lang.Object
implements java.io.Serializable

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

See Also:
Serialized Form

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

Constructor Detail

J_SnippetOptions

public J_SnippetOptions()
Method Detail

isEnableSnippets

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

Returns:
the enableSnippets

setEnableSnippets

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

Parameters:
_enableSnippets - the enableSnippets to set

getNumberOfSnippets

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

Returns:
the numberOfSnippets

setNumberOfSnippets

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

Parameters:
_numberOfSnippets - the numberOfSnippets to set

getSnippetSizeInChars

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

Returns:
the snippetSizeInChars

setSnippetSizeInChars

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

Parameters:
_snippetSizeInChars - the snippetSizeInChars to set

getPreKeywordHighlight

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

Returns:
the preKeywordHighlight

setPreKeywordHighlight

public 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

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

Returns:
the postKeywordHighlight

setPostKeywordHighlight

public 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

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

Parameters:
_escapeHTML - the escapeHTML to set

isEscapeHTML

public 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.