Class CharacterCaseTransformer

java.lang.Object
com.norconex.importer.handler.transformer.impl.CharacterCaseTransformer
All Implemented Interfaces:
Configurable<CharacterCaseTransformerConfig>, ConfigurableDocHandler<CharacterCaseTransformerConfig>, DocHandler

public class CharacterCaseTransformer extends Object implements ConfigurableDocHandler<CharacterCaseTransformerConfig>

Changes the character case of a document content or matching fields values according to one of the following methods:

  • upper: Changes all characters to upper case.
  • lower: Changes all characters values to lower case.
  • words: Converts the first letter of each words to upper case, and leaves the character case of other characters unchanged.
  • wordsFully: Converts the first letter of each words to upper case, and the rest to lower case.
  • sentences: Converts the first letter of each sentence to upper case, and leaves the character case of other characters unchanged.
  • sentencesFully: Converts the first letter of each sentence to upper case, and converts other characters to lower case.
  • string: Converts the first letter of a string to upper case, and leaves the character case of other characters unchanged.
  • stringFully: Converts the first letter of a string to upper case, and converts other characters to lower case.
  • swap: Converts all upper case characters to lower case, and all lower case to upper case.

When dealing with fields, the change of character case can be applied to one of the following (defaults to "value" when unspecified):

  • value: Applies to the field values.
  • field: Applies to the field name.
  • both: Applies to both the field name and its values.

Field names are referenced in a case insensitive manner.

See Also: