Service provider provision

OSLC resources are enabled within a domain and are available to consuming applications through the OSLC service provider for the domain. A single service provider for each domain is supported.

In Maximo IT, you can discover what service providers are available by entering the http:/host:port/maximo/oslc/sp URI in a browser. The response includes the URI for the service provider document for each domain that is configured for OSLC integration.

The URI for the service provider document for the work management domain, for example, is http://host:port/maximo/oslc/sp/WorkManagment. The service provider document is in RDF/XML format and describes the available resources and namespace mappings, saved queries, and the operations that are supported for the resources that it supports. An OSLC consumer application can use the service provider document to determine which resources are available and what services it supports, such as query or creation. The current implementation supports create, request, update, and delete operations at data level but resources in delegated user interface scenarios are not supported.

In the following sample response, the OSLC service provider is referred from the rdfs:member property. The service provider document for the domain shows the URI for work management:
<rdfs:member rdf:resource="http://host/maximo/oslc/sp/WorkManagement">
<rdf:RDF>
<rdf:Description rdf:about="http://host/maximo/oslc/sp">
<rdfs:member rdf:resource="http://host/maximo/oslc/sp/WorkManagement">
</rdf:Description>
</rdf:RDF>

Namespaces

OSLC defines common namespaces. The prefixDefinition property exposes all the prefix-to-namespace mappings that the service provider uses to describe the resources that it manages. The following table shows a sample of the namespaces that are available:

Prefix Namespace
rdf http://www.w3.org/1999/02/22-rdf-syntax-ns#
oslc http://open-services.net/ns/core#
dcterms http://purl.org/dc/terms/
asset http://open-services.net/ns/asset#
foaf http://xmlns.com/foaf/0.1/
rdfs http://www.w3.org/2000/01/rdf-schema#
rr http://jazz.net/ns/ism/registry#
spi http://jazz.net/ns/ism/asset/smarter_physical_infrastructure#
The following excerpt from the service section of the service provider document shows the OSLC and RDF namespaces:
  <oslc:ServiceProvider rdf:about="http://host:7001/maximo/oslc/sp/WorkManagement">
    <oslc:prefixDefinition>
      <oslc:PrefixDefinition>
        <oslc:prefixBase rdf:resource="http://open-services.net/ns/core#"/>
        <oslc:prefix>oslc</oslc:prefix>
      </oslc:PrefixDefinition>
    </oslc:prefixDefinition>

    <oslc:prefixDefinition>
      <oslc:PrefixDefinition>
        <oslc:prefixBase rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
        <oslc:prefix>rdf</oslc:prefix>
      </oslc:PrefixDefinition>
    </oslc:prefixDefinition>
The following table shows a sample mapping for a work order that uses common namespaces:
OSLC prefix Existing prefix
oslc:shortTitle wonum
dcterms:title description
dcterms:description description_longdescription
dcterms:creator reportedby
dcterms:created reportdate
dcterms:identifier workorderid
The following table shows the mappings for the person object that is referred to from dcterms:creator in the workorder.
OSLC prefix Existing prefix
foaf:name displayname
foaf:givenName firstname
foaf:familyName lastname

Creation factory and query operations

An OSLC service provider supports the creation factory and query capability operations for the resources that are available in the service provider document. A creation factory provides the oslc:creation Creation URI that you use to create new resources with a HTTP POST request. The oslc:queryBase query URI enables the selection of a resource collection that is managed by the service provider. When the resource is obtained, either by query or creation, the resource can be updated or deleted.

If the resource supports creation, there can be one creation factory operation. The following excerpt from a service provider document shows the creation factory operation, the URI for the resource shape, and the URI for the creation resource operation that creates the shape.

<oslc:creationFactory>
	<oslc:CreationFactory>
  	<oslc:resourceType rdf:resource="http://jazz.net/ns/ism/work
/smarter_physical_infrastructure#WorkOrder"/>
		<oslc:resourceShape rdf:resource="http://host:port/maximo/oslc/shapes/oslcwodetail"/>
		<oslc:creation rdf:resource="http://host:port/maximo/oslc/os/oslcwodetail"/>
		<oslc:label>Create WorkOrder</oslc:label>
			<dcterms:title>OSLC creation factory for WorkOrder</dcterms:title>
	</oslc:CreationFactory>
</oslc:creationFactory>
        ......
The query URI is oslc:queryBase, and the following example shows a search for a work order by using the request:
<oslc:queryBase rdf:resource="http://host/maximo/oslc/os/oslcwodetail"/>
   <oslc:queryCapability>
          <oslc:QueryCapability>
            <oslc:resourceType rdf:resource="http://jazz.net/ns/ism/work/smarter_physical_
               infrastructure#WorkOrder"/>
            <oslc:queryBase rdf:resource="http://host/maximo/oslc/os/oslcwodetail"/>
            <oslc:labelQuery> WorkOrder</oslc:label>
            <dcterms:title>OSLC query capability for WorkOrder</dcterms:title>
          </oslc:QueryCapability>
        </oslc:queryCapability>