org.opencms.search.galleries
Class CmsGallerySearchFieldMapping

java.lang.Object
  extended by org.opencms.search.fields.CmsSearchFieldMapping
      extended by org.opencms.search.galleries.CmsGallerySearchFieldMapping

public class CmsGallerySearchFieldMapping
extends CmsSearchFieldMapping

Special search field mapping class for the gallery search.

Since:
8.0.0

Field Summary
static java.lang.String FIELD_ADDITIONAL_INFO
          Name of the field that contains the gallery index additional information.
static java.lang.String FIELD_CONTAINER_TYPES
          Name of the field that contains the gallery index container information.
static java.lang.String FIELD_RESOURCE_DATE_EXPIRED
          Name of the field that contains the date the resource has expired.
static java.lang.String FIELD_RESOURCE_DATE_RELEASED
          Name of the field that contains the date the resource was released.
static java.lang.String FIELD_RESOURCE_LENGTH
          Name of the field that contains the resource length.
static java.lang.String FIELD_RESOURCE_LOCALES
          Name of the field that contains the resource locale.
static java.lang.String FIELD_RESOURCE_STATE
          Name of the field that contains the resource state.
static java.lang.String FIELD_RESOURCE_STRUCTURE_ID
          Name of the field that contains the structure id the resource.
static java.lang.String FIELD_RESOURCE_USER_CREATED
          Name of the field that contains the name of the user who created the resource.
static java.lang.String FIELD_RESOURCE_USER_LASTMODIFIED
          Name of the field that contains the name of the user who last modified the resource.
 
Fields inherited from class org.opencms.search.fields.CmsSearchFieldMapping
DATE_EXPIRED_DEFAULT_STR
 
Constructor Summary
CmsGallerySearchFieldMapping()
          Public constructor for a new search field mapping.
CmsGallerySearchFieldMapping(CmsSearchFieldMappingType type, java.lang.String param)
          Public constructor for a new search field mapping.
 
Method Summary
 java.lang.String getStringValue(CmsObject cms, CmsResource res, I_CmsExtractionResult extractionResult, java.util.List<CmsProperty> properties, java.util.List<CmsProperty> propertiesSearched)
          Returns the String value extracted form the provided data according to the rules of this mapping type.
 
Methods inherited from class org.opencms.search.fields.CmsSearchFieldMapping
equals, getDefaultValue, getParam, getType, hashCode, setDefaultValue, setParam, setType, setType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_ADDITIONAL_INFO

public static final java.lang.String FIELD_ADDITIONAL_INFO
Name of the field that contains the gallery index additional information.

See Also:
Constant Field Values

FIELD_CONTAINER_TYPES

public static final java.lang.String FIELD_CONTAINER_TYPES
Name of the field that contains the gallery index container information.

See Also:
Constant Field Values

FIELD_RESOURCE_DATE_EXPIRED

public static final java.lang.String FIELD_RESOURCE_DATE_EXPIRED
Name of the field that contains the date the resource has expired.

See Also:
Constant Field Values

FIELD_RESOURCE_DATE_RELEASED

public static final java.lang.String FIELD_RESOURCE_DATE_RELEASED
Name of the field that contains the date the resource was released.

See Also:
Constant Field Values

FIELD_RESOURCE_LENGTH

public static final java.lang.String FIELD_RESOURCE_LENGTH
Name of the field that contains the resource length.

See Also:
Constant Field Values

FIELD_RESOURCE_LOCALES

public static final java.lang.String FIELD_RESOURCE_LOCALES
Name of the field that contains the resource locale.

See Also:
Constant Field Values

FIELD_RESOURCE_STATE

public static final java.lang.String FIELD_RESOURCE_STATE
Name of the field that contains the resource state.

See Also:
Constant Field Values

FIELD_RESOURCE_STRUCTURE_ID

public static final java.lang.String FIELD_RESOURCE_STRUCTURE_ID
Name of the field that contains the structure id the resource.

See Also:
Constant Field Values

FIELD_RESOURCE_USER_CREATED

public static final java.lang.String FIELD_RESOURCE_USER_CREATED
Name of the field that contains the name of the user who created the resource.

See Also:
Constant Field Values

FIELD_RESOURCE_USER_LASTMODIFIED

public static final java.lang.String FIELD_RESOURCE_USER_LASTMODIFIED
Name of the field that contains the name of the user who last modified the resource.

See Also:
Constant Field Values
Constructor Detail

CmsGallerySearchFieldMapping

public CmsGallerySearchFieldMapping()
Public constructor for a new search field mapping.


CmsGallerySearchFieldMapping

public CmsGallerySearchFieldMapping(CmsSearchFieldMappingType type,
                                    java.lang.String param)
Public constructor for a new search field mapping.

Parameters:
type - the type to use, see CmsSearchFieldMapping.setType(CmsSearchFieldMappingType)
param - the mapping parameter, see CmsSearchFieldMapping.setParam(String)
Method Detail

getStringValue

public java.lang.String getStringValue(CmsObject cms,
                                       CmsResource res,
                                       I_CmsExtractionResult extractionResult,
                                       java.util.List<CmsProperty> properties,
                                       java.util.List<CmsProperty> propertiesSearched)
Returns the String value extracted form the provided data according to the rules of this mapping type.

Overrides:
getStringValue in class CmsSearchFieldMapping
Parameters:
cms - the OpenCms context used for building the search index
res - the resource that is indexed
extractionResult - the plain text extraction result from the resource
properties - the list of all properties directly attached to the resource (not searched)
propertiesSearched - the list of all searched properties of the resource
Returns:
the String value extracted form the provided data according to the rules of this mapping type