org.opencms.search.galleries
Class CmsGallerySearchResult

java.lang.Object
  extended by org.opencms.search.galleries.CmsGallerySearchResult
All Implemented Interfaces:
java.lang.Comparable<CmsGallerySearchResult>

public class CmsGallerySearchResult
extends java.lang.Object
implements java.lang.Comparable<CmsGallerySearchResult>


Field Summary
protected  java.lang.String m_additonalInfo
          The additional information for the gallery search index.
protected  java.util.List<java.lang.String> m_containerTypes
          The supported container types of this search result.
protected  java.util.Date m_dateCreated
          The creation date of this search result.
protected  java.util.Date m_dateExpired
          The expiration date of this search result.
protected  java.util.Date m_dateLastModified
          The last modification date of this search result.
protected  java.util.Date m_dateReleased
          The release 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  int m_length
          The length of the search result.
protected  java.util.List<java.lang.String> m_locales
          The locales in which the content is available.
protected  java.lang.String m_path
          The resource path of this search result.
protected  java.lang.String m_resourceType
          The resource type of the search result.
protected  int m_score
          The score of this search result.
protected  int m_state
          The state of the search result.
protected  java.lang.String m_structureId
          The structure UUID of the resource.
protected  java.lang.String m_title
          The title of this search result.
protected  java.lang.String m_userCreated
          The user who created the search result resource.
protected  java.lang.String m_userLastModified
          The user who last modified the search result resource.
 
Constructor Summary
CmsGallerySearchResult(int score, org.apache.lucene.document.Document doc, java.lang.String excerpt, java.util.Locale locale)
          Creates a new gallery search result.
 
Method Summary
 int compareTo(CmsGallerySearchResult other)
          Compares two search results based on the score of the result.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAdditonalInfo()
          Returns the additional information stored for this search result in the gallery search index.
 java.util.List<java.lang.String> getContainerTypes()
          Returns the containers supported by this resource.
 java.util.Date getDateCreated()
          Returns the date created.
 java.util.Date getDateExpired()
          Returns the date the resource expires.
 java.util.Date getDateLastModified()
          Returns the date last modified.
 java.util.Date getDateReleased()
          Returns the date the resource is released.
 java.lang.String getDescription()
          Returns the description.
 java.lang.String getExcerpt()
          Returns the excerpt.
 int getLength()
          Returns the length of the resource.
 java.util.List<java.lang.String> getLocales()
          Returns the list of locales this search result is available for.
 java.lang.String getPath()
          Returns the resource root path.
 java.lang.String getResourceType()
          Returns the resource type of the search result document.
 int getScore()
          Returns the Lucene search score for this result.
 int getState()
          Returns the state of the resource.
 java.lang.String getStructureId()
          Returns the structure id of the resource.
 java.lang.String getTitle()
          Returns the title of the resource.
 java.lang.String getUserCreated()
          Returns the name of the user who created the resource.
 java.lang.String getUserLastModified()
          Returns the name of the user who last modified the resource.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_additonalInfo

protected java.lang.String m_additonalInfo
The additional information for the gallery search index.


m_containerTypes

protected java.util.List<java.lang.String> m_containerTypes
The supported container types of this search result.


m_dateCreated

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


m_dateExpired

protected java.util.Date m_dateExpired
The expiration date of this search result.


m_dateLastModified

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


m_dateReleased

protected java.util.Date m_dateReleased
The release 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_length

protected int m_length
The length of the search result.


m_locales

protected java.util.List<java.lang.String> m_locales
The locales in which the content is available.


m_path

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


m_resourceType

protected java.lang.String m_resourceType
The resource type of the search result.


m_score

protected int m_score
The score of this search result.


m_state

protected int m_state
The state of the search result.


m_structureId

protected java.lang.String m_structureId
The structure UUID of the resource.


m_title

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


m_userCreated

protected java.lang.String m_userCreated
The user who created the search result resource.


m_userLastModified

protected java.lang.String m_userLastModified
The user who last modified the search result resource.

Constructor Detail

CmsGallerySearchResult

public CmsGallerySearchResult(int score,
                              org.apache.lucene.document.Document doc,
                              java.lang.String excerpt,
                              java.util.Locale locale)
Creates a new gallery search result.

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

compareTo

public int compareTo(CmsGallerySearchResult other)
Compares two search results based on the score of the result.

Specified by:
compareTo in interface java.lang.Comparable<CmsGallerySearchResult>
Parameters:
other - the result to compare this result with
Returns:
the comparison result
See Also:
Comparable.compareTo(java.lang.Object)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getAdditonalInfo

public java.lang.String getAdditonalInfo()
Returns the additional information stored for this search result in the gallery search index.

Returns:
the additional information stored for this search result in the gallery search index

getContainerTypes

public java.util.List<java.lang.String> getContainerTypes()
Returns the containers supported by this resource.

Returns:
the containers supported by this resource

getDateCreated

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

Returns:
the date created

getDateExpired

public java.util.Date getDateExpired()
Returns the date the resource expires.

Returns:
the date the resource expires
See Also:
CmsResource.getDateExpired()

getDateLastModified

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

Returns:
the date last modified

getDateReleased

public java.util.Date getDateReleased()
Returns the date the resource is released.

Returns:
the date the resource is released
See Also:
CmsResource.getDateReleased()

getDescription

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

Returns:
the description

getExcerpt

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

Returns:
the excerpt

getLength

public int getLength()
Returns the length of the resource.

Returns:
the length of the resource
See Also:
CmsResource.getLength()

getLocales

public java.util.List<java.lang.String> getLocales()
Returns the list of locales this search result is available for.

Returns:
the list of locales this search result is available for

getPath

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

Returns:
the resource root path
See Also:
CmsResource.getRootPath()

getResourceType

public java.lang.String getResourceType()
Returns the resource type of the search result document.

Returns:
the resource type of the search result document
See Also:
CmsResourceManager.getResourceType(String)

getScore

public int getScore()
Returns the Lucene search score for this result.

Returns:
the Lucene search score for this result

getState

public int getState()
Returns the state of the resource.

Returns:
the state of the resource
See Also:
CmsResource.getState()

getStructureId

public java.lang.String getStructureId()
Returns the structure id of the resource.

Returns:
the structure id of the resource

getTitle

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

Returns:
the title of the resource

getUserCreated

public java.lang.String getUserCreated()
Returns the name of the user who created the resource.

Returns:
the name of the user who created the resource
See Also:
CmsResource.getUserCreated()

getUserLastModified

public java.lang.String getUserLastModified()
Returns the name of the user who last modified the resource.

Returns:
the name of the user who last modified the resource
See Also:
CmsResource.getUserLastModified()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()