info.magnolia.module.templatingkit.search
Class SearchResultItem

java.lang.Object
  extended by info.magnolia.module.templatingkit.search.SearchResultItem

public class SearchResultItem
extends Object

Search Result Item Bean implementation. Used by STK SearchResultModel. FIXME: Should be refactored to use only Node and Property. Missing core implementation: Utility to get a collection of filtered properties (Primitive and Binary) of a Node and Node Chield. See DefaultContent .getNodeDataCollection() .getChildren()

Version:
$Id$
Author:
tmiyar

Field Summary
protected  int chars
          Number of chars to include in result.
protected  int maxSnippets
          Maximum number of snippets to include in result.
protected  String query
           
 
Constructor Summary
SearchResultItem(javax.jcr.Node node, String query, String title, String author, String category, Calendar date, String link)
           
SearchResultItem(javax.jcr.Node node, String query, info.magnolia.templating.functions.TemplatingFunctions templatingFunctions)
          FIXME usage of deprecated classes: ContentUtil.
 
Method Summary
 String getAuthor()
           
 String getCategory()
           
 Calendar getDate()
           
 String getFormattedText()
          Deprecated. since stk1.1
 String getLink()
           
 int getMaxSnippets()
           
 javax.jcr.Node getNode()
           
 String getSnippets()
           
 String getText()
           
 String getTitle()
           
protected  void highlightSnippet(List<String> snippetList, info.magnolia.cms.core.NodeData property)
           
protected  boolean processNodeDatas(int numberOfSnippets, StringBuffer snippets, info.magnolia.cms.core.Content paragraph)
          FIXME usage of deprecated classes: ContentUtil.
 void setMaxSnippets(int maxSnippets)
           
protected  boolean skipProperty(String name, String resultString, String searchTerm)
           
protected  String stripHtmlTags(String resultString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chars

protected int chars
Number of chars to include in result.


maxSnippets

protected int maxSnippets
Maximum number of snippets to include in result.


query

protected String query
Constructor Detail

SearchResultItem

public SearchResultItem(javax.jcr.Node node,
                        String query,
                        info.magnolia.templating.functions.TemplatingFunctions templatingFunctions)
FIXME usage of deprecated classes: ContentUtil. To remove when core has implemented I18nContentSupport for Node


SearchResultItem

public SearchResultItem(javax.jcr.Node node,
                        String query,
                        String title,
                        String author,
                        String category,
                        Calendar date,
                        String link)
Method Detail

getDate

public Calendar getDate()

getAuthor

public String getAuthor()

getCategory

public String getCategory()

getTitle

public String getTitle()

getText

public String getText()

getFormattedText

public String getFormattedText()
Deprecated. since stk1.1


getLink

public String getLink()

getNode

public javax.jcr.Node getNode()

getSnippets

public String getSnippets()

getMaxSnippets

public int getMaxSnippets()

setMaxSnippets

public void setMaxSnippets(int maxSnippets)

processNodeDatas

protected boolean processNodeDatas(int numberOfSnippets,
                                   StringBuffer snippets,
                                   info.magnolia.cms.core.Content paragraph)
FIXME usage of deprecated classes: ContentUtil. To remove when core has implemented getNodeDataCollection() for Node


highlightSnippet

protected void highlightSnippet(List<String> snippetList,
                                info.magnolia.cms.core.NodeData property)

skipProperty

protected boolean skipProperty(String name,
                               String resultString,
                               String searchTerm)

stripHtmlTags

protected String stripHtmlTags(String resultString)


Copyright © 2008-2012 Magnolia International Ltd.. All Rights Reserved.