Template:— assigning_address (asg_addr) Date: 2008/02/20 08:05:00
Revision: 1.12
Template: assigning_address

XML references to the Template

These can be cut and pasted into the XML as required.

assigning_address

Set up a hyperlink to the template definition.
<template_ref name="assigning_address" capability="representing_person_organization"/>

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_address" capability="representing_person_organization">
  <param name="address_class_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="address_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="street_number">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="street">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="postal_box">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="town">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="region">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="postal_code">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="country">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="internal_location">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="facsimile_number">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="telephone_number">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="electronic_mail_address">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="telex_number">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="url">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="located_pers_org">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_address">
  <param_in name="address_class_name" value=""/>
  <param_in name="address_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="name" value=""/>
  <param_in name="street_number" value=""/>
  <param_in name="street" value=""/>
  <param_in name="postal_box" value=""/>
  <param_in name="town" value=""/>
  <param_in name="region" value=""/>
  <param_in name="postal_code" value=""/>
  <param_in name="country" value=""/>
  <param_in name="internal_location" value=""/>
  <param_in name="facsimile_number" value=""/>
  <param_in name="telephone_number" value=""/>
  <param_in name="electronic_mail_address" value=""/>
  <param_in name="telex_number" value=""/>
  <param_in name="url" value=""/>
  <param_in name="located_pers_org" value=""/>
</template_example>

assigning_address
/assigning_address(address_class_name='', address_ecl_id='urn:plcs:rdl:std', name='', street_number='', street='', postal_box='', town='', region='', postal_code='', country='', internal_location='', facsimile_number='', telephone_number='', electronic_mail_address='', telex_number='', url='', located_pers_org='')/

Path

-- Instantiate an Address_assignment
Address_assignment

-- Set the Address_assignment attribute type to be ignored
Address_assignment.address_type = '/IGNORE'

-- Bind the Address_assignment to the parameter ^address_assgn.
-- The parameter is a reference parameter so the Address_assignment
-- entity can be referred to when this template is used.
%^address_assgn = Address_assignment%

-- Assign reference data to Address_assignment
/assigning_reference_data(
    items=^address_assgn,
    class_name=@address_class_name,
    ecl_id=@address_ecl_id)/

-- Instantiate and point at an entity Address
Address_assignment.assigned_address -> Address

-- Set the Address attributes
Address.name -> @name
Address.street_number -> @street_number
Address.street -> @street
Address.postal_box -> @postal_box
Address.town -> @town
Address.region -> @region
Address.postal_code -> @postal_code
Address.country -> @country
Address.internal_location -> @internal_location
Address.facsimile_number -> @facsimile_number
Address.telephone_number -> @telephone_number
Address.electronic_mail_address -> @electronic_mail_address
Address.telex_number -> @telex_number
Address.url -> @url

-- Bind the Address entity to the parameter ^address.
-- The parameter is a reference parameter so the Address
-- entity can be referred to when this template is used.
%^address = Address%

-- Assign the Address_assignment
-- to the instances passed into the template through the @located_pers_org
-- input parameter (e.g. a Person)
Address_assignment.located_person_organizations -> @located_pers_org
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Address_assignment.address_type '/IGNORE'

XML representation of path

<refpath
   template="assigning_address">
   <comment>
      Instantiate an Address_assignment
   </comment>
   <instantiate
      entity="Address_assignment"
      context="">
      
   </instantiate>
   <comment>
      Set the Address_assignment attribute type to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Address_assignment"
            attribute="address_type"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Bind the Address_assignment to the parameter ^address_assgn.
   </comment>
   <comment>
      The parameter is a reference parameter so the Address_assignment
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="address_assgn">
      <express_entity
         entity="Address_assignment"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Assign reference data to Address_assignment
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^address_assgn">
         
      </param_in>
      <param_in
         name="class_name"
         value="@address_class_name">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@address_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Instantiate and point at an entity Address
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address_assignment"
            attribute="assigned_address"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Address"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Set the Address attributes
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="name">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="street_number"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="street_number">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="street"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="street">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="postal_box"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="postal_box">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="town"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="town">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="region"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="region">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="postal_code"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="postal_code">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="country"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="country">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="internal_location"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="internal_location">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="facsimile_number"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="facsimile_number">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="telephone_number"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="telephone_number">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="electronic_mail_address"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="electronic_mail_address">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="telex_number"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="telex_number">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address"
            attribute="url"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="url">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Bind the Address entity to the parameter ^address.
   </comment>
   <comment>
      The parameter is a reference parameter so the Address
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="address">
      <express_entity
         entity="Address"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Assign the Address_assignment
   </comment>
   <comment>
      to the instances passed into the template through the @located_pers_org
   </comment>
   <comment>
      input parameter (e.g. a Person)
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Address_assignment"
            attribute="located_person_organizations"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="located_pers_org">
            
         </param_in_ref>
      </source>
   </assign>
</refpath>

© OASIS 2010 — All rights reserved