Template:— assigning_location (asg_locn) Date: 2010/03/22 15:24:26
Revision: 1.23
Template: assigning_location

XML references to the Template

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

assigning_location

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_location" capability="assigning_location">
  <param name="la_class_name">
    <param_value>Location_assignment_role</param_value>
    <description></description>
  </param>
  <param name="la_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="loc_id">
    <param_value>unknown</param_value>
    <description></description>
  </param>
  <param name="loc_id_class_name">
    <param_value>Location_identification_code</param_value>
    <description></description>
  </param>
  <param name="loc_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="loc_org_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="loc_org_id_class_name">
    <param_value>Organization_name</param_value>
    <description></description>
  </param>
  <param name="loc_org_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="entity_for_location">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="alt_locn_rep">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_location">
  <param_in name="la_class_name" value="Location_assignment_role"/>
  <param_in name="la_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="loc_id" value="unknown"/>
  <param_in name="loc_id_class_name" value="Location_identification_code"/>
  <param_in name="loc_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="loc_org_id" value=""/>
  <param_in name="loc_org_id_class_name" value="Organization_name"/>
  <param_in name="loc_org_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="entity_for_location" value=""/>
  <param_in name="alt_locn_rep" value=""/>
</template_example>

assigning_location
/assigning_location(la_class_name='Location_assignment_role', la_ecl_id='urn:plcs:rdl:std', loc_id='unknown', loc_id_class_name='Location_identification_code', loc_id_ecl_id='urn:plcs:rdl:std', loc_org_id='', loc_org_id_class_name='Organization_name', loc_org_id_ecl_id='urn:plcs:rdl:std', entity_for_location='', alt_locn_rep='')/

Path

-- Mark the Location entity as
-- referable when this template is used by binding it to the reference
-- parameter location
%^location = Location%
Location.description = '/IGNORE'
Location.name = '/IGNORE'

-- If the optional alt loc rep is provided then link to Location
Location.alternative_location_representations -> @alt_locn_rep

-- assign an identifier and classify it with input params
/assigning_identification(
    items=^location,
    id=@loc_id,
    id_class_name=@loc_id_class_name,
    id_ecl_id=@loc_id_ecl_id,
    org_id=@loc_org_id,
    org_id_class_name=@loc_org_id_class_name,
    org_id_ecl_id=@loc_org_id_ecl_id )/

-- Mark the location_assignment entity as
-- referable when this template is used by binding it to the reference
-- parameter id_assgn
%^locn_asst = Location_assignment%
Location_assignment.description = '/IGNORE'
Location_assignment.role = '/IGNORE'
Location_assignment.location_for_assignment -> ^location
Location_assignment.entity_for_location -> @entity_for_location

-- provide the role of the identification by classifying the location_assignment
/assigning_reference_data(
    items=^locn_asst,
    class_name=@la_class_name,
    ecl_id=@la_ecl_id)/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Location.description '/IGNORE'
Location.name '/IGNORE'
Location_assignment.description '/IGNORE'
Location_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="assigning_location">
   <comment>
      Mark the Location entity as
   </comment>
   <comment>
      referable when this template is used by binding it to the reference
   </comment>
   <comment>
      parameter location
   </comment>
   <bind
      parameter="location">
      <express_entity
         entity="Location"
         context="">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Location"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Location"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      If the optional alt loc rep is provided then link to Location
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Location"
            attribute="alternative_location_representations"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="alt_locn_rep">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      assign an identifier and classify it with input params
   </comment>
   <call_template
      name="assigning_identification"
      business_context="">
      <param_in
         name="items"
         value="^location">
         
      </param_in>
      <param_in
         name="id"
         value="@loc_id">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="@loc_id_class_name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@loc_id_ecl_id">
         
      </param_in>
      <param_in
         name="org_id"
         value="@loc_org_id">
         
      </param_in>
      <param_in
         name="org_id_class_name"
         value="@loc_org_id_class_name">
         
      </param_in>
      <param_in
         name="org_id_ecl_id"
         value="@loc_org_id_ecl_id ">
         
      </param_in>
   </call_template>
   <comment>
      Mark the location_assignment entity as
   </comment>
   <comment>
      referable when this template is used by binding it to the reference
   </comment>
   <comment>
      parameter id_assgn
   </comment>
   <bind
      parameter="locn_asst">
      <express_entity
         entity="Location_assignment"
         context="">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="role"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="location_for_assignment"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="location">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="entity_for_location"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="entity_for_location">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      provide the role of the identification by classifying the location_assignment
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^locn_asst">
         
      </param_in>
      <param_in
         name="class_name"
         value="@la_class_name">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@la_ecl_id">
         
      </param_in>
   </call_template>
</refpath>

© OASIS 2010 — All rights reserved