public class CmsGallerySearchResult extends java.lang.Object implements java.lang.Comparable<CmsGallerySearchResult>
限定符和类型 | 字段和说明 |
---|---|
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.
|
构造器和说明 |
---|
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.
|
限定符和类型 | 方法和说明 |
---|---|
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.
|
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
public CmsGallerySearchResult(CmsObject cms, CmsResource res)
cms
- the current CMS contextres
- the resource from which the data should be readpublic 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 forpublic 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 forpublic int compareTo(CmsGallerySearchResult other)
compareTo
在接口中 java.lang.Comparable<CmsGallerySearchResult>
other
- the result to compare this result withComparable.compareTo(java.lang.Object)
public boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object
Object.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()
org.opencms.file.CmsResource#getDateExpired()
public java.util.Date getDateLastModified()
public java.util.Date getDateReleased()
org.opencms.file.CmsResource#getDateReleased()
public java.lang.String getDescription()
public java.lang.String getExcerpt()
public int getLength()
org.opencms.file.CmsResource#getLength()
public java.util.List<java.lang.String> getLocales()
public java.lang.String getPath()
org.opencms.file.CmsResource#getRootPath()
public java.lang.String getResourceType()
CmsResourceManager.getResourceType(String)
public int getScore()
public int getState()
org.opencms.file.CmsResource#getState()
public java.lang.String getStructureId()
public java.lang.String getTitle()
public java.lang.String getUserCreated()
org.opencms.file.CmsResource#getUserCreated()
public java.lang.String getUserLastModified()
org.opencms.file.CmsResource#getUserLastModified()
public int hashCode()
hashCode
在类中 java.lang.Object
Object.hashCode()
public boolean isReleaseAndNotExpired(CmsObject cms)
cms
- the cms contexttrue
if the related resource is released and not expired