Package org.opencms.search.fields
Class CmsGeoCoordinateFieldMapping
java.lang.Object
org.opencms.search.fields.CmsGeoCoordinateFieldMapping
- All Implemented Interfaces:
Serializable,I_CmsSearchFieldMapping
Class extracting the Geo coordinates from a content field.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum recursion depth for following links. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the default value used for this field mapping in case no content is available.getParam()Returns the mapping parameter.getStringValue(int depth, CmsGeoMappingConfiguration mappingConfig, CmsObject cms, CmsResource res, I_CmsExtractionResult extractionResult) Gets the mapped value.getStringValue(CmsObject cms, CmsResource res, I_CmsExtractionResult extractionResult, List<CmsProperty> properties, List<CmsProperty> propertiesSearched) Returns the String value extracted form the provided data according to the rules of this mapping type.getType()Returns the mapping type.voidsetDefaultValue(String defaultValue) Sets the default value for this field mapping in case no content is available.voidSets the mapping parameter.voidSets the mapping type as a String.voidSets the mapping type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opencms.search.fields.I_CmsSearchFieldMapping
setLocale
-
Field Details
-
MAX_DEPTH
Maximum recursion depth for following links.- See Also:
-
-
Constructor Details
-
CmsGeoCoordinateFieldMapping
Creates a new instance.- Parameters:
config- the configuration to use
-
-
Method Details
-
getDefaultValue
Description copied from interface:I_CmsSearchFieldMappingReturns the default value used for this field mapping in case no content is available.- Specified by:
getDefaultValuein interfaceI_CmsSearchFieldMapping- Returns:
- the default value used for this field mapping in case no content is available
- See Also:
-
getParam
Description copied from interface:I_CmsSearchFieldMappingReturns the mapping parameter.The parameter is used depending on the implementation of the rules of the selected
CmsSearchFieldMappingType.- Specified by:
getParamin interfaceI_CmsSearchFieldMapping- Returns:
- the mapping parameter
- See Also:
-
getStringValue
public String getStringValue(CmsObject cms, CmsResource res, I_CmsExtractionResult extractionResult, List<CmsProperty> properties, List<CmsProperty> propertiesSearched) Description copied from interface:I_CmsSearchFieldMappingReturns the String value extracted form the provided data according to the rules of this mapping type.- Specified by:
getStringValuein interfaceI_CmsSearchFieldMapping- Parameters:
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- Returns:
- the String value extracted form the provided data according to the rules of this mapping type
- See Also:
-
getStringValue
public String getStringValue(int depth, CmsGeoMappingConfiguration mappingConfig, CmsObject cms, CmsResource res, I_CmsExtractionResult extractionResult) Gets the mapped value.- Parameters:
depth- the current recursion depthmappingConfig- the mapping configuration to usecms- the CMS contextres- the resource for which to get the valueextractionResult- the extraction result of the resource- Returns:
- the mapped value
-
getType
Description copied from interface:I_CmsSearchFieldMappingReturns the mapping type.- Specified by:
getTypein interfaceI_CmsSearchFieldMapping- Returns:
- the mapping type
- See Also:
-
setDefaultValue
Description copied from interface:I_CmsSearchFieldMappingSets the default value for this field mapping in case no content is available.- Specified by:
setDefaultValuein interfaceI_CmsSearchFieldMapping- Parameters:
defaultValue- the default value to set- See Also:
-
setParam
Description copied from interface:I_CmsSearchFieldMappingSets the mapping parameter.The parameter is used depending on the implementation of the rules of the selected
CmsSearchFieldMappingType.- Specified by:
setParamin interfaceI_CmsSearchFieldMapping- Parameters:
param- the parameter to set- See Also:
-
setType
Description copied from interface:I_CmsSearchFieldMappingSets the mapping type.- Specified by:
setTypein interfaceI_CmsSearchFieldMapping- Parameters:
type- the type to set- See Also:
-
setType
Description copied from interface:I_CmsSearchFieldMappingSets the mapping type as a String.- Specified by:
setTypein interfaceI_CmsSearchFieldMapping- Parameters:
type- the name of the type to set- See Also:
-