The Explicit Data Set is an XML data structure used to describe entities, attributes and relationships. The Generic Data Model uses the same XML schema for every rulebase, defining entities, attributes and relationships as generic types.
In the example below, the element global-instance defines all of the data to be passed into the rulebase session. The session data contains two lists describing three different types of entities: "household", "household_member” and "electricity_provider". Each entity is identified by a unique id "the_household", "fred", "AGL". Attributes set for the household are identified by their id, and Relationships are identified by the name attribute. The way in which entities are nested indicates the containment model of the rulebase: the “household_member” “fred” is declared as a child of the “household” “the_household”, where as the “electricity_provider” “AGL” is declared as a child of the global entity instance and it’s association with the “household” is specified via the relationship specified on the latter entity instance.
<typ:global-instance>
<typ:entity id="household">
<typ:instance id="the_household">
<typ:attribute id="household_location">
<typ:text-val>Alabama</typ:text-val>
</typ:attribute>
<typ:attribute id="household_shelter_situation">
<typ:text-val>Housing Association</typ:text-val>
</typ:attribute>
<typ:attribute id="household_disabled_members">
<typ:boolean-val>true</typ:boolean-val>
</typ:attribute>
<typ:relationships>
<typ:relationship id="electricity_provider">
<typ:target instance-id="AGL"/>
</typ:relationship>
</typ:relationships>
<typ:list-entity id="household_member">
<typ:entity id="fred">
...
</typ:entity>
</typ:list-entity>
</typ:instance>
</typ:entity>
<typ:entity id="electricity_provider">
<typ:instance id="AGL">
...
</typ:instance>
</typ:entity>
</typ:global-instance>
See also: