Template:— assigning_document_reference (asg_doc_ref) Date: 2010/01/28 15:27:38
Revision: 1.12
Template: assigning_document_reference

XML references to the Template

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

assigning_document_reference

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_document_reference" capability="representing_documents">
  <param name="doc_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="doc_id_class_name">
    <param_value>Document_identification_code</param_value>
    <description></description>
  </param>
  <param name="doc_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="doc_ver_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="doc_ver_id_class_name">
    <param_value>Version_identification_code</param_value>
    <description></description>
  </param>
  <param name="doc_ver_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="org_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="org_id_class_name">
    <param_value>Organization_name</param_value>
    <description></description>
  </param>
  <param name="org_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="doc_asg_class_name">
    <param_value>Document_reference</param_value>
    <description></description>
  </param>
  <param name="doc_asg_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="is_assigned_to">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_document_reference">
  <param_in name="doc_id" value=""/>
  <param_in name="doc_id_class_name" value="Document_identification_code"/>
  <param_in name="doc_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="doc_ver_id" value=""/>
  <param_in name="doc_ver_id_class_name" value="Version_identification_code"/>
  <param_in name="doc_ver_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="org_id" value=""/>
  <param_in name="org_id_class_name" value="Organization_name"/>
  <param_in name="org_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="doc_asg_class_name" value="Document_reference"/>
  <param_in name="doc_asg_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="is_assigned_to" value=""/>
</template_example>

assigning_document_reference
/assigning_document_reference(doc_id='', doc_id_class_name='Document_identification_code', doc_id_ecl_id='urn:plcs:rdl:std', doc_ver_id='', doc_ver_id_class_name='Version_identification_code', doc_ver_id_ecl_id='urn:plcs:rdl:std', org_id='', org_id_class_name='Organization_name', org_id_ecl_id='urn:plcs:rdl:std', doc_asg_class_name='Document_reference', doc_asg_ecl_id='urn:plcs:rdl:std', is_assigned_to='')/

Path

Document

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

-- assign the identification to the Document
/assigning_identification(
    items=^doc,
    id=@doc_id,
    id_class_name=@doc_id_class_name,
    id_ecl_id=@doc_id_ecl_id,
    org_id=@org_id,
    org_id_class_name=@org_id_class_name,
    org_id_ecl_id=@org_id_ecl_id)/

-- Mark the Document_version entity as
-- referable when this template is used by binding it to the reference
-- parameter doc_vn
Document_version
%^doc_vn = Document_version%
Document_version.id = '/IGNORE'
Document_version.description = '/IGNORE'
Document_version.of_product -> ^doc

-- assign the identification to the Document_version
/assigning_identification(
    items=^doc_vn,
    id=@doc_ver_id,
    id_class_name=@doc_ver_id_class_name,
    id_ecl_id=@doc_ver_id_ecl_id,
    org_id=@org_id,
    org_id_class_name=@org_id_class_name,
    org_id_ecl_id=@org_id_ecl_id)/

-- assign the referenced document to the entity given by the
-- input parameter @is_assigned_to
-- and classify it as 'Document_reference' or subtype thereof
/assigning_document(
    assigned_document=^doc_vn,
    is_assigned_to=@is_assigned_to,
    doc_ass_role=@doc_asg_class_name,
    doc_ar_ecl_id=@doc_asg_ecl_id)/

-- Mark the Document_assignment entity in the template assigning_document as
-- referable when this template is used by binding it to the reference
-- parameter doc_asg
%^doc_asg = $assigning_document.doc_asg%
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Document.id '/IGNORE' Product.id
Document.name '/IGNORE' Product.name
Document.description '/IGNORE' Product.description
Document_version.id '/IGNORE' Product_version.id
Document_version.description '/IGNORE' Product_version.description

XML representation of path

<refpath
   template="assigning_document_reference">
   <instantiate
      entity="Document"
      context="">
      
   </instantiate>
   <comment>
      Mark the Document entity as
   </comment>
   <comment>
      referable when this template is used by binding it to the reference
   </comment>
   <comment>
      parameter doc
   </comment>
   <bind
      parameter="doc">
      <express_entity
         entity="Document"
         context="">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      assign the identification to the Document
   </comment>
   <call_template
      name="assigning_identification"
      business_context="">
      <param_in
         name="items"
         value="^doc">
         
      </param_in>
      <param_in
         name="id"
         value="@doc_id">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="@doc_id_class_name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@doc_id_ecl_id">
         
      </param_in>
      <param_in
         name="org_id"
         value="@org_id">
         
      </param_in>
      <param_in
         name="org_id_class_name"
         value="@org_id_class_name">
         
      </param_in>
      <param_in
         name="org_id_ecl_id"
         value="@org_id_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Mark the Document_version entity as
   </comment>
   <comment>
      referable when this template is used by binding it to the reference
   </comment>
   <comment>
      parameter doc_vn
   </comment>
   <instantiate
      entity="Document_version"
      context="">
      
   </instantiate>
   <bind
      parameter="doc_vn">
      <express_entity
         entity="Document_version"
         context="">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document_version"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document_version"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Document_version"
            attribute="of_product"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="doc">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      assign the identification to the Document_version
   </comment>
   <call_template
      name="assigning_identification"
      business_context="">
      <param_in
         name="items"
         value="^doc_vn">
         
      </param_in>
      <param_in
         name="id"
         value="@doc_ver_id">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="@doc_ver_id_class_name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@doc_ver_id_ecl_id">
         
      </param_in>
      <param_in
         name="org_id"
         value="@org_id">
         
      </param_in>
      <param_in
         name="org_id_class_name"
         value="@org_id_class_name">
         
      </param_in>
      <param_in
         name="org_id_ecl_id"
         value="@org_id_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      assign the referenced document to the entity given by the
   </comment>
   <comment>
      input parameter @is_assigned_to
   </comment>
   <comment>
      and classify it as 'Document_reference' or subtype thereof
   </comment>
   <call_template
      name="assigning_document"
      business_context="">
      <param_in
         name="assigned_document"
         value="^doc_vn">
         
      </param_in>
      <param_in
         name="is_assigned_to"
         value="@is_assigned_to">
         
      </param_in>
      <param_in
         name="doc_ass_role"
         value="@doc_asg_class_name">
         
      </param_in>
      <param_in
         name="doc_ar_ecl_id"
         value="@doc_asg_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Mark the Document_assignment entity in the template assigning_document as
   </comment>
   <comment>
      referable when this template is used by binding it to the reference
   </comment>
   <comment>
      parameter doc_asg
   </comment>
   <bind
      parameter="doc_asg">
      <template_instance
         template="assigning_document"
         parameter="doc_asg">
         
      </template_instance>
   </bind>
</refpath>

© OASIS 2010 — All rights reserved