Template:— referencing_part (ref_part) Date: 2008/02/25 19:43:15
Revision: 1.12
Template: referencing_part

XML references to the Template

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

referencing_part

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="referencing_part" capability="representing_parts">
  <param name="part_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="part_id_class_name">
    <param_value>Part_identification_code</param_value>
    <description></description>
  </param>
  <param name="part_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="part_org_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="part_org_id_class_name">
    <param_value>Organization_name</param_value>
    <description></description>
  </param>
  <param name="part_org_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="part_vn_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="part_vn_id_class_name">
    <param_value>Version_identification_code</param_value>
    <description></description>
  </param>
  <param name="part_vn_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="part_vn_org_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="part_vn_org_id_class_name">
    <param_value>Organization_name</param_value>
    <description></description>
  </param>
  <param name="part_vn_org_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="referencing_part">
  <param_in name="part_id" value=""/>
  <param_in name="part_id_class_name" value="Part_identification_code"/>
  <param_in name="part_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="part_org_id" value=""/>
  <param_in name="part_org_id_class_name" value="Organization_name"/>
  <param_in name="part_org_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="part_vn_id" value=""/>
  <param_in name="part_vn_id_class_name" value="Version_identification_code"/>
  <param_in name="part_vn_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="part_vn_org_id" value=""/>
  <param_in name="part_vn_org_id_class_name" value="Organization_name"/>
  <param_in name="part_vn_org_id_ecl_id" value="urn:plcs:rdl:std"/>
</template_example>

referencing_part
/referencing_part(part_id='', part_id_class_name='Part_identification_code', part_id_ecl_id='urn:plcs:rdl:std', part_org_id='', part_org_id_class_name='Organization_name', part_org_id_ecl_id='urn:plcs:rdl:std', part_vn_id='', part_vn_id_class_name='Version_identification_code', part_vn_id_ecl_id='urn:plcs:rdl:std', part_vn_org_id='', part_vn_org_id_class_name='Organization_name', part_vn_org_id_ecl_id='urn:plcs:rdl:std')/

Path

Part

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

-- assign the identification to the Part
/assigning_identification(
    items=^part,
    id=@part_id,
    id_class_name=@part_id_class_name,
    id_ecl_id=@part_id_ecl_id,
    org_id=@part_org_id,
    org_id_class_name=@part_org_id_class_name,
    org_id_ecl_id=@part_org_id_ecl_id)/
%^part_id_assgn = $assigning_identification.id_assgn%

-- Define a Product category
Product_category
Product_category.id = '/IGNORE'
Product_category.name = 'part'
Product_category.description = '/IGNORE'

-- Product category assignment
Product_category_assignment
Product_category_assignment.products -> Part
Product_category_assignment.category -> Product_category

-- Instantiate Part version
Part_version

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

-- Relate the part_version to the part
Part_version.of_product -> ^part

-- Identify the Part_version
/assigning_identification(
    items=^part_version,
    id=@part_vn_id,
    id_class_name=@part_vn_id_class_name,
    id_ecl_id=@part_vn_id_ecl_id,
    org_id=@part_vn_org_id,
    org_id_class_name=@part_vn_org_id_class_name,
    org_id_ecl_id=@part_vn_org_id_ecl_id )/
%^part_version_id_assgn = $assigning_identification.id_assgn%
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Part.id '/IGNORE' Product.id
Part.name '/IGNORE' Product.name
Part.description '/IGNORE' Product.description
Product_category.id '/IGNORE'
Product_category.name 'part'
Product_category.description '/IGNORE'
Part_version.id '/IGNORE' Product_version.id
Part_version.description '/IGNORE' Product_version.description

XML representation of path

<refpath
   template="referencing_part">
   <instantiate
      entity="Part"
      context="">
      
   </instantiate>
   <comment>
      Mark the Part entity as
   </comment>
   <comment>
      referable when this template is used by binding it to the reference
   </comment>
   <comment>
      parameter part
   </comment>
   <bind
      parameter="part">
      <express_entity
         entity="Part"
         context="">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Part"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Part"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Part"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      assign the identification to the Part
   </comment>
   <call_template
      name="assigning_identification"
      business_context="">
      <param_in
         name="items"
         value="^part">
         
      </param_in>
      <param_in
         name="id"
         value="@part_id">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="@part_id_class_name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@part_id_ecl_id">
         
      </param_in>
      <param_in
         name="org_id"
         value="@part_org_id">
         
      </param_in>
      <param_in
         name="org_id_class_name"
         value="@part_org_id_class_name">
         
      </param_in>
      <param_in
         name="org_id_ecl_id"
         value="@part_org_id_ecl_id">
         
      </param_in>
   </call_template>
   <bind
      parameter="part_id_assgn">
      <template_instance
         template="assigning_identification"
         parameter="id_assgn">
         
      </template_instance>
   </bind>
   <comment>
      Define a Product category
   </comment>
   <instantiate
      entity="Product_category"
      context="">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Product_category"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Product_category"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" 'part' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Product_category"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Product category assignment
   </comment>
   <instantiate
      entity="Product_category_assignment"
      context="">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Product_category_assignment"
            attribute="products"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Part"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Product_category_assignment"
            attribute="category"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Product_category"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Instantiate Part version
   </comment>
   <instantiate
      entity="Part_version"
      context="">
      
   </instantiate>
   <comment>
      Mark the Part_version entity as referable when this template
   </comment>
   <comment>
      is used by binding it to the reference parameter ^part_version
   </comment>
   <bind
      parameter="part_version">
      <express_entity
         entity="Part_version"
         context="">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Part_version"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Part_version"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Relate the part_version to the part
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Part_version"
            attribute="of_product"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="part">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      Identify the Part_version
   </comment>
   <call_template
      name="assigning_identification"
      business_context="">
      <param_in
         name="items"
         value="^part_version">
         
      </param_in>
      <param_in
         name="id"
         value="@part_vn_id">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="@part_vn_id_class_name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@part_vn_id_ecl_id">
         
      </param_in>
      <param_in
         name="org_id"
         value="@part_vn_org_id">
         
      </param_in>
      <param_in
         name="org_id_class_name"
         value="@part_vn_org_id_class_name">
         
      </param_in>
      <param_in
         name="org_id_ecl_id"
         value="@part_vn_org_id_ecl_id ">
         
      </param_in>
   </call_template>
   <bind
      parameter="part_version_id_assgn">
      <template_instance
         template="assigning_identification"
         parameter="id_assgn">
         
      </template_instance>
   </bind>
</refpath>

© OASIS 2010 — All rights reserved