public class CmsSearchFieldMapping extends java.lang.Object implements I_CmsSearchFieldMapping
构造器和说明 |
---|
CmsSearchFieldMapping()
Public constructor for a new search field mapping.
|
CmsSearchFieldMapping(CmsSearchFieldMappingType type,
java.lang.String param)
Public constructor for a new search field mapping.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
equals(java.lang.Object obj)
Two mappings are equal if the type and the parameter is equal.
|
static java.util.Date |
getDefaultDateExpired()
Returns the default expiration date, meaning the resource never expires.
|
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.
|
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)
public static java.util.Date getDefaultDateExpired() throws java.text.ParseException
java.text.ParseException
- if something goes wrong parsing the default date stringpublic boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object
Object.equals(java.lang.Object)
public java.lang.String getDefaultValue()
I_CmsSearchFieldMapping
getDefaultValue
在接口中 I_CmsSearchFieldMapping
I_CmsSearchFieldMapping.getDefaultValue()
public java.lang.String getParam()
I_CmsSearchFieldMapping
The parameter is used depending on the implementation of the rules of
the selected CmsSearchFieldMappingType
.
getParam
在接口中 I_CmsSearchFieldMapping
I_CmsSearchFieldMapping.getParam()
public java.lang.String getStringValue(CmsObject cms, CmsResource res, I_CmsExtractionResult extractionResult, java.util.List<CmsProperty> properties, java.util.List<CmsProperty> propertiesSearched)
I_CmsSearchFieldMapping
getStringValue
在接口中 I_CmsSearchFieldMapping
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 resourceI_CmsSearchFieldMapping.getStringValue(org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.search.extractors.I_CmsExtractionResult, java.util.List, java.util.List)
public CmsSearchFieldMappingType getType()
I_CmsSearchFieldMapping
getType
在接口中 I_CmsSearchFieldMapping
I_CmsSearchFieldMapping.getType()
public int hashCode()
hashCode
在类中 java.lang.Object
Object.hashCode()
public void setDefaultValue(java.lang.String defaultValue)
I_CmsSearchFieldMapping
setDefaultValue
在接口中 I_CmsSearchFieldMapping
defaultValue
- the default value to setI_CmsSearchFieldMapping.setDefaultValue(java.lang.String)
public void setParam(java.lang.String param)
I_CmsSearchFieldMapping
The parameter is used depending on the implementation of the rules of
the selected CmsSearchFieldMappingType
.
setParam
在接口中 I_CmsSearchFieldMapping
param
- the parameter to setI_CmsSearchFieldMapping.setParam(java.lang.String)
public void setType(CmsSearchFieldMappingType type)
I_CmsSearchFieldMapping
setType
在接口中 I_CmsSearchFieldMapping
type
- the type to setI_CmsSearchFieldMapping.setType(org.opencms.search.fields.CmsSearchFieldMappingType)
public void setType(java.lang.String type)
I_CmsSearchFieldMapping
setType
在接口中 I_CmsSearchFieldMapping
type
- the name of the type to setI_CmsSearchFieldMapping.setType(java.lang.String)