Template:— assigning_organization (asg_org) Date: 2009/04/03 13:54:35
Revision: 1.28
Template: assigning_organization

XML references to the Template

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

assigning_organization

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_organization" capability="assigning_organization">
  <param name="org_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="org_id_class_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="org_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="org_assgn_class_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="org_assgn_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="items">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_organization">
  <param_in name="org_id" value=""/>
  <param_in name="org_id_class_name" value=""/>
  <param_in name="org_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="org_assgn_class_name" value=""/>
  <param_in name="org_assgn_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="items" value=""/>
</template_example>

assigning_organization
/assigning_organization(org_id='', org_id_class_name='', org_id_ecl_id='urn:plcs:rdl:std', org_assgn_class_name='', org_assgn_ecl_id='urn:plcs:rdl:std', items='')/

Path

-- Instantiate representing_organization
-- NOTE - representing_organization should only be instantiated once for
-- each organization
/representing_organization(
    org_id=@org_id,
    org_id_ecl_id=@org_id_ecl_id,
    org_id_class_name=@org_id_class_name)/

-- Bind Organization instantiated by the representing_organization
-- template to the ^organization parameter.
-- The parameter is a reference parameter so that the Organization
-- entity can be referred to when this template is used.
%^organization = $representing_organization.org%

-- Instantiate an Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment

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

-- Set the Organization_or_person_in_organization_assignment
-- role attribute to be ignored
Organization_or_person_in_organization_assignment.role = '/IGNORE'

-- Assign the organization to the
-- Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment.assigned_entity -> ^organization

-- classify the Organization_or_person_in_organization_assignment
/assigning_reference_data(
    items=^organization_assgn,
    class_name=@org_assgn_class_name,
    ecl_id=@org_assgn_ecl_id)/

-- Assign the Organization_or_person_in_organization_assignment.items
-- to the instances passed into the template through the @items
-- input parameter
Organization_or_person_in_organization_assignment.items -> @items
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Organization_or_person_in_organization_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="assigning_organization">
   <comment>
      Instantiate representing_organization
   </comment>
   <comment>
      NOTE - representing_organization should only be instantiated once for
   </comment>
   <comment>
      each organization
   </comment>
   <call_template
      name="representing_organization"
      business_context="">
      <param_in
         name="org_id"
         value="@org_id">
         
      </param_in>
      <param_in
         name="org_id_ecl_id"
         value="@org_id_ecl_id">
         
      </param_in>
      <param_in
         name="org_id_class_name"
         value="@org_id_class_name">
         
      </param_in>
   </call_template>
   <comment>
      Bind Organization instantiated by the representing_organization
   </comment>
   <comment>
      template to the ^organization parameter.
   </comment>
   <comment>
      The parameter is a reference parameter so that the Organization
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="organization">
      <template_instance
         template="representing_organization"
         parameter="org">
         
      </template_instance>
   </bind>
   <comment>
      Instantiate an Organization_or_person_in_organization_assignment
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="">
      
   </instantiate>
   <comment>
      Bind the Organization_or_person_in_organization_assignment
   </comment>
   <comment>
      to the parameter ^organization_assgn
   </comment>
   <comment>
      The parameter is a reference parameter so the
   </comment>
   <comment>
      Organization_or_person_in_organization_assignment entity can be
   </comment>
   <comment>
      referred to when this template is used.
   </comment>
   <bind
      parameter="organization_assgn">
      <express_entity
         entity="Organization_or_person_in_organization_assignment"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Set the Organization_or_person_in_organization_assignment
   </comment>
   <comment>
      role attribute to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="role"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Assign the organization to the
   </comment>
   <comment>
      Organization_or_person_in_organization_assignment
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="assigned_entity"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="organization">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      classify the Organization_or_person_in_organization_assignment
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^organization_assgn">
         
      </param_in>
      <param_in
         name="class_name"
         value="@org_assgn_class_name">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@org_assgn_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Assign the Organization_or_person_in_organization_assignment.items
   </comment>
   <comment>
      to the instances passed into the template through the @items
   </comment>
   <comment>
      input parameter
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="items"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="items">
            
         </param_in_ref>
      </source>
   </assign>
</refpath>

© OASIS 2010 — All rights reserved