Template:— assigning_location (asg_locn) Date: 2008/03/08 15:14:34
Revision: 1.22

This section specifies the template assigning_location.

NOTE  An explanation of a template and the associated instantiation path is provided in the Template overview section.

Description
This template describes the assignment of a location to an entity_for_location.
Model diagrams
The EXPRESS-G diagram in Figure 1 shows the templates and EXPRESS entities that are required to represent the template "assigning_location". The text highlighted in blue shows the template parameters.


Figure 1 —  Template Configuration for Assigning Location

Figure 1 —  Template Configuration for Assigning Location

The graphic for the template to be used in other EXPRESS-G diagrams is shown in Figure  2 below.


Figure 2 —  Template Usage

Figure 2 —  Template Usage

Input parameters
The following input parameters are defined for this template:
la_class_name (Default=Location_assignment_role,Type='CLASS')
The type of class used to classify the location assignment and so provide the role or reason for the assignment.
The following classes and their sub-classes can be used:
classifications: "Location_assignment_role" (urn:plcs:rdl:std:Location_assignment_role)
la_ecl_id (Default=urn:plcs:rdl:std,Type='URN', Optional)
The id of the External_class_library storing the la_class_name class
loc_id (Default=unknown,Type='STRING')
The location identifier being assigned.
loc_id_class_name (Default=Location_identification_code,Type='CLASS')
The name of the class used to classify the location identifier and so provide the role or reason for the location
The following classes and their sub-classes can be used:
classifications: "Location_identification_code" (urn:plcs:rdl:std:Location_identification_code)
loc_id_ecl_id (Default=urn:plcs:rdl:std,Type='URN', Optional)
The id of the External_class_library storing the loc_id_class_name class
loc_org_id (Type='STRING')
The name or identifier of the organization responsible for the location representation
loc_org_id_class_name (Default=Organization_name,Type='CLASS', Optional)
The name of the class being used to classify the identification (Identification_assignment) of the organization responsible for the location representation
The following classes and their sub-classes can be used:
classifications: "Organization_identification_code" (urn:plcs:rdl:std:Organization_identification_code), "Organization_name" (urn:plcs:rdl:std:Organization_name)
loc_org_id_ecl_id (Default=urn:plcs:rdl:std,Type='URN', Optional)
The identifier of the External_class_library storing the definition of the class used to classify the organization identifier.
entity_for_location (Type= 'SELECT (location_assignment_select)' )
The entities to which the location may be assigned
alt_locn_rep (Type= 'ENTITY (Location_representation)' , Optional)
The alternative entities to which the location may be assigned. It may be used together with this template by using the reference parameter ^location and its attribute alt_locn_rep: ^location.alt_locn_rep
Reference parameters
The following reference parameters are defined for this template:
locn_asst(Type='ENTITY (Location_assignment)')
Allow the Location_assignment entity instantiated in this path to be referenced when this template is used.
Note: The Location_assignment entity can be referenced in a template path by:
%^target = $assigning_location.locn_asst%
where target is the parameter to which the Location_assignment is bound.
For example, to identify the date of a location assignment by assigning a date to the Location_assignment entity. E.g.
              -- The template assigning_location has an external reference
              -- locn_asst. Bind this to the local external reference
              -- location_assignment. It can now be the target for assigned dates
              %^locn_asst = $assigning_location.locn_asst%
              -- assign date to location_assignment in the role of "planned_start_date"
              /assigning_calendar_date(items=^locn_asst,
              date_class_name='Planned_start_date',
              date_ecl_id='urn:plcs:rdl:std',
              year=@2005,
              month=@4,
              day=@5)/
            
location(Type='ENTITY (Location)')
Allow the Location entity instantiated in this path to be referenced when this template is used.
Note: The Location entity can be referenced in a template path by:
%^target = $assigning_location.location%
where target is the parameter to which the Location is bound.
For example, to identify the name of a location by assigning an identification to the Location entity. E.g.
              -- The template assigning_location has an external reference
              -- location. Bind this to the local external reference
              -- Location. It can now be the target for assignments 
              %^location = $representing_location.location%
              -- assign 'Home' to the location in the role of "Name"
              -- as known by organisation with the name "Company_name".
              /assigning_identification(items=^location, 
              id='Home', 
              id_class_name='Name',
              id_ecl_id='urn:plcs:rdl:std'
              org_id='Company_name'
              org_id_class_name='Organization_name'
              org_id_ecl_id='urn:plcs:rdl:std')/          
            
Instantiation path
The instantiation path shown below specifies the entities that are to be instantiated by the template.
A description of templates and the syntax for the instantiation path is provided in the Reading Capability Templates help section.
-- 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'
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/assigning_location(entity_for_location='#93', la_class_name='Location_for_activity', la_ecl_id='urn:plcs:rdl:std', loc_id='Plymouth', loc_id_class_name='Location_identification_code', loc_id_ecl_id='urn:plcs:rdl:std', org_id='Express Delivery Inc', org_id_class_name='Organization_name', org_id_ecl_id='urn:plcs:rdl:std')/
(an illustration of the consolidated assigning_location template is shown in Figure 4 below.)
Note that the assigning_reference_data and assigning_identification templates are used in the diagram. Namely:
/assigning_reference_data(items='#94', class_name='Location_for_activity', ecl_id='urn:plcs:rdl:std')/
/assigning_identification(items='#95', id='Plymouth', id_class_name='Location_identification_code', id_ecl_id='urn:plcs:rdl:std', org_id='Express Delivery Inc', org_id_class_name='Organization_name', org_id_ecl_id='urn:plcs:rdl:std')/


Figure 3 —  Instantiation of Template Components

Figure 3 —  Instantiation of Template Components

The instance diagram in Figure 4 shows the graphic symbol for the template that is to be used in other instance diagrams. The example template is:
/assigning_location(entity_for_location='#93', la_class_name='Location_for_activity', la_ecl_id='urn:plcs:rdl:std', loc_id='Plymouth', loc_id_class_name='Location_identification_code', loc_id_ecl_id='urn:plcs:rdl:std', org_id='Express Delivery Inc', org_id_class_name='Organization_name', org_id_ecl_id='urn:plcs:rdl:std')/


Figure 4 —  Consolidated Template Instantiation

Figure 4 —  Consolidated Template Instantiation

Characterizations
The following section details how the assigning_location template can be optionally characterized by assigning other constructs to it. These are characterizations commonly applied to the template. The ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.
The following characterizations may apply:
Characterization Assigning date

NOTE   this characterization is optional.

Dates can be associated with the assignment of a location_assignment by using the template assigning_calendar_date. For example, the planned start and end date of a location assigned to an instance of Location_assignment.



Figure 5 —  Template Configuration with Optional Calendar Date Assignment.

Figure 5 —  Template Configuration with Optional Calendar Date Assignment.

When instantiating the templates for assigning a date to a referenced location_assignment this requires the use of the reference parameter $assigning_location.locn_asst to identify the assigning_location instantiated by the template Location_assignment).

Characterization Assigning reference data

NOTE   this characterization is optional.

Reference data can be associated with the location instance by using the template assigning_reference_data. For example, the type of location may be assigned to an instance of Location.



Figure 6 —  Template Configuration with Optional Calendar Date, Reference Data and Identification Assignment

Figure 6 —  Template Configuration with Optional Calendar Date, Reference Data and Identification Assignment

Care needs to be taken to avoid potential conflicts with the (optional - [0:?]) alternative_location_representations attribute as the subtypes of Location_representation provide the major typing mechanism for this part of the model. Also note that these subtypes are handled in a separate set of templates.

NOTE    The mechanism for assigning reference data to a location is shown in figure Figure 6.

Characterization Assigning identifiers

NOTE   this characterization is optional.

Further Identifiers can be associated with an instance of location_assignment by using the template assigning_identification. For example, an id may be assigned to an instance of Location_assignment, if required.

NOTE    The mechanism for assigning identifier is shown in figure Figure 6.

Characterization Location Relationships

NOTE   this characterization is optional.

Two Locations can be associated together by a Location_relationship with the relationship classified appropriately to describe the role (or purpose) of the relationship. This can be achieved by using the templates assigning_location and assigning_reference_data. There may be two assigning_location templates used, which create different Locations for one (or more) entities (e.g. activity). The relationship is classified as a type of "Location_relationship_role" (urn:plcs:rdl:std:Location_relationship_role) (or sub-class, e.g. "Alternative_location" (urn:plcs:rdl:std:Alternative_location)) using the assigning_reference_data template. This is shown in the figure below.



Figure 7 —  Template Configuration for Location Relationships

Figure 7 —  Template Configuration for Location Relationships

NOTE    Due to the simplicity, no separate template has been created for representing these relationships.

© OASIS 2008 — All rights reserved