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 automatic conversion between of EDA events and Apama events
Rules that govern automatic conversion between of EDA events and Apama events
The following table lists the conventions and rules that Apama follows when it
*Uses EDA event schemas to generate Apama event definitions
*Converts Apama events to EDA events or converts EDA events to Apama events
EDA schema construct
Conventions/rules
Simple XML type
Represented by a simple type field such as string or integer.
Complex XML type
Represented by Apama events having the same name and structure.
XML attribute
Represented by a simple type field. The name of the field is obtained by prefixing an underscore to the attribute name.
Simple XML element
Represented by a simple type field with same name.
Complex XML element
Represented by a field of event type. The event type corresponds directly to the complex type of the element. The name of the field is equal to the element name.
Anonymous complex type element
Represented by a field of event type. The event type corresponds directly to the anonymous complex type. The name of the event type is derived by combining the parent elements/types names and the current element name. The name of the field is equal to the element name.
Namespace
The package of generated Apama events corresponds directly to the namespace of the corresponding XML Schema types. The package is obtained by stripping the fixed part of the namespace name and by replacing "/" with ".". The package name is translated into the namespace name when generating EDA XML from Apama events. For details, see Rules that govern EPL name generation.
Element cardinality
An element with a cardinality combination other than minOccurs=1 and maxOccurs=1 is represented as a sequence of corresponding types, that is, a sequence of simple types for simple type elements or a sequence of event types for complex type elements. You must ensure that the size of the sequence is according to the cardinality.
Optional attribute
Represented by a sequence of the corresponding simple type. An empty sequence represents the absence of attributes. The sequence can contain zero or one element.
Sequence
Corresponding fields for all the elements are added to a parent event type that corresponds to the complex type.
All
Corresponding fields for all the elements are added to a parent event type that corresponds to the complex type.
Choice
Corresponding sequence type fields for all the elements are added to the parent event type. Only the sequence of the chosen element should be filled; the others must be empty.
Restriction
A simple type element with one or more restrictions is represented by a simple type field of the corresponding type. You must ensure that the value specified is within restrictions.
Extension of simple type
Represented by an event type. The event type contains a simple type field named xmlTextNode to hold the text content of the element. Additionally, the event type contains fields for attributes.
Extension of complex type
Represented by two events, one corresponds to the base type and the other corresponds to the extension type. The event corresponding to the extension type contains all fields added by the extension type. It also contains a field named xmlExtends that is of the base event type.
Element reference
A separate event is generated for a referenced element. The name of the event is the referenced element name appended with Element. The event contains a field with the same name as the referenced element name. The event using the reference element contains a field whose name is obtained by prefixing xml to the referenced element name.
anyType
An element of type xsd:anyType is represented by a field of string type or sequence<string> type depending on the cardinality. The name of the field is obtained by prefixing xml to field name. The content of the field is the whole element node serialized as a string.
any
The xsd:any element is represented by a field named xmlFragments. The type of the field is string or sequence<string> depending on the cardinality. The content of the field is the whole XML node corresponding to xsd:any serialized as a string.
anyAttributes
The xsd:anyAttributes element is represented by a field named xmlAttributes of type dictionary<string,string>. The content of the dictionary is name/value pairs for attributes that correspond to xsd:anyAttributes.
Special characters
If an XML name contains a hyphen or a period, or begins with a number, special treatment in EPL is required. For details, see Rules that govern EPL name generation.
anySimpleType or anyURI
An element of type xsd:anySimpleType or xsd:anyURI is represented by a field of string type. The name of the field is same as the name of element. The content of the field is the same as the content of the element.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback