|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.search.galleries.CmsGallerySearchResult
public class CmsGallerySearchResult
| Field Summary | |
|---|---|
static org.apache.commons.logging.Log |
LOG
The logger instance for this class. |
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(CmsObject cms,
CmsResource res)
Creates a fake gallery search result by reading the necessary data from a VFS resource. |
|
CmsGallerySearchResult(CmsObject cms,
int score,
org.apache.lucene.document.Document doc,
java.lang.String excerpt,
java.util.Locale locale)
Creates a new gallery search result. |
|
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()
|
protected void |
initializeMissingFieldsFromVfs(CmsObject cms,
CmsUUID structureId)
Initializes missing fields by reading the information from the VFS. |
boolean |
isReleaseAndNotExpired(CmsObject cms)
Returns if the related resource is released and not expired. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log LOG
protected java.lang.String m_additonalInfo
protected java.util.List<java.lang.String> m_containerTypes
protected java.util.Date m_dateCreated
protected java.util.Date m_dateExpired
protected java.util.Date m_dateLastModified
protected java.util.Date m_dateReleased
protected java.lang.String m_description
protected java.lang.String m_excerpt
protected int m_length
protected java.util.List<java.lang.String> m_locales
protected java.lang.String m_path
protected java.lang.String m_resourceType
protected int m_score
protected int m_state
protected java.lang.String m_structureId
protected java.lang.String m_title
protected java.lang.String m_userCreated
protected java.lang.String m_userLastModified
| Constructor Detail |
|---|
public CmsGallerySearchResult(CmsObject cms,
CmsResource res)
cms - the current CMS contextres - the resource from which the data should be read
public CmsGallerySearchResult(CmsObject cms,
int score,
org.apache.lucene.document.Document doc,
java.lang.String excerpt,
java.util.Locale locale)
cms - the current CMS context (used for reading information missing from the index)score - the score of this search resultdoc - the Lucene document to extract fields from such as description, title, key words etc. pp.excerpt - the excerpt of the search result's contentlocale - the locale to create the result for
public CmsGallerySearchResult(int score,
org.apache.lucene.document.Document doc,
java.lang.String excerpt,
java.util.Locale locale)
score - the score of this search resultdoc - the Lucene document to extract fields from such as description, title, key words etc. pp.excerpt - the excerpt of the search result's contentlocale - the locale to create the result for| Method Detail |
|---|
public int compareTo(CmsGallerySearchResult other)
compareTo in interface java.lang.Comparable<CmsGallerySearchResult>other - the result to compare this result with
Comparable.compareTo(java.lang.Object)public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public java.lang.String getAdditonalInfo()
public java.util.List<java.lang.String> getContainerTypes()
public java.util.Date getDateCreated()
public java.util.Date getDateExpired()
CmsResource.getDateExpired()public java.util.Date getDateLastModified()
public java.util.Date getDateReleased()
CmsResource.getDateReleased()public java.lang.String getDescription()
public java.lang.String getExcerpt()
public int getLength()
CmsResource.getLength()public java.util.List<java.lang.String> getLocales()
public java.lang.String getPath()
CmsResource.getRootPath()public java.lang.String getResourceType()
CmsResourceManager.getResourceType(String)public int getScore()
public int getState()
CmsResource.getState()public java.lang.String getStructureId()
public java.lang.String getTitle()
public java.lang.String getUserCreated()
CmsResource.getUserCreated()public java.lang.String getUserLastModified()
CmsResource.getUserLastModified()public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean isReleaseAndNotExpired(CmsObject cms)
cms - the cms context
true if the related resource is released and not expired
protected void initializeMissingFieldsFromVfs(CmsObject cms,
CmsUUID structureId)
cms - the current CMS contextstructureId - the current structure id
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||