ca.uhn.hl7v2.parser
Interface ModelClassFactory

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
CanonicalModelClassFactory, CustomModelClassFactory, DefaultModelClassFactory

public interface ModelClassFactory
extends java.io.Serializable

Looks up classes for message model components (e.g. concrete implementations of Message, Group, Segment). A custom factory can be used to point to custom model components.

Version:
$Revision: 1.3 $ updated on $Date: 2009/10/03 15:25:46 $ by $Author: jamesagnew $
Author:
Bryan Tripp

Method Summary
 java.lang.Class<? extends Group> getGroupClass(java.lang.String theName, java.lang.String theVersion)
           
 java.lang.Class<? extends Message> getMessageClass(java.lang.String theName, java.lang.String theVersion, boolean isExplicit)
           
 java.lang.Class<? extends Segment> getSegmentClass(java.lang.String theName, java.lang.String theVersion)
           
 java.lang.Class<? extends Type> getTypeClass(java.lang.String theName, java.lang.String theVersion)
           
 

Method Detail

getMessageClass

java.lang.Class<? extends Message> getMessageClass(java.lang.String theName,
                                                   java.lang.String theVersion,
                                                   boolean isExplicit)
                                                   throws HL7Exception
Parameters:
theName - name of message
theVersion - HL7 version
isExplicit - true if the structure was specified explicitly in MSH-9-3, false if it was inferred from MSH-9-1 and MSH-9-2. If false, a lookup may be performed to find an alternate structure corresponding to that message type and event.
Returns:
a class that implements the specified message
Throws:
HL7Exception - if the version if not recognized or an appropriate class can not be found

getGroupClass

java.lang.Class<? extends Group> getGroupClass(java.lang.String theName,
                                               java.lang.String theVersion)
                                               throws HL7Exception
Parameters:
theName - name of group
theVersion - HL7 version
Returns:
a class that implements the specified group
Throws:
HL7Exception - if the version if not recognized or an appropriate class can not be found

getSegmentClass

java.lang.Class<? extends Segment> getSegmentClass(java.lang.String theName,
                                                   java.lang.String theVersion)
                                                   throws HL7Exception
Parameters:
theName - name of segment
theVersion - HL7 version
Returns:
a class that implements the specified segment
Throws:
HL7Exception - if the version if not recognized or an appropriate class can not be found

getTypeClass

java.lang.Class<? extends Type> getTypeClass(java.lang.String theName,
                                             java.lang.String theVersion)
                                             throws HL7Exception
Parameters:
theName - name of type
theVersion - HL7 version
Returns:
a class that implements the specified type
Throws:
HL7Exception - if the version if not recognized or an appropriate class can not be found


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