ca.uhn.hl7v2.validation.impl
Class TrimLeadingWhitespace

java.lang.Object
  extended by ca.uhn.hl7v2.validation.impl.TrimLeadingWhitespace
All Implemented Interfaces:
PrimitiveTypeRule, Rule, java.io.Serializable

public class TrimLeadingWhitespace
extends java.lang.Object
implements PrimitiveTypeRule

Performs no validation but removes leading whitespace in the correct() method.

Version:
$Revision: 1.1 $ updated on $Date: 2007/02/19 02:24:40 $ by $Author: jamesagnew $
Author:
Bryan Tripp
See Also:
Serialized Form

Constructor Summary
TrimLeadingWhitespace()
           
 
Method Summary
 java.lang.String correct(java.lang.String value)
          Removes leading whitespace.
 java.lang.String getDescription()
          Returns a text description of the rule.
 java.lang.String getSectionReference()
          A string indicating the section of the HL7 standard from which this rule is derived (if applicable).
 boolean test(java.lang.String value)
          Returns true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrimLeadingWhitespace

public TrimLeadingWhitespace()
Method Detail

correct

public java.lang.String correct(java.lang.String value)
Removes leading whitespace.

Specified by:
correct in interface PrimitiveTypeRule
Parameters:
value - an original value to be corrected
Returns:
a corrected version of the given value
See Also:
PrimitiveTypeRule.correct(java.lang.String)

test

public boolean test(java.lang.String value)
Returns true.

Specified by:
test in interface PrimitiveTypeRule
See Also:
PrimitiveTypeRule.test(java.lang.String)

getDescription

public java.lang.String getDescription()
Description copied from interface: Rule
Returns a text description of the rule. This description may be used as a message in exceptions generated if validation against the rule fails, or in a user interface for rule configuration.

Specified by:
getDescription in interface Rule
See Also:
Rule.getDescription()

getSectionReference

public java.lang.String getSectionReference()
Description copied from interface: Rule
A string indicating the section of the HL7 standard from which this rule is derived (if applicable). Like the description, this may be used in an exception message or configuration UI.

Specified by:
getSectionReference in interface Rule
See Also:
Rule.getSectionReference()


Copyright © 2001-2011 University Health Network. All Rights Reserved.