|
Sun Message Library for HL7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stc.hl7.builder.HL7OTDBuilder
public class HL7OTDBuilder
The HL7OTDBuilder builds HL7 OTDs. The input metadata comes from a Microsoft Access Database. The resulting OTDs are stored in the destination directory specified in the OtdBuilderSpec. These OTDs are organized by version id and then by OTD name.
Nested Class Summary | |
---|---|
static class |
HL7OTDBuilder.HL7PropName
Enumeration of node types. |
Field Summary | |
---|---|
java.lang.String |
mBaseDir
Location of .otd output directory |
(package private) boolean |
mBuildAll
Build all versions in the HL7 Access Database |
(package private) boolean |
mBuildGeneric
Build the Generic OTDS - event and ACK |
java.lang.String |
mDatabasePath
The fully qualified path to the HL7 MS Access database |
Fields inherited from interface com.stc.otd.builder.OtdBuilder |
---|
PACKAGE_NAME_PREFIX |
Constructor Summary | |
---|---|
HL7OTDBuilder()
Constructs an HL7OTDBuilder |
|
HL7OTDBuilder(java.lang.String baseDir,
java.lang.String databasePath,
java.util.ArrayList hl7VerList)
Constructs an HL7OTDBuilder with the given OTDBuilderSpec |
Method Summary | |
---|---|
void |
buildExternalOTDs(java.util.ArrayList nodes,
NodeDescList segList,
NodeDescList compList,
HL7Version hl7Version,
java.util.Hashtable segs)
Builds .fog files for segments and composites as external templates |
void |
buildGenericOtds(HL7DBConnection hl7db)
Builds the Generic HL7 Event and the Generic Acknowledgement |
void |
buildOtd()
Sets up to build the .fog file |
void |
buildOtd(com.stc.otd.forest.OtdMetaContainer otdMetaContainer)
Populates the empty OtdMetaContainer obtained from the OtdContext.createOtd method. |
com.stc.otd.fog.FogComposite |
createExtRefNode(com.stc.otd.fog.provider.FogOrderImpl fogOrder,
java.lang.String nodeName,
java.util.Hashtable nodes,
com.stc.otd.fog.FogComposite main)
Creates external template for segment |
void |
generateCode(com.stc.otd.forest.OtdMetaContainer otdMetaContainer)
generateCode method will invoke the otd type specific code generator to generate the java otd code. |
com.stc.otd.builder.OtdBuilderSpec |
getOtdBuilderSpec()
Getter for HL7OTDBuilderSpec attribute of the OtdBuilder |
void |
init()
Initializes necessary variables |
static void |
main(java.lang.String[] args)
For testing |
int |
parseOpts(java.lang.String[] args)
Parses the commandline arguments |
void |
processGroupSegment(com.stc.otd.fog.provider.FogOrderImpl fogOrder,
NodeDesc n,
com.stc.otd.fog.FogComposite main,
java.util.Hashtable nodes,
NodeDescList eventList,
boolean top,
java.util.Hashtable extNodes,
RefDesc refDesc)
Processes group segment |
void |
setOtdBuilderSpec(com.stc.otd.builder.OtdBuilderSpec spec)
Setter for HL7OTDBuilderSpec attribute of the OtdBuilder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String mBaseDir
public java.lang.String mDatabasePath
boolean mBuildAll
boolean mBuildGeneric
Constructor Detail |
---|
public HL7OTDBuilder()
public HL7OTDBuilder(java.lang.String baseDir, java.lang.String databasePath, java.util.ArrayList hl7VerList)
baseDir
- Location of .otd output directorydatabasePath
- The fully qualified path to the HL7 MS Access databasehl7VerList
- The list of HL7 versionsMethod Detail |
---|
public void init() throws java.lang.Exception
java.lang.Exception
- upon error.public void setOtdBuilderSpec(com.stc.otd.builder.OtdBuilderSpec spec)
setOtdBuilderSpec
in interface com.stc.otd.builder.OtdBuilder
spec
- builder specpublic com.stc.otd.builder.OtdBuilderSpec getOtdBuilderSpec()
getOtdBuilderSpec
in interface com.stc.otd.builder.OtdBuilder
public static void main(java.lang.String[] args)
args
- The command line argumentspublic void buildOtd() throws java.lang.Exception
java.lang.Exception
- Failure to runpublic void buildExternalOTDs(java.util.ArrayList nodes, NodeDescList segList, NodeDescList compList, HL7Version hl7Version, java.util.Hashtable segs) throws java.lang.Exception
nodes
- list of segment namessegList
- list of all segments for a particular version of HL7compList
- list of all composites for a particular version of HL7hl7Version
- the HL7 Versionsegs
- Map of all external templates for segments
exception
- upon error
java.lang.Exception
public void processGroupSegment(com.stc.otd.fog.provider.FogOrderImpl fogOrder, NodeDesc n, com.stc.otd.fog.FogComposite main, java.util.Hashtable nodes, NodeDescList eventList, boolean top, java.util.Hashtable extNodes, RefDesc refDesc) throws java.lang.Exception
fogOrder
- FogOrder objectn
- Node Descriptionmain
- fogOrder object's main nodenodes
- table with segmentname as the key and fogOrder as the valueeventList
- event nodes description listtop
- indicates whether node is top node or notextNodes
- table with segmentname as the key and fogOrder object as the valuerefDesc
- RefDesc object
java.lang.Exception
- exception upon errorpublic com.stc.otd.fog.FogComposite createExtRefNode(com.stc.otd.fog.provider.FogOrderImpl fogOrder, java.lang.String nodeName, java.util.Hashtable nodes, com.stc.otd.fog.FogComposite main) throws java.lang.Exception
fogOrder
- FogOrder objectnodeName
- segment namenodes
- table with segmentname as the key and fogOrder as the valuemain
- fogOrder object's main node
java.lang.Exception
- exception upon errorpublic void buildGenericOtds(HL7DBConnection hl7db) throws java.lang.Exception
java.lang.Exception
- exception upon errorpublic void buildOtd(com.stc.otd.forest.OtdMetaContainer otdMetaContainer) throws com.stc.otd.builder.OtdBuilderException
buildOtd
in interface com.stc.otd.builder.OtdBuilder
otdMetaContainer
- OtdMetaContainer object
com.stc.otd.builder.OtdBuilderException
- OtdBuilderExceptionpublic void generateCode(com.stc.otd.forest.OtdMetaContainer otdMetaContainer) throws com.stc.otd.builder.OtdBuilderException
generateCode
in interface com.stc.otd.builder.OtdBuilder
otdMetaContainer
- OtdMetaContainer object
com.stc.otd.builder.OtdBuilderException
- OtdBuilderExceptionpublic int parseOpts(java.lang.String[] args) throws java.lang.Exception
args
- an array of commandline arguments
java.lang.Exception
- exception upon error
|
Sun Message Library for HL7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |