hapi-sourcegen:xsdconfgen

Full name:

ca.uhn.hapi:hapi-sourcegen:2.2:xsdconfgen

Description:

The XsdConfGen tool takes an HL7 conformance profile and creates an XSD schema which matches the XML encoding for messages meeting that conformance profile. In addition, it is able to combine multiple profiles into a single schema. See the usage page for information on how to use this plugin. This plugin was contributed as a part of the ConnectingGTA project.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: runtime.
  • Since version: 2.1.
  • Binds by default to the lifecycle phase: generate-sources.

Required Parameters

Name Type Since Description
profiles List 2.1 One or more XML conformance profiles. If more than one is used, the contents will be combined. Note that this has the effect of merging the profiles in a specific way: When an element is found in a profile for the first time (e.g. a definition for the PID segment), that element is generated into the XSD. If the same element is found in a subsequent profile, it is ignored and the definition from the first profile is used.

This is desirable if you want to process multiple message types in certain toolsets and reuse modules for processing some structures.

If completely separate definitions are desired, this can be accomplished by configuring the xsdconfgen plugin to have multiple executions and to use only a single conformance profile for each execution.


targetDirectory String 2.1 The target directory for the generated source
targetFile String 2.1 The file name for the generated file (file will be placed in the targetDirectory)

Optional Parameters

Name Type Since Description
constrain boolean 2.1 If set to true (default is false), any elements which are defined to have a usage of "X" (not supported) will not be generated as elements in the schema.
filterBogusGroups boolean 2.1 The Message Workbench tool generally creates segment groups as two level structures, with an outer group which has only a single child which is the actual group. If this is set to true (which is the default), these "bogus" groups are filtered.
linkTriggerToStructure Map 2.1 If provided, created additional message types in the schema and links them to a structure provided by any of the conformance profiles defined by the <profiles> configuration element. For example, if you have a conformance profile which defines a structure called ADT_A01, you may use this parameter to create an additional message of ADT_A02 which also uses the ADT_A01 structure. This is useful when you want to have a single structure to use for a number of message types.

Parameter Details

constrain:

If set to true (default is false), any elements which are defined to have a usage of "X" (not supported) will not be generated as elements in the schema.
  • Type: boolean
  • Since: 2.1
  • Required: No

filterBogusGroups:

The Message Workbench tool generally creates segment groups as two level structures, with an outer group which has only a single child which is the actual group. If this is set to true (which is the default), these "bogus" groups are filtered.
  • Type: boolean
  • Since: 2.1
  • Required: No

linkTriggerToStructure:

If provided, created additional message types in the schema and links them to a structure provided by any of the conformance profiles defined by the <profiles> configuration element. For example, if you have a conformance profile which defines a structure called ADT_A01, you may use this parameter to create an additional message of ADT_A02 which also uses the ADT_A01 structure. This is useful when you want to have a single structure to use for a number of message types.
  • Type: java.util.Map
  • Since: 2.1
  • Required: No

profiles:

One or more XML conformance profiles. If more than one is used, the contents will be combined. Note that this has the effect of merging the profiles in a specific way: When an element is found in a profile for the first time (e.g. a definition for the PID segment), that element is generated into the XSD. If the same element is found in a subsequent profile, it is ignored and the definition from the first profile is used.

This is desirable if you want to process multiple message types in certain toolsets and reuse modules for processing some structures.

If completely separate definitions are desired, this can be accomplished by configuring the xsdconfgen plugin to have multiple executions and to use only a single conformance profile for each execution.

  • Type: java.util.List
  • Since: 2.1
  • Required: Yes

targetDirectory:

The target directory for the generated source
  • Type: java.lang.String
  • Since: 2.1
  • Required: Yes

targetFile:

The file name for the generated file (file will be placed in the targetDirectory)
  • Type: java.lang.String
  • Since: 2.1
  • Required: Yes