Value Reference Mapping
Defines alias for mapping path which can be used in mapped name and required attributes in element mapping section, we will use this to reduce duplicated mappings. This will contain two kinds of paths:
Path No. 01: Element which holds a reference to the current element, as follows:
<Specific_item_classification uid="uid">
<Associated_item>ref_uid</Associated_item>
<Classification_name>assembly</Classification_name>
</Specific_item_classification>
<Item uid="ref_uid">
</Item>
Path No. 2: Element which is referenced by current element, as follows:
<Document_file uid="uid">
<File_format>ref_uid</File_format>
</Document_file>
<Document_format_property uid="ref_uid">
<Data_format>ApplicationData</Data_format>
</Document_format_property>
Parent Name : value_reference_mapping/value_reference
Name
Type
Data Type
Req?
Description
exceptions
Element
Element
No
Used with type attribute in element mapping to define different value reference mapping for different attribute value.
reference_to
Element
Element
No
Element mapping which current element will reference
sub_value_reference
Element
Element
No
Sub value reference mapping, used for Path No. 2 only
name
Attribute
ID
Yes
Unique name of value reference element
path
Attribute
String
No
Related path to store/retrieve value, used for Path No. 1 only. Path also supports value references and comma separated values. Refer to mapping.xsd for more details.
condition
Attribute
String
No
Condition to filter the element, used for Path No. 1 only, support following pattern only:<key=<value>
mapped_name
Attribute
String
No
Parent element name for the path, used for Path No. 1 only.
type
Attribute
String
No
For Path No. 1: The relative path to check if current element is a supported Windchill tag. for example, Item_shape will also be used to represent representation and EPMDescribeLink .
For Path No .2: The element name which will be create as reference, this should be sub element.
ref_attribute
Attribute
String
No
The relative path which keeps the object reference, used for Path No. 1 only.
connect_reference
Attribute
String
No
The sub element which will be used as reference.
multiple_instances
Attribute
String
No
To maintain the multiple instances of the describe elements (i.e. that has ‘mapped_name’ and ‘ref_attribute’) associated with root element or current element. This is needed when the root element has no direct link with the described element.
reuse
Attribute
Boolean
No
Defines if this element is reusable, work with locate_by attribute together to find previous created element instead of create new one all the time.
locate_by
Attribute
String
No
Defines the attribute list of a reusable element, separated by a comma (,).
ref_type
Attribute
String
No
The element name which will be create as reference, this should be root element, used for Path No. 2 only.
required_attributes
Attribute
String
No
Attributes which are required for current element, separated by a comma (,).It can be relative path and alias path.
attribute_name
Attribute
String
No
The relative path which will be used to hold reference or attribute value, used for Path No. 2 only. If identifier is configured, it will be used to store the name of attribute.
identifier
Attribute
String
No
The relative path which will be used to hold attribute value, works with attribute_name together to store attribute name and value.
Separator
Attribute
String
No
Splits the value associated with this attribute based on the given separator value. Assigns each part of this value to the various sections as specified in the path Attribute.
Parent Name : exceptions
Name
Type
Data Type
Req?
Description
sub_value_reference
element
element
No
Sub value reference mapping, used for Path No. 2 only
attribute_name
attribute
string
No
The relative path which will be used to hold reference or attribute value, used for Path No. 2 only.
value
attribute
string
No
The attribute value to choose current exception configuration.
ref_type
attribute
string
No
The element name which will be create as reference, this should be sub element, used for Path No. 2 only.
type
attribute
string
No
The element name which will be create as reference, this should be root element, used for Path No. 2 only.
required_attributes
attribute
string
No
Attributes which are required for current element, separated by a comma (,).It can be relative path and alias path.
Parent Name : sub_value_reference_type
Name
Type
Data Type
Req?
Description
add_to_element
element
element
No
Element mapping which current element will be added to.
reference_to
element
element
No
Element mapping which current element will reference it.
attribute_name
attribute
string
No
The relative path which will be used to hold reference or attribute value, used for Path No. 2 only. If identifier is configured, it will be used to store the name of attribute.
required_attributes
attribute
string
No
Attributes which are required for current element, separated by a comma (,).It can be relative path and alias path.
connect_reference
attribute
string
No
The sub element which will be used as reference
ref_type
attribute
string
No
The element name which will be create as reference, this should be root element, used for Path No. 2 only.
unit_attribute_name
attribute
string
No
The relative path which will be used to hold unit attribute value. Used for Path No. 2 and iba only.
reuse
attribute
boolean
No
Defines if this element is reusable, work with locate_by attribute together to find previous created element instead of create new one all the time.
locate_by
attribute
string
No
Defines the attribute list of a reusable element, separated by a comma (,).
identifier
attribute
string
No
The relative path which will be used to hold attribute value, works with attribute_name together to store attribute name and value.
format
Attribute
String
No
Format Numeric values as per requirement. For instance in dates, days, months, hours & minutes should be displayed in format '00' though the actual date is less then 10. Applicable only for numeric values
Parent Name : add_to_element
Name
Type
Data Type
Req?
Description
name
attribute
string
Yes
Path which is used to add current element to another element. It can be relative path and alias path.
value
attribute
string
Yes
The value which will be used to find parent element.
Parent Name : reference_to
Name
Type
Data Type
Req?
Description
name
attribute
string
Yes
Path which is used to reference another element. It can be relative path and alias path.
value
attribute
string
Yes
The value which will be used to find another element.
connect_reference
attribute
string
Yes
The sub element which will be used as reference
parent_reference_attribute
attribute
string
No
The attribute is created to cater very special condition. when the current element unable to identify the correct root element. The attribute is used to identify the intermediates objects from the parent element. The intermediate object is then compared with the ‘name’ object.
Example: Next_assembly_usage_occurence is linked to product_deifnitions and Transformation is linked with shape_representation of the products. While import to compare the correct shape representation, one has to traverse from instance product_definition to shape_representation.
Tips
Use the following pattern to define value attribute:
{ROOT}/usedBy/ObjectReference/ufid, this means to get the value of attribute named usedBy/ObjectReference/ufid from the current element.
這是否有幫助?