Template:— swedish_defence_assigning_document_reference (sd_asg_doc_ref)
Context:— FMV
Date: 2008/02/21 16:26:08
Revision: 1.2
Template: swedish_defence_assigning_document_reference

XML references to the Template

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

swedish_defence_assigning_document_reference

Set up a hyperlink to the template definition.
<template_ref name="swedish_defence_assigning_document_reference" context="FMV" />

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="swedish_defence_assigning_document_reference" context="FMV" >
  <param name="id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="id_class_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="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></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></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="swedish_defence_assigning_document_reference">
  <param_in name="id" value=""/>
  <param_in name="id_class_name" value=""/>
  <param_in name="id_ecl_id" value="urn:plcs:rdl:std"/>
  <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="doc_asg_class_name" value=""/>
  <param_in name="doc_asg_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="is_assigned_to" value=""/>
</template_example>

swedish_defence_assigning_document_reference
/swedish_defence_assigning_document_reference(id='', id_class_name='', id_ecl_id='urn:plcs:rdl:std', org_id='', org_id_class_name='', org_id_ecl_id='urn:plcs:rdl:std', doc_asg_class_name='', 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=@id,
    id_class_name=@id_class_name,
    id_ecl_id=@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,
    is_assigned_to=@is_assigned_to,
    doc_ass_role=@doc_asg_class_name,
    doc_ar_ecl_id=@doc_asg_ecl_id)/
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

XML representation of path

<refpath
   template="swedish_defence_assigning_document_reference">
   <instantiate
      entity="Document"
      context="FMV">
      
   </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="FMV">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="FMV">
      <target>
         <express_attribute
            entity="Document"
            attribute="id"
            context="FMV">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="FMV">
      <target>
         <express_attribute
            entity="Document"
            attribute="name"
            context="FMV">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="FMV">
      <target>
         <express_attribute
            entity="Document"
            attribute="description"
            context="FMV">
            
         </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="FMV">
      <param_in
         name="items"
         value="^doc">
         
      </param_in>
      <param_in
         name="id"
         value="@id">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="@id_class_name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@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="FMV">
      <param_in
         name="assigned_document"
         value="^doc">
         
      </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>
</refpath>

© OASIS 2010 — All rights reserved