Apama 10.3 | Apama Documentation | Connecting Apama Applications to External Components | Correlator-Integrated Support for the Java Message Service (JMS) | Using the Java Message Service (JMS) | Mapping Apama events and JMS messages | Using EDA events in Apama applications | Rules that govern EPL name generation
Rules that govern EPL name generation
When Apama uses an EDA event type schema to generate EPL event type definitions, it derives the package name from the XSD namespace of the corresponding schema types. This ensures the ability to
*Distinguish between elements that have the same name but different namespaces
*Generate the namespace from the package name when creating an XML payload from Apama events
There is a one to one relationship between a namespace in an EDA event schema and an Apama package. For example, if there are two namespaces in the .xsd file, then Apama generates EPL event type definitions in two Apama EPL packages.
The following special characters are allowed in namespace and element names that are to be mapped to EPL package names, EPL event type names or EPL event type field names:
*Colon (:)
*Hyphen (-)
*Period (.)
*Underscore (_)
When a name contains one of these characters, the character is replaced with an underscore and the prefix $x$ is added to the name. The x in $x$ is an ordered list of letters that identifies the characters that were in the name. The following table describes these escape characters:
Escape Character
Indicates that a colon (:) was replaced.
Indicates that the package name was derived from a non-EDA namespace. If it is the first character in the escape sequence then the package name is the full namespace. For an EDA namespace, the EPL package name does not include the fixed part of the EDA namespace, which is http://namespaces.softwareag.com/EDA/.
Indicates that a hyphen (-) was replaced.
Indicates that nothing was replaced. However, since an EPL name can contain underscores but cannot have a number as the first character, an n in an escape sequence means one of the following:
*There was an underscore in the EDA name.
*There was a number as the first character in the EDA name or at the beginning of a part of a namespace.
Having the n in the sequence provides the information needed to map the EPL name back to an EDA name.
Exception: If an EDA name contains one or more underscores, but not any other special characters, an escape prefix is not added. This is because underscores are allowed in EPL names. When an underscore is in an EDA name, the EPL escape prefix is needed only if the name also contains a colon, hyphen, or period, or a number is the first character.
Indicates that a period (.) was replaced.
Indicates that an underscore (_) was replaced.
Apama maps a namespace to an EPL package name as follows:
*The package name contains a period (.) in place of each slash (/).
*For an EDA namespace, the package name contains only the non-fixed part of the namespace. The package name does not contain http://namespaces.softwareag.com/EDA/.
*For a non-EDA namespace, the package name contains the full namespace and f is the first letter in the escape sequence prefixed to the package name.
The following table provides examples of how EDA namespace names become EPL package names:
EPL package name
The following table provides examples of how other EDA names become EPL names:
EDA element name
EPL name
<xsd:element name="MAC-Address"/>
<xsd:element name="Model.Type"/>
<xsd:element name="Model_Type_Special"/>

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.