Open main menu

CDOT Wiki β

Changes

JSON Integration Adapter

2 bytes removed, 09:59, 23 June 2011
Formatting and minor update of JSONMessagePartMapping (it is optional on a message part).
NOTE: THE MESSAGE PARAMETER DOES NOT CONTAIN THE MESSAGE VALUES. THE MESSAGE PARAMETER CONTAINS THE MESSAGE METADATA. THE TRANSFER OBJECT CONTAINS THE MESSAGE VALUES WHICH MUST BE VALIDATED AGAINST THE MESSAGE TO ENSURE CORRECT FORMAT.
; MessagePart.java - :Parts of a message. Messages can contain values or other messages. NexJ Express has two types of message parts, ''CompositeMessagePart'' and ''PrimitiveMessagePart''.
Currently NexJ Express has two types of message parts, ; CompositeMessagePart.java and PrimitiveMessagePart.java .  CompositeMessagePart.java : implementation is CompositeMessagePartInstance . The relationship between CompositeMessagePartInstance and PrimitiveMessagePart with the above picture is as follows : - CompositeMessagePartInstance are messages (the red nodes) and PrimitiveMessagePart are values (the green nodes). To determine multiplicity of MessageParts, use isCollection() method of MessagePart .  Note that multiplicity of the above screenshot are all: '''[0..1]''', that is zero or one instance. Possible node multiplicities:
; '''[0..1]''' : zero or one instance (i.e. an optional entry)
; '''[1..1]''' : exactly one instance (i.e. required)
; '''[1..0]''' : collection of at least one, possibly unlimited instances
; XMLJSONMessageMappingLoader
: Used by the framework to autoload JSONMessagePartMapping for each of the message parts.
XMLJSONMessageMappingLoader.java - Used by the framework to autoload ; JSONMessagePartMapping for each of the message parts. JSONMessagePartMapping - : Each node in the above picture ''may'' has a corresponding JSONMessagePartMapping.Each node has may have its own mapping, with its own values initialized in XMLJSONMessageMappingLoader.In order to get the mapping, first cast MessagePart to a concrete class such as CompositeMessagePartInstance or PrimitiveMessagePart, then use part.getMapping(). The purpose of the mapping is metadata for each node.
; JSONMessageFormatter - : Used to turn messages into JSON format.
; JSONMessageParser - : Used to turn JSON into a message.
==== Algorithm ====