org.opencms.search
Class A_CmsIndexResource

java.lang.Object
  extended byorg.opencms.search.A_CmsIndexResource
Direct Known Subclasses:
CmsVfsIndexResource

public abstract class A_CmsIndexResource
extends java.lang.Object

An index resource is a wrapper class that contains the data of a Cms resource specified by a Lucene search result document.

Since:
6.0.0
Version:
$Revision: 1.11 $
Author:
Carsten Weinholz, Thomas Weckert

Field Summary
protected  java.lang.Object m_data
          Concrete data object.
protected  CmsUUID m_id
          Id of the object.
protected  java.lang.String m_mimeType
          Mimetype of the object, null if the object is a CmsMasterDataSet.
protected  java.lang.String m_name
          Name of the object.
protected  java.lang.String m_path
          Path to access the object.
protected  int m_type
          Type of the object.
 
Constructor Summary
A_CmsIndexResource()
           
 
Method Summary
 java.lang.Object getData()
          Returns the wrapped data object.
abstract  java.lang.String getDocumentKey(boolean withMimeType)
          Returns the document key for the search manager.
 CmsUUID getId()
          Returns the id of the wrapped object.
 java.lang.String getMimetype()
          Returns the mimetype of the wrapped object.
 java.lang.String getName()
          Returns the name of the wrapped object.
 java.lang.String getRootPath()
          Returns the access path of the wrapped object.
 int getType()
          Returns the type of the wrapped object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_data

protected java.lang.Object m_data
Concrete data object.


m_id

protected CmsUUID m_id
Id of the object.


m_mimeType

protected java.lang.String m_mimeType
Mimetype of the object, null if the object is a CmsMasterDataSet.


m_name

protected java.lang.String m_name
Name of the object.


m_path

protected java.lang.String m_path
Path to access the object.


m_type

protected int m_type
Type of the object.

Constructor Detail

A_CmsIndexResource

public A_CmsIndexResource()
Method Detail

getData

public java.lang.Object getData()
Returns the wrapped data object.

The concrete type of the data object is either CmsResource or CmsMasterDataSet

Returns:
the wrapped data object

getDocumentKey

public abstract java.lang.String getDocumentKey(boolean withMimeType)
Returns the document key for the search manager.

Parameters:
withMimeType - true if the mime type should be included in the key
Returns:
the document key for the search manager

getId

public CmsUUID getId()
Returns the id of the wrapped object.

Returns:
the id

getMimetype

public java.lang.String getMimetype()
Returns the mimetype of the wrapped object.

Returns:
the mimetype of the wrapped object or null

getName

public java.lang.String getName()
Returns the name of the wrapped object.

Returns:
the name of the wrapped object

getRootPath

public java.lang.String getRootPath()
Returns the access path of the wrapped object.

Returns:
the access path of the wrapped object

getType

public int getType()
Returns the type of the wrapped object.

The type is either the type of the wrapped CmsResource or the SubId of the CmsMasterDataSet.

Returns:
the type of the wrapped object