Shape documents

A shape document in OSLC is an electronic way to see what a resource looks like including all of its dependencies, attributes, and properties. For example, a work task shape document lists the work task resource details.

Shape documents cover all resources, including assets, companies, purchase orders, and work tasks. A shape document also shows what is required. The resource shape document can include links to the shape documents for the child objects. RDF/XML is used as the format for the shape document.

A resource shape displays properties, actions, and the linked resources that are defined for the resource.

In IBM® TRIRIGA®, when you create a new resource with the OSLC Resource form, you must specify the module, business object, and a business object query, or you must select a module and multi-business object query. Begin by creating the query in IBM TRIRIGA. When you create the display columns in the query, you are defining the initial properties. You can use the Import All Fields action in the form to import the display columns from the query as resource properties. The import process attempts to set the IBM TRIRIGA fields to the corresponding OSLC property values, such as read-only. You can modify the fields after the import and you can remove properties. The dcterms:identifier property creates the record ID during the import process. ThetriRecordIdSY field is required if you plan to update the resource.

The following table shows how IBM TRIRIGA field types map to OSLC property value types:
IBM TRIRIGA field type OSLC property value type
Boolean OslcPropertyValueType.Boolean
Business Object OslcPropertyValueType.String
Classification OslcPropertyValueType.String
Classification Rollup OslcPropertyValueType.Decimal
Color OslcPropertyValueType.String

Note: The URI must be URL encoded when you filter for color fields. Replace the # symbol with %23.

Control Number OslcPropertyValueType.String
Date OslcPropertyValueType.String
Date and Time OslcPropertyValueType.String
Duration OslcPropertyValueType.String
Financial Rollup OslcPropertyValueType.Decimal
Image OslcPropertyValueType.String
Label Only OslcPropertyValueType.String
List OslcPropertyValueType.String
Number OslcPropertyValueType.Decimal
Password OslcPropertyValueType.String
System Read Only OslcPropertyValueType.String
Text OslcPropertyValueType.String
Time OslcPropertyValueType.String
UOM OslcPropertyValueType.String
Url OslcPropertyValueType.String

A linked resource points to the resource to be linked. It provides the association strings describe the relationship. The following are examples of association strings: Has Asset, Manages, and Assigned To. You also can add a linked resource to a property. A linked resource is allowed, and is optional, for locator fields and smart sections.

Example: Work task shape document

A work task shape document lists all of the properties, attributes, and dependencies of a work task. The following code shows an excerpt from a work task shape document named WorkTask. Four properties are included in this resource shape document but the document can have many more properties listed.
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:oslc="http://open-services.net/ns/core#"
    xmlns:spi="http://jazz.net/ns/tririga/property#"
    xmlns:dcterms="http://purl.org/dc/terms/">
  <oslc:ResourceShape rdf:about="http://yourserver/oslc/shapes/WorkTask">
    <oslc:property>
      <oslc:Property>
        <oslc:representation rdf:resource="http://open-services.net/ns/core#Either"/>
        <oslc:readOnly>false</oslc:readOnly>
        <oslc:occurs rdf:resource="http://open-services.net/ns/core#Exactly-one"/>
        <oslc:valueType rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
        <dcterms:title rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"
        >ID</dcterms:title>
        <oslc:name>RecordInformation.triIdTX>/oslc:name>
        <oslc:propertyDefinition rdf:resource="http://jazz.net/ns/tririga/property#triIdTX"/>
      </oslc:Property>
    </oslc:property>
    <oslc:property>
      <oslc:Property>
        <oslc:representation rdf:resource="http://open-services.net/ns/core#Either"/>
        <oslc.readOnly>false</oslc:readOnly>
        <oslc:occurs rdf:resource="http://open-services.net/ns/core#Exactly-one"/>
        <oslc:valueType rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
        <oslc:defaultValue>TIMESTAMP</oslc:defaultValue>
        <dcterms:title rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"
        >Planned Start</dcterms:title>
        <oslc:name>RecordInformation.triPlannedStartDT</oslc:name>
        <oslc:propertyDefinition rdf:resource="http://jazz.net/ns/tririga/property#triPlannedStartDT"/>
      </oslc:Property>
    </oslc:property>
    <oslc:property>
      <oslc:Property>
        <oslc:representation rdf:resource="http://open-services.net/ns/core#Either"/>
        <oslc:readOnly>true</oslc:readOnly>
        <oslc:occurs rdf:resource="http//open-services.net/ns/core#Exactly-one"/>
        <oslc:valueType rdf:resource="http://www.w3.org/2001/XMLSchema#decimal"/>
        <dcterms:title rdf:datatype="http//www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"
        >Actual Total Cost</dcterms:title>
        <oslc:name>RecordInformation.triActualTotalCostNU</oslc:name>
        <oslc:propertyDefinition rdf:resource="http://jazz.net/ns/tririga/property#triActualTotalCostNU"/>
      </oslc:Property>
    </oslc:property>
    <oslc:property>
      <oslc:Property>
        <oslc:representation rdf:resource="http://open-services.net/ns/core#Either"/>
        <oslc:readOnly>false</oslc:readOnly>
        <oslc:occurs rdf:resource="http//open-services.net/ns/core#Exactly-one"/>
        <oslc:valueType rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
        <dcterms:title rdf:datatype="http//www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"
        >Task Name</dcterms:title>
        <oslc:name>RecordInformation.triNameTX</oslc:name>
        <oslc:propertyDefinition rdf:resource="http://jazz.net/ns/tririga/property#trNameTX"/>
      </oslc:Property>
    </oslc:property>
    <dcterms:title>WorkTask</dcterms:title>
  </oslc:ResourceShape>
</rdf:RDF>