ProjectWise Component Services Guide
ProjectWise Component Services Guide
ProjectWise Component Services Guide
|
A component schema mapping file is an XML document that specifies how the importer maps from JSpace to the ProjectWise component index and data tables. The XML schema for the mapping file is provided to ensure that the XML document is valid as well as to document the valid options that are available for defining a map from JSpace to ProjectWise.
The following sample schema mapping shows how to map classes, index keys, attributes, and links in the mapping file:
<?xml version="1.0" encoding="UTF-8"?>
<SchemaMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SchemaMap.xsd" Source="JSpace">
<ClassMap Source="EQUIP" Destination="EC_Equip" SourceKey="TAG">
<AttributeMap Source="TAG" Destination="EC_IndexKey"/>
<AttributeMap Source="DESCRIPTION" Destination="EquipDesc"/>
<AttributeMap Source="TYPE" Destination="EquipType"/>
<AttributeMap Source="SUB_TYPE" Destination="EquipSubtype"/>
<LinkMap Source="$CONNECTED_TO" Destination="ConnectedTo"/>
</ClassMap>
</SchemaMap>
The XML element `ClassMap´ is used to define the mapping of a JSpace class to a ProjectWise class. Additionally, the `ClassMap´ element contains the mapping definitions for all the attributes and links of the class.
Source — the name of the class of the JSpace object to be indexed/imported.
SourceJsExpression — a JSpace expression that will be evaluated against each object to determine if this mapping definition should be used to index/import the object. Whenever it is not possible to use the value in a JSpace property.
SourceKey — the name of the JSpace property that is to be used as business key in the Component Index.
SourceKeyJsExpression — a JSpace expression that will be evaluated to generate the business key value in the Component Index.
SourceNativeIdJsExpression — a JSpace expression that will be evaluated to generate the native id value. If SourceNativeIdJsExpression is not defined, the JSpace object id will be used for the native id by default.
Destination — the name of the component class to be instanced.
The XML element `AttributeMap´ is used to define the mapping of JSpace properties to a ProjectWise attribute. The Importer will import all of the mapped values but will ignore any JSpace properties that are not mapped.
Source — the name of the JSpace property to be imported.
SourceJsExpression — a JSpace expression that will be evaluated against a JSpace object to generate the attribute value.
Destination — the name of the ProjectWise attribute to receive the value.
The XML element `LinkMap´ is used to define the mapping from a JSpace relationship to a ProjectWise component link. The Importer will link all imported components according to the specified JSpace relationships.
Source — the name of the JSpace relationship to map to the link class.
Destination — the name of the link class that is to be used to create the links.
The following tables describe what the JSpace definitions and instances become once imported into ProjectWise.
Definitions
JSpace |
ProjectWise |
|---|---|
Class |
Class (maps to component data table) |
Property |
Attribute (maps to a column in a component data table) |
Relationship |
Link Class (maps to a component link table) |
Instances
JSpace |
ProjectWise |
|---|---|
Object |
Row in a component data table |
Related objects |
Row in a component link table |