ProjectWise Component Services Guide
ProjectWise Component Services Guide
ProjectWise Component Services Guide

Creating a Component Schema Mapping File

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.

Sample schema mapping

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>

Mapping classes

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.

Examples:
  1. <ClassMap Source="EQUIP" Destination="EQUIP" SourceKey="TAG">

  2. <ClassMap SourceJsExpression ="CLASS("EQUIP") AND TYPE="PUMP"" Destination="PUMP" SourceKey="TAG">

  3. <ClassMap Source="EQUIP" Destination="EQUIP" SourceKeyJsExpression="TAG">

  4. <ClassMap Source="EQUIP" Destination="EQUIP" SourceKey="TAG" SourceNativeIdJsExpression="GET_OBJECT_ID()">

Mapping attributes

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.

Examples:
  1. <AttributeMap Source="TYPE" Destination="EQUIP_TYPE" />

  2. <AttributeMap SourceJsExpression="PID_LINE\\SERVICE" Destination="EQUIP_SYSTEM" />

Mapping links

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.

Examples:
  1. <LinkMap Source="ASSOCIATED" Destination="EquipAssociated" />

  2. <LinkMap Source="MEMBERS" Destination="ProcessLineMembers" />

Mapping Between JSpace and ProjectWise

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