org.openeai.scrubbers
Class CaseConverter


java.lang.Object

  |

  +--org.openeai.OpenEaiObject

        |

        +--org.openeai.scrubbers.EnterpriseScrubberImpl

              |

              +--org.openeai.scrubbers.CaseConverter

All Implemented Interfaces:
EnterpriseScrubber

public class CaseConverter
extends EnterpriseScrubberImpl
implements EnterpriseScrubber

A general CaseConverter class that converts the first letter of a String to Upper case an all subsequent letters to lower case. These scrubbers are associated to a particular field in the EnterpriseObjects documents.

Example 1: TOD JACKSON becomes Tod Jackson

Example 2: tod jackson becomes Tod Jackson

Example 3: TODJACKSON becomes Todjackson

Version:
3.0 beta2 - 28 January 2003
Author:
Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)

Field Summary
 
Fields inherited from class org.openeai.OpenEaiObject
logger
 
Constructor Summary
CaseConverter()
          Constructor
 
Method Summary
 java.lang.String scrub(java.lang.String value)
          This is the scrub method that all EnterpriseScrubbers must implement.
 
Methods inherited from class org.openeai.scrubbers.EnterpriseScrubberImpl
getSequence, setSequence
 
Methods inherited from class org.openeai.OpenEaiObject
addLog4jProperty, getAppName, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openeai.scrubbers.EnterpriseScrubber
getSequence, setSequence
 

Constructor Detail

CaseConverter


public CaseConverter()
Constructor

Method Detail

scrub


public java.lang.String scrub(java.lang.String value)
                       throws EnterpriseScrubberException
This is the scrub method that all EnterpriseScrubbers must implement. This particular scrub method converts the first letter of each space delimited Strings in the String passed in to Upper case an all subsequent letters of that String to lower case.

Specified by:
scrub in interface EnterpriseScrubber
Returns:
String the scrubbed value in 'mixed case'.
Throws:
EnterpriseScrubberException - if any errors occur scrubbing the input.
See Also:
EnterpriseFields, EnterpriseFormatter


Copyright © 2002, OpenEAI Software Foundation