The examples given so far show a comparatively simple tree model, but actually a repository item property can be derived from any other properties, so long as the properties can be represented as vertices on a path of a directed acyclic graph. That is, the derivation of a property can have multiple paths that are traversed to derive the value. For example, a shipping address might derive from the user’s specified shipping address, the user’s billing address or home address, or the user’s company’s address:

<item-descriptor name="user">
  <property name="shipToAddress" writable="false" item-type="address">
  <table name="user" >
    <property name="shippingAddress" item-type="address"/>
    <property name="billingAddress" item-type="address"/>
    <property name="homeAddress" item-type="address"/>
    <property name="company" item-type="company"/>

Note that this example assumes you’ve also defined item descriptors named address and company. To determine the value of the shipToAddress for a user, the expressions specified in the derivation are searched in order. Any expression may also refer to properties that are themselves derived.

loading table of contents...