|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.opencms.search.fields.CmsSearchFieldMapping
public class CmsSearchFieldMapping
Describes a mapping of a piece of content from an OpenCms VFS resource to a field of a search index.
| Constructor Summary | |
|---|---|
CmsSearchFieldMapping()
Public constructor for a new search field mapping. |
|
CmsSearchFieldMapping(CmsSearchFieldMappingType type,
java.lang.String param)
Public constructor for a new search field mapping. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Two mappings are equal if the type and the parameter is equal. |
java.lang.String |
getDefaultValue()
Returns the default value used for this field mapping in case no content is available. |
java.lang.String |
getParam()
Returns the mapping parameter. |
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. |
CmsSearchFieldMappingType |
getType()
Returns the mapping type. |
int |
hashCode()
The hash code depends on the type and the parameter. |
void |
setDefaultValue(java.lang.String defaultValue)
Sets the default value for this field mapping in case no content is available. |
void |
setParam(java.lang.String param)
Sets the mapping parameter. |
void |
setType(CmsSearchFieldMappingType type)
Sets the mapping type. |
void |
setType(java.lang.String type)
Sets the mapping type as a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CmsSearchFieldMapping()
public CmsSearchFieldMapping(CmsSearchFieldMappingType type,
java.lang.String param)
type - the type to use, see setType(CmsSearchFieldMappingType)param - the mapping parameter, see setParam(String)| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public java.lang.String getDefaultValue()
public java.lang.String getParam()
The parameter is used depending on the implementation of the rules of
the selected CmsSearchFieldMappingType.
public java.lang.String getStringValue(CmsObject cms,
CmsResource res,
I_CmsExtractionResult extractionResult,
java.util.List<CmsProperty> properties,
java.util.List<CmsProperty> propertiesSearched)
cms - the OpenCms context used for building the search indexres - the resource that is indexedextractionResult - the plain text extraction result from the resourceproperties - the list of all properties directly attached to the resource (not searched)propertiesSearched - the list of all searched properties of the resource
public CmsSearchFieldMappingType getType()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public void setDefaultValue(java.lang.String defaultValue)
defaultValue - the default value to setpublic void setParam(java.lang.String param)
The parameter is used depending on the implementation of the rules of
the selected CmsSearchFieldMappingType.
param - the parameter to setpublic void setType(CmsSearchFieldMappingType type)
type - the type to setpublic void setType(java.lang.String type)
type - the name of the type to set
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||