ca.uhn.hl7v2.validation.impl
Class WithdrawnDatatypeRule

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

public class WithdrawnDatatypeRule
extends SizeRule

Validation Rule which will not accept any content (i.e. length must be 0).

This class is expected to be used for withdrawn fields/components, and will provide a failure description indicating that the type is withdrawn.

If you wish to disable this rule globally, invoke the following code:

System.setProperty(ca.uhn.hl7v2.validation.impl.WithdrawnDatatypeRule.PROP_DISABLE_RULE, "true");

Note that this property is only checked the first time the class is loaded (i.e. not at runtime). To disable for an individual parser at runtime, call

parser.setValidationContext(new NoValidation());

See Also:
Serialized Form

Field Summary
static String PROP_DISABLE_RULE
          Set the value of a system property to "true" to disable this rule globally.
 
Constructor Summary
WithdrawnDatatypeRule()
          Constructor
 
Method Summary
 String getDescription()
          Returns a text description of the rule.
 
Methods inherited from class ca.uhn.hl7v2.validation.impl.SizeRule
correct, getSectionReference, test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_DISABLE_RULE

public static final String PROP_DISABLE_RULE
Set the value of a system property to "true" to disable this rule globally.

See Also:
Constant Field Values
Constructor Detail

WithdrawnDatatypeRule

public WithdrawnDatatypeRule()
Constructor

Method Detail

getDescription

public String getDescription()
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
Overrides:
getDescription in class SizeRule
See Also:
Rule.getDescription()


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