Properties in Requirements Domain Mapping File
The OSLC mapping file requirements-domain-mapping.json contains the following properties:
• requirementCollectionTypes
• requirementTypes
• query
• projects
|
• 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 requirements-domain-mapping.json file requires restart of Windchill RV&S OSLC Server.
|
requirementCollectionTypes Property
You can map various document types present in your Windchill RV&S server such as Requirement Documents, Test Documents, Specification Documents and so on, under the requirementCollectionTypes property.
For example:
In the example, T4 corresponds to mapped name of requirement document type as defined in the Windchill RV&S mapping file ResourcesNameMapping.xml located in the Windchill RV&S server. “name” and “nodeType” corresponding to T4 (requirement document) are provided for reference. “fields” contain the fields that are exposed when OSLC client applications query for Requirement Documents Service Provider. 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 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 Document Title field in the Windchill RV&S mapping file is “F11” and it is mapped with the “dcterms:title” 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: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 requirementCollectionTypes property. • The mappings are mentioned as an example. You must update the mappings based on 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 requirementCollectionTypes 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. |
query Property
The query property facilitates the query capabilities for querying or searching theWindchill RV&S requirements and requirement document 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.
For example:
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.
• 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 requirementCollectionTypes or requirementTypes properties. |
The following are some examples of OSLC query parameters for use with the query property attributes:
• oslc.where query parameter
GET https://localhost:3001/oslc/r/project/%2FProjects%2FRelease2/contents?oslc.where=dcterms:identifier=4
GET https://localhost:3001/oslc/r/project/%2FProjects%2FRelease2/contents?oslc.where=dcterms:title=a*
• oslc.orderBy query parameter
GET https://localhost:3001/oslc/r/project/%2FProjects%2FRelease2/contents?oslc.orderby=dcterms:identifier
The default sort order is ascending.
To request descending sort order, the request URI is as follows:
GET https://localhost:3001/oslc/r/project/%2FProjects%2FRelease2/contents?oslc.orderby=-dcterms:identifier
• oslc.select query parameter
GET https://localhost:3001/oslc/r/project/%2FProjects%2FRelease2/contents?oslc.select=dcterms:identifier,dcterms:title
• oslc.pageSize query parameter
https://localhost:3001/oslc/r/project/%2FProjects%2FRelease2/contents?oslc.pageSize=25
| The minimum page size is 25. If you specify page size less than 25, an error occurs. The maximum supported page size is 200. |
projects Property
You can map the backing type project present in the Windchill RV&S for discovery of projects under the projects property.
For example:
In the example, T1 corresponds to the mapped name of a backing type project as defined in the Windchill RV&S mapping file ResourcesNameMapping.xml located in the Windchill RV&S. “name” corresponding to T1 (project) is provided for reference. “fields” contain the fields that are exposed when OSLC client applications query for the All Projects Service Provider Catalog. The mapped name of the Project field in Windchill RV&S is “F08” and it is mapped with the "dcterms:title" OSLC field.
| • 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:identifier” 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. |
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. |