...
Composing Apps MUST NOT generate entities with multiple identifiers which refer to different entities.
Attribute Enrichment
Attributes and the default presentation may be added or updated by an enrichment application after receipt and before being rendered. This enrichment may be used in the routing logic to decide which App is selected to render the entity and may also be used by the rendering App to produce the final on-screen representation of the entity. Enriching Apps are not permitted to remove any of the content of the received entity but may replace attributes or the default presentation by providing an addition element with the same name and ID and with an XML attribute called enrichment which contains a sequence number starting at 1. In the event that there are multiple enrichment applications and more than one enrichment App wishes to update a single attribute then the attributes added by later Apps will have higher enrichment values than those added by earlier Apps and these will be taken in preference by the rendering App when it is eventually called.
For example the following Entity could be received:
Code Block |
---|
<entity type=”org.symphonyoss.fin.security” version="1.0"/>
<attribute name=”id” type=”org.symphonyoss.fin.security.id.isin” priority=0 value=”US0378331005”/>
<presentationML>Apple</presentationML>
</entity> |
After enrichment an additional identifier and two additional unnamed attributes might be added. These additions are all identified with the XML attribute enrichment="1":
Code Block |
---|
<entity type=”org.symphonyoss.fin.security” version="1.0"/>
<attribute name=”id” type=”org.symphonyoss.fin.security.id.isin” priority=0 value=”US0378331005”/>
<attribute name=”id” type=”org.symphonyoss.fin.security.id.cusip” enrichment="1" value=”037833100”/>
<attribute type="org.symphonyoss.fin.region" enrichment="1" value="NA"/>
<attribute type="org.symphonyoss.type.country" enrichment="1" value="US"/>
<presentationML>Apple</presentationML>
<presentationML enrichment="1">Apple common stock</presentationML>
</entity> |
After enrichment by a second enrichment App a further identifier and two further additional unnamed attributes might be added. These additions are all identified with the XML attribute enrichment="2":
Code Block |
---|
<entity type=”org.symphonyoss.fin.security” version="1.0"/>
<attribute name=”id” type=”org.symphonyoss.fin.security.id.isin” priority=0 value=”US0378331005”/>
<attribute name=”id” type=”org.symphonyoss.fin.security.id.cusip” enrichment="1" value=”037833100”/>
<attribute name=”id” type=”org.symphonyoss.fin.security.id.openfigi” enrichment="2" value=”BBG000B9XRY4”/>
<attribute type="org.symphonyoss.fin.region" enrichment="1" value="NA"/>
<attribute type="org.symphonyoss.type.country" enrichment="1" value="US"/>
<attribute type="com.example.fin.tier" enrichment="2" value="BlueChip"/>
<attribute type="com.example.fin.sector" enrichment="2" value="Tech"/>
<presentationML>Apple</presentationML>
<presentationML enrichment="1">Apple common stock</presentationML>
<presentationML enrichment="2"><b>Apple</b> common stock, traded on NYSE</presentationML>
</entity> |
Note that in this case the enrichment Apps have both added extra attributes named id, which if present in the original entity would have required priority attributes to order them. The enrichment added attributes are all considered to come after all attributes of the same name in the original entity, and the enrichment added attributes are then taken in descending order or enrichment value. In the example above the openfigi ID would be treaded as if it had a priority of 2 and the cusip would be treated as if it had a priority of 3.
Default Representation
Any Entity element MAY contain a single presentationML element which contains a default representation of the described Entity in PresentationML markup. This rendering is a default presentation for use by receivers who are unable to understand the structured data in the entity markup and MUST NOT contain any information which is not included in, or derivable from data included in the structured data in the entity. Where present, the presentationML element of an entity MUST contain a representation of the entity which is consistent with the structured data contained within the entity.
...
Tag | Description | Can Be Nested Within |
<entity type=”type.id” name=”entity.name”>name” version="major.minor"> <attribute>…..</attribute> <entity>…..</entity> <presentationML> default representation </presentationML> </entity> | An Entity describes some type of complex object which is referenced from within a message. All Entity elements MUST include a type XML-attribute which defines the format and semantics of the Entity. All Entity elements MAY contain child Entity and Attribute elements which are considered to make up the Entity by composition. All Entity elements MAY contain a presentationML element which contains a default representation of the Entity in PresentationML mark up. Entity elements which are not children of another entity element MUST contain a presentationML element. | <messageML> <p><b><i><td><th><li> <entity> |
<attribute type=”type.id” name=”attribute.name” priority=”preference” value=”value.string” /> | An Attribute describes an attribute of a complex object. All Attribute elements MUST include a type XML-attribute which defines the format and semantics of the Attribute. All Attribute elements MUST contain a value XML-attribute which defines the value of the Attribute. Where there are multiple Attributes within an Entity with the same name a priority XML-attribute MUST be present, indicating which value is preferred. | <entity> |
...
Code Block |
---|
<entity type=”org.symphonyoss.fin.security.price.quote”/> <entity type=”org.symphonyoss.fin.security”/> <attribute name=”id” type=”org.symphonyoss.fin.security.id.isin” priority=0 value=”US0378331005”/> <attribute name=”id” type=”org.symphonyoss.fin.security.id.cusip” priority=1 value=”037833100”/> <attribute name=”id” type=”org.symphonyoss.fin.security.id.openfigi” priority=2 value=”BBG000B9XRY4”/> <presentationML>Apple Common Stock</presentationML> </entity> <entity format=”org.symphonyoss.fin.price.source”/> <attribute name=”id” format=”org.symphonyoss.fin.exchange.id.mic” priority=0 value=”45”/> <attribute name=”id” format=”org.symphonyoss.fin.exchange.id.ticker” priority=1 value=”NYSE”/> <presentationML><b>NYSE</b></presentationML> </entity> <entity format=”org.symphonyoss.time.moment”/> <attribute name=”at” format=”org.symphonyoss.time.millis” value=45464996/> <attribute name=”annotation” format=”org.symphonyoss.type.string” value=”Looks like a value buying opportunity”/> </entity> <attribute format=”org.symphonyoss.fin.ccy” value=”USD”/> <attribute name=”amount” format=”org.symphonyoss.number.double” value=”50.22123”/> <attribute name=”validUntil” format=”org.symphonyoss.time.millis” value=45469996/> <attribute name=”quantityMin” format=”org.symphonyoss.number.int” value=”10000”/> <attribute name=”quantityMax” format=”org.symphonyoss.number.int” value=”99999”/> <presentationML> <b>NYSE:Apple</b> at Mar 27 2016; $152.07 ”Looks like a value buying opportunity” valid until Mar 27 2016 17:00 </presentationML> </entity> |
MessageML
The following tags are defined for MessageML, tag names are case sensitive:
Tag | Description | Can Be Nested Within |
---|---|---|
<MessageML>document</MessageML> | A MessageML document. | |
<errors> <error>Some error message</error> <error>Another error message</error> </errors> | A structure to allow for the reporting of errors in transformations. These tags should only be produced as a result of generating MessageML via transformation from another format. When generating MessageML as part of a read operation, the generating system MAY include a single <errors> section to indicate problems which occurred during processing. When sending MessageML as part of a write request the sending system SHOULD NOT generate an <errors> section. If such a section is received by the server fulfilling a write operation then the operation MUST fail. | <MessageML> |
Additionally all PresentationML tags except for <PresentationML></PresentationML> and all EntityML tags are also valid MessageML tags, and have the same meaning as defined above. This means that all PresentationML tags can be nested within <MessageML>
...