Requirements Domain Mapping File Example
This example pertains to the requirements domain but the logic can be used to map any supported domain.
* 
It is mandatory to define the "dcterms:identifier" OSLC field in the mapping file. This OSLC field must be mapped with an ID of the Windchill RV&S field.
It is recommended to map the "dcterms:title" OSLC field in the mapping file. PTC recommends this field to be mapped with a shorttext field type of Windchill RV&S.
The OSLC mapping file requirements-domain-mapping.json contains the following properties:
requirementCollectionTypes
requirementTypes
query
The requirements-domain-mapping.json file includes mapped names of types and fields. The file does not include display names of types and fields.
Any change to the domain mapping .json file requires a restart of Windchill RV&S OSLC Server.
The mappings are mentioned as an example (requirements domain). You must update the mappings based on the types and fields included in the Windchill RV&S mapping file ResourcesNameMapping.xml:
requirementTypes Property
You can map various node types present in your Windchill RV&S server such as Requirements, Test Cases, Specifications, and so on, under the requirementTypes property.
For example:
In the example, T3 corresponds to mapped name of requirement as defined in the Windchill RV&S mapping file ResourcesNameMapping.xml located in Windchill RV&S server. “name” corresponding to T3 (requirement) is provided for reference. “fields” contain the fields that are exposed when OSLC client applications query for various Service Provider and Service Provider Catalog resources. The following OSLC fields are mapped with the corresponding mapped names in the Windchill RV&S mapping file ResourcesNameMapping.xml:
"dcterms:identifier"
In the example, the mapped name of the ID field in the Windchill RV&S mapping file is “ID” and it is mapped with the “dcterms:identifier” OSLC field.
"dcterms:title"
In the example, the mapped name of the Live Item ID field in the Windchill RV&S mapping file is “F053” and it is mapped with the "dcterms:title" OSLC field.
"dcterms:description"
In the example, the mapped name of the Text field in the Windchill RV&S mapping file is “F112” and it is mapped with the "dcterms:description" OSLC field.
“dcterms:modified”
In the example, the mapped name of the Modified Date field in the Windchill RV&S mapping file is “F02” and it is mapped with the “dcterms:modified” OSLC field.
“dcterms:created”
In the example, the mapped name of the Created Date field in the Windchill RV&S mapping file is “F01” and it is mapped with the “dcterms:created” OSLC field.
“wrvs:state”
In the example, the mapped name of the State field in the Windchill RV&S mapping file is “F09” and it is mapped with the “wrvs:state” OSLC field.
If the value of the “returnsMappedName” parameter is set to false, the response returns “F09”.
If the value of the “returnsMappedName” parameter is set to true, the response returns field value of the State field.
* 
The “returnsMappedName” parameter set to true is required for the Type and State fields.
“wrvs:revision”
In the example, the mapped name of the Revision field in the Windchill RV&S mapping file is “F041” and it is mapped with the “wrvs:revision” OSLC field.
“wrvs:category”
In the example, the mapped name of the Category field in the Windchill RV&S mapping file is “F032” and it is mapped with the “wrvs:type” OSLC field.
“wrvs:type”
In the example, the mapped name of the Type field in the Windchill RV&S mapping file is “F011” and it is mapped with the “wrvs:type” OSLC field.
If the value of the “returnsMappedName” parameter is set to false, the response returns “F011”.
If the value of the “returnsMappedName” parameter is set to true, the response returns field value of the Type field.
* 
The “returnsMappedName” parameter set to true is required for the Type and State fields.
“wrvs:rootid”
In the example, the mapped name of the ROOT ID field in the Windchill RV&S mapping file is “F022” and it is mapped with the “wrvs:rootid” OSLC field.
* 
It is mandatory to include the “dcterms:identifier” and “dcterms:title” OSLC fields under the requirementTypes property.
The mappings are mentioned as an example. You must update the mappings based on the Windchill RV&S mapping file ResourcesNameMapping.xml.
You can similarly map the requirementCollectionTypes property.
query Property
The query property facilitates the query capabilities for querying or searching theWindchill RV&S domain resources. The query capabilities conform to the OSLC Core 3.0 specification. You can define various attributes for the query capabilities under the query property based on the domain properties.
For example (requirements domain):
You can define the following attributes:
where
The values for the where attribute define the allowed query parameters for querying or searching exposed OSLC fields provided by the Windchill RV&S OSLC Server. For this mapping, use simple fields such as short text, long text, and integer type. In addition, the where clause does not support multiple attributes with AND/OR operators.
orderby
The values for the orderby attribute define the allowed OSLC fields on which sort order can be set.
select
The values for the select attribute define the allowed OSLC fields that appear as columns in the delegated UI for resource selection and the OSLC fields that are returned in the response for client applications. If the select attribute is not defined, all OSLC fields mapped in the requirements-domain-mapping.json file are returned in the response for client applications or displayed in the delegated UI for resource selection.
* 
It is mandatory to specify the dcterms:title and dcterms:modified OSLC fields for the select attribute.
The sequence of the specified values for the select attribute determines the sequence of the allowed OSLC fields that appear as columns in the delegated UI for resource selection.
The values for the where, orderby, and select attributes must be fields defined under the domain-specific properties. For the requirements domain, these could be fields under requirementCollectionTypes or requirementTypes properties.
The mappings are mentioned as an example. You must update the mappings based on the Windchill RV&S mapping file ResourcesNameMapping.xml.
You can also map two OSLC fields with the same Windchill RV&S field. For example, you can map “dcterms:description” and “dcterms:title” OSLC fields with the mapped name of Document Title field (Windchill RV&S field) mentioned in the Windchill RV&S mapping file ResourcesNameMapping.xml.
For example:
To support resource previews for requirements collection and requirement types, the following fields are mapped with the corresponding field names defined in the Windchill RV&S mapping file ResourcesNameMapping.xml:
ID (mapped with the “ID” field)
Created By (mapped with the “F03” field)
Type (mapped with the “F011” field)
If the value of the “returnsMappedName” parameter is set to false, the response returns “F011”.
If the value of the “returnsMappedName” parameter is set to true, the response returns field value of the Type field.
* 
The “returnsMappedName” parameter set to true is required for the Type and State fields.
State (mapped with the “F09” field)
If the value of the “returnsMappedName” parameter is set to false, the response returns “F09”.
If the value of the “returnsMappedName” parameter is set to true, the response returns field value of the State field.
* 
The “returnsMappedName” parameter set to true is required for the Type and State fields.
Text (mapped with the “F010” field)
For example:
* 
The mappings are mentioned as an example. You must update the mappings based on the Windchill RV&S mapping file ResourcesNameMapping.xml.
* 
PTC recommends using field types other than long text with rich content, Query Backed Relationship (QBR), and relationships field types for small previews and the OSLC title field.