ca.uhn.hl7v2.validation.impl
Class ValidationContextImpl

java.lang.Object
  extended by ca.uhn.hl7v2.validation.impl.ValidationContextImpl
All Implemented Interfaces:
ValidationContext, Serializable
Direct Known Subclasses:
DefaultValidationWithoutTN, NoValidation

public class ValidationContextImpl
extends Object
implements ValidationContext, Serializable

A default implementation of ValidationContext.

Author:
Bryan Tripp, Christian Ohr
See Also:
Serialized Form

Constructor Summary
ValidationContextImpl()
           
 
Method Summary
 List<RuleBinding<EncodingRule>> getEncodingRuleBindings()
           
 EncodingRule[] getEncodingRules(String theVersion, String theEncoding)
           
 List<RuleBinding<MessageRule>> getMessageRuleBindings()
           
 MessageRule[] getMessageRules(String theVersion, String theMessageType, String theTriggerEvent)
           
 List<RuleBinding<PrimitiveTypeRule>> getPrimitiveRuleBindings()
           
 PrimitiveTypeRule[] getPrimitiveRules(String theVersion, String theTypeName, Primitive theType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationContextImpl

public ValidationContextImpl()
Method Detail

getPrimitiveRules

public PrimitiveTypeRule[] getPrimitiveRules(String theVersion,
                                             String theTypeName,
                                             Primitive theType)
Specified by:
getPrimitiveRules in interface ValidationContext
Parameters:
theType - ignored
theVersion - an HL7 version (eg "2.1")
theTypeName - a primitive datatype name (eg "ST")
Returns:
active rules for checking the given type in the given version
See Also:
ca.uhn.hl7v2.validation.ValidationContext#getDataTypeRules(java.lang.String, java.lang.String)

getPrimitiveRuleBindings

public List<RuleBinding<PrimitiveTypeRule>> getPrimitiveRuleBindings()
Returns:
a List of RuleBindings for PrimitiveTypeRules.

getMessageRules

public MessageRule[] getMessageRules(String theVersion,
                                     String theMessageType,
                                     String theTriggerEvent)
Specified by:
getMessageRules in interface ValidationContext
Parameters:
theVersion - an HL7 version (eg "2.1")
theMessageType - a value valid for MSH-9-1
theTriggerEvent - a value valid fro MSH-9-2
Returns:
the active rules that apply to message of the given version, message type, and trigger event
See Also:
#getMessageRules(java.lang.String, java.lang.String, java.lang.String)

getMessageRuleBindings

public List<RuleBinding<MessageRule>> getMessageRuleBindings()
Returns:
a List of RuleBindings for MessageRules.

getEncodingRules

public EncodingRule[] getEncodingRules(String theVersion,
                                       String theEncoding)
Specified by:
getEncodingRules in interface ValidationContext
Parameters:
theVersion - an HL7 version (eg "2.1")
theEncoding - an encoding name (eg "VB", "XML)
Returns:
the active encoding rules that apply to the given version and encoding
See Also:
ValidationContext.getEncodingRules(java.lang.String, java.lang.String)

getEncodingRuleBindings

public List<RuleBinding<EncodingRule>> getEncodingRuleBindings()
Returns:
a List of RuleBindings for EncodingRules.


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