...
Tip |
---|
If you are working in an IDE such as eclipse, try importing the ADM xsd schema into your eclipse XML catalog so that you you can get usage tips on ADM model by pressing control-space. |
Model Element
The root element of a message model is the model element, which is used to define a namespace qualified set of modeling elements. To conform with x-adml.xsd schema and pass validation, a model must define target XML namespace xmlns="http://www.neeveresearch.com/schema/x-adml". This is not to be confused with namespace
attribute described below.
...
Note | ||||||
---|---|---|---|---|---|---|
| ||||||
Types from a model imported must be generated with the same encoding type as the model importing them. It is not possible to mix and match different encoding types within a message or entity. So if MessageA is generated with Xbuf and embedded EntityB is generated with Protobuf, Message cannot use EntityB as a field.
When generating code and copying model to output, encoding information is written to target model XML as a directive. If model for which code is generated and any of its imports have encoding mismatch, code generator will raise model validation error. For imported models that do not have encoding info (resolved directly to OS path or packaged to jar with earlier versions of ADM), this validation is not enforced. |
See also Imported Model Resolution
Factories
The factories section defines object factories that are used to instantiate the generated object. Each factory in an application must have a unique factory id. The ID is serialized along with object or transported in MessageMetadata and is used to reconstitute its objects during deserialization. A single model can define multiple factories, allowing Messages and Entities to be grouped together as the application sees fit. A factory can contain a maximum of 32767 types, so in practice it is rarely a requirement to use multiple factories within a single model. Each type in the model defines the factory to which it belongs via its factoryid attribute. User application may define factories with ids greater than or equal to 1, ids <= 0 are reserved for platform internal use.
...