org.opencms.search
Class CmsSearchResult

java.lang.Object
  extended byorg.opencms.search.CmsSearchResult
All Implemented Interfaces:
java.lang.Comparable, I_CmsMemoryMonitorable

public class CmsSearchResult
extends java.lang.Object
implements I_CmsMemoryMonitorable, java.lang.Comparable

Contains the data of a single item in a search result.

Since:
6.0.0
Version:
$Revision: 1.20 $
Author:
Thomas Weckert

Field Summary
protected  java.util.Date m_dateCreated
          The creation date of this search result.
protected  java.util.Date m_dateLastModified
          The last modification date of this search result.
protected  java.lang.String m_description
          The description of this search result.
protected  java.lang.String m_excerpt
          The excerpt of this search result.
protected  java.lang.String m_keyWords
          The key words of this search result.
protected  java.lang.String m_path
          The resource path of this search result.
protected  int m_score
          The score of this search result.
protected  java.lang.String m_title
          The title of this search result.
 
Constructor Summary
protected CmsSearchResult(int score, org.apache.lucene.document.Document luceneDocument, java.lang.String excerpt)
          Creates a new search result.
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 java.util.Date getDateCreated()
          Returns the date created.
 java.util.Date getDateLastModified()
          Returns the date last modified.
 java.lang.String getDescription()
          Returns the description.
 java.lang.String getExcerpt()
          Returns the excerpt.
 java.lang.String getKeywords()
          Returns the key words.
 int getMemorySize()
          Returns the memory size of the object.
 java.lang.String getPath()
          Returns the path.
 int getScore()
          Returns the score.
 java.lang.String getTitle()
          Returns the title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_dateCreated

protected java.util.Date m_dateCreated
The creation date of this search result.


m_dateLastModified

protected java.util.Date m_dateLastModified
The last modification date of this search result.


m_description

protected java.lang.String m_description
The description of this search result.


m_excerpt

protected java.lang.String m_excerpt
The excerpt of this search result.


m_keyWords

protected java.lang.String m_keyWords
The key words of this search result.


m_path

protected java.lang.String m_path
The resource path of this search result.


m_score

protected int m_score
The score of this search result.


m_title

protected java.lang.String m_title
The title of this search result.

Constructor Detail

CmsSearchResult

protected CmsSearchResult(int score,
                          org.apache.lucene.document.Document luceneDocument,
                          java.lang.String excerpt)
Creates a new search result.

Parameters:
score - the score of this search result
luceneDocument - the Lucene document to extract fields from such as description, title, key words etc. pp.
excerpt - the excerpt of the search result's content
Method Detail

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable
See Also:
Comparable.compareTo(java.lang.Object)

getDateCreated

public java.util.Date getDateCreated()
Returns the date created.

Returns:
the date created

getDateLastModified

public java.util.Date getDateLastModified()
Returns the date last modified.

Returns:
the date last modified

getDescription

public java.lang.String getDescription()
Returns the description.

Returns:
the description

getExcerpt

public java.lang.String getExcerpt()
Returns the excerpt.

Returns:
the excerpt

getKeywords

public java.lang.String getKeywords()
Returns the key words.

Returns:
the key words

getMemorySize

public int getMemorySize()
Description copied from interface: I_CmsMemoryMonitorable
Returns the memory size of the object.

Specified by:
getMemorySize in interface I_CmsMemoryMonitorable
Returns:
the memory size of the object
See Also:
I_CmsMemoryMonitorable.getMemorySize()

getPath

public java.lang.String getPath()
Returns the path.

Returns:
the path

getScore

public int getScore()
Returns the score.

Returns:
the score

getTitle

public java.lang.String getTitle()
Returns the title.

Returns:
the title