HistoryViewLinks to this page 2012 August 27 | 01:42 pm

Contents


Overview

This is a collection of various Asset Management resources in a variety of formats to better illustrate their usage. These are samples only and not intended to show every permutation of the various formats.

Service Provider Samples

ServiceProviderCatalog as RDF/XML

The build system starts with a URL to the asset management service catalog which it will use to discover the asset management services.

Request

GET http://example.com/assets/cat
Accept: application/rdf+xml
OSLC-Core-Version: 2.0

Response

HTTP/1.0 200 OK
OSLC-Core-Version: 2.0
Content-Type: application/rdf+xml
ETag: xxx
Content-Length: nnn

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:oslc="http://open-services.net/ns/core#" 
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <oslc:ServiceProviderCatalog rdf:about="http://example.com/assets/cat">
      <dcterms:title>Product Grouping</dcterms:title>
      <dcterms:description>Lists various asset management systems by Product Grouping</dcterms:description>
      <oslc:domain rdf:resource="http://open-services.net/ns/asset#" />
      <dcterms:publisher>
         <oslc:Publisher>
            <dcterms:title>OSLC Asset Management Working Group</dcterms:title>
            <dcterms:identifier>com.example.oslc.asset</dcterms:identifier>
            <oslc:icon rdf:resource="http://example.com/icons/assets.ico" />
         </oslc:Publisher>
      </dcterms:publisher>
      <oslc:serviceProvider>
         <oslc:ServiceProvider rdf:about="http://example.com/assets/sp/f">
            <dcterms:title>France region</dcterms:title>
         </oslc:ServiceProvider>
      </oslc:serviceProvider>
      <oslc:serviceProvider>
         <oslc:ServiceProvider rdf:about="http://example.com/assets/sp/b">
            <dcterms:title>Brazil region</dcterms:title>
         </oslc:ServiceProvider>
      </oslc:serviceProvider>
      <oslc:serviceProviderCatalog>
         <oslc:ServiceProviderCatalog rdf:about="http://example.com/assets/cat2">
            <dcterms:title>Product Grouping - [Asia/Pacific](Asia/Pacific.html)</dcterms:title>
            <dcterms:publisher>
               <oslc:Publisher>
                  <dcterms:title>OSLC Asset Management Working Group</dcterms:title>
                  <dcterms:identifier>com.example.oslc.asset</dcterms:identifier>
                  <oslc:icon rdf:resource="http://example.com/icons/assets.ico" />
               </oslc:Publisher>
            </dcterms:publisher>
            <oslc:serviceProvider>
               <oslc:ServiceProvider rdf:about="http://example.com/sp/a">
                  <dcterms:title>China region</dcterms:title>
               </oslc:ServiceProvider>
            </oslc:serviceProvider>
         </oslc:ServiceProviderCatalog>
      </oslc:serviceProviderCatalog>
      <oslc:oauthConfiguration>
         <oslc:OAuthConfiguration>
            <oslc:oauthRequestTokenURI rdf:resource="http://example.com/assets/oauth-request-token" />
            <oslc:authorizationURI rdf:resource="http://example.com/assets/oauth-authorization" />
            <oslc:oauthAccessTokenURI rdf:resource="http://example.com/assets/oauth-access-token" />
         </oslc:OAuthConfiguration>
      </oslc:oauthConfiguration>
   </oslc:ServiceProviderCatalog>
</rdf:RDF>

ServiceProvider as RDF/XML

From the services catalog the build system locates the Service Provider it is interested in /assets/sp/b and gets that provider.

Request

GET http://www.example.com/assets/sp/b
Accept: application/rdf+xml
OSLC-Core-Version: 2.0

Response

HTTP/1.0 200 OK
OSLC-Core-Version: 2.0
Content-Type: application/xml
ETag: xxx
Content-Length: nnn

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dcterms="http://purl.org/dc/terms/" xmlns:oslc="http://open-services.net/ns/core#"
   xml:lang="en">
   <oslc:ServiceProvider rdf:about="http://example.com/assets/sp/b">
      <dcterms:title>Brazil region assets</dcterms:title>
      <dcterms:description>Example OSLC Asset Management Service</dcterms:description>
      <dcterms:publisher>
         <oslc:Publisher>
            <dcterms:title>OSLC Asset Management Working Group</dcterms:title>
            <dcterms:identifier>com.example.oslc.asset</dcterms:identifier>
            <oslc:icon rdf:resource="http://example.com/icons/assets.ico" />
         </oslc:Publisher>
      </dcterms:publisher>
      <oslc:prefixDefinition>
         <oslc:PrefixDefinition>
            <oslc:prefix>rdf</oslc:prefix>
            <oslc:prefixBase rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
         </oslc:PrefixDefinition>
      </oslc:prefixDefinition>
      <oslc:prefixDefinition>
         <oslc:PrefixDefinition>
            <oslc:prefix>dcterms</oslc:prefix>
            <oslc:prefixBase rdf:resource="http://purl.org/dc/terms/" />
         </oslc:PrefixDefinition>
      </oslc:prefixDefinition>
      <oslc:prefixDefinition>
         <oslc:PrefixDefinition>
            <oslc:prefix>oslc</oslc:prefix>
            <oslc:prefixBase rdf:resource="http://open-services.net/ns/core#" />
         </oslc:PrefixDefinition>
      </oslc:prefixDefinition>
      <oslc:prefixDefinition>
         <oslc:PrefixDefinition>
            <oslc:prefix>oslc_asset</oslc:prefix>
            <oslc:prefixBase rdf:resource="http://open-services.net/ns/asset#" />
         </oslc:PrefixDefinition>
      </oslc:prefixDefinition>
      <oslc:service>
         <oslc:Service>
            <oslc:domain rdf:resource="http://open-services.net/ns/asset#" />
            <oslc:creationFactory>
               <oslc:CreationFactory>
                  <dcterms:title>Default Asset Management factory</dcterms:title>
                  <oslc:label>Asset</oslc:label>
                  <oslc:creation rdf:resource="http://example.com/bugs/factory" />
                  <oslc:resourceShape rdf:resource="http://example.com/shapes/assets" />
                  <oslc:resourceType rdf:resource="http://open-services.net/ns/asset#Asset" />
                  <oslc:usage rdf:resource="http://open-services.net/ns/core#default" />
                  <oslc:usage rdf:resource="http://open-services.net/ns/asset#defect" />
               </oslc:CreationFactory>
            </oslc:creationFactory>
       <oslc:queryCapability>
                        <oslc:QueryCapability>
                              <dcterms:title>Asset Query</dcterms:title>
                              <oslc:label>assetquery</oslc:label>
                              <oslc:queryBase rdf:resource="http://example.com/query" />
                              <oslc:resourceShape rdf:resource="http://example.com/shapes/asset" />
                           </oslc:QueryCapability>
                        </oslc:queryCapability>
            <oslc:creationDialog>
               <oslc:Dialog>
                  <dcterms:title>New Asset</dcterms:title>
                  <oslc:label>Asset</oslc:label>
                  <oslc:dialog rdf:resource="http://example.com/assets/dialogs/newasset" />
                  <oslc:hintWidth>651px</oslc:hintWidth>
                  <oslc:hintHeight>294px</oslc:hintHeight>
                  <oslc:resourceType rdf:resource="http://open-services.net/ns/asset#Asset" />
                  <oslc:usage rdf:resource="http://open-services.net/ns/core#default" />
                  <oslc:usage rdf:resource="http://open-services.net/ns/asset#Asset" />
               </oslc:Dialog>
            </oslc:creationDialog>
            <oslc:selectionDialog>
               <oslc:Dialog>
                  <dcterms:title>Pick Asset</dcterms:title>
                  <oslc:label>Asset</oslc:label>
                  <oslc:dialog rdf:resource="http://example.com/assets/dialogs/pickasset" />
                  <oslc:hintWidth>500px</oslc:hintWidth>
                  <oslc:hintHeight>250px</oslc:hintHeight>
                  <oslc:resourceType rdf:resource="http://open-services.net/ns/asset#Asset" />
                  <oslc:usage rdf:resource="http://open-services.net/ns/core#default" />
                  <oslc:usage rdf:resource="http://open-services.net/ns/asset#Asset" />
               </oslc:Dialog>
            </oslc:selectionDialog>
         </oslc:Service>
      </oslc:service>
   </oslc:ServiceProvider>
</rdf:RDF>

Retrieve Samples

Retrieve an asset as RDF/XML

Request

GET   <http://example.com/oslc/assets/4667/1.0>
Accept: application/rdf+xml
OSLC-Core-Version: 2.0

Response

HTTP/1.0 200 OK
OSLC-Core-Version: 2.0
Content-Type: application/xml
ETag: xxx
Content-Length: nnn

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dcterms="http://purl.org/dc/terms/" 
   xmlns:oslc="http://open-services.net/ns/core#"
   xmlns:oslc_asset="http://open-services.net/ns/asset#">
   <oslc_asset:Asset rdf:about="http://example.com/assets/CDFE4153-9271-5CA6-425A-4CA6BE7BD7CA/1.0">
      <rdf:type rdf:resource="http://open-services.net/ns/asset#Asset"/>
      <dcterms:title>Build Configuration for Myco Services</dcterms:title>
      <oslc_asset:guid>CDFE4153-9271-5CA6-425A-4CA6BE7BD7CA</oslc_asset:guid>
      <oslc_asset:version>1.0</oslc_asset:version>
      <oslc:instanceShape rdf:resource="http://example.com/shapes/Build Configuration"/>
      <dcterms:abstract>Build Configuration Myco's web services application</dcterms:abstract>
      <dcterms:creator rdf:resource="http://example.com/users/joe"/>
      <dcterms:contributor rdf:resource="http://example.com/users/bob"/>
      <dcterms:modified>2011-09-16T08:42:11.265Z</dcterms:modified>
      <dcterms:created>2011-07-04T11:00:00.000Z</dcterms:created>
      <dcterms:type rdf:resource="http://example.com/types/buildConfiguration"/>
      <oslc_asset:state rdf:resource="http://example.com/states/Approved"/>
      <oslc_asset:categorization rdf:resource="http://example.com/categories/Build/Frequency/Daily"/>
      <oslc_asset:artifactContentFactory rdf:resource="http://example.com/assets/CDFE4153-9271-5CA6-425A-4CA6BE7BD7CA/1.0/artifacts"/>
      <oslc_asset:artifact rdf:resource="http://example.com/assets/CDFE4153-9271-5CA6-425A-4CA6BE7BD7CA/1.0#artifacts/build.xml"/>
      <dcterms:relation rdf:ID="relationship1" rdf:resource="http://example.com/assets/52C4702C-7CA2-E46E-D373-620482ECBEED/1.0"/>
   </oslc_asset:Asset>
   <rdf:Description rdf:about="http://example.com/assets/CDFE4153-9271-5CA6-425A-4CA6BE7BD7CA/1.0#artifacts/build.xml">       
      <rdf:type rdf:resource="http://open-services.net/ns/asset#Artifact"/>
      <dcterms:title>build.xml</dcterms:title>
      <dcterms:label>Build Start File</dcterms:label>
      <oslc_asset:content rdf:resource="http://example.com/assets/CDFE4153-9271-5CA6-425A-4CA6BE7BD7CA/1.0/artifactContents/build.xml"/>
      <dcterms:format>text/xml</dcterms:format>
      <oslc_asset:size>10240</oslc_asset:size>
      <dcterms:modified>2011-08-12T14:32:27.123Z</dcterms:modified>
      <dcterms:created>2011-06-12T14:32:27.123Z</dcterms:created>
   </rdf:Description>
   <rdf:Description rdf:about="#relationship1">       
      <oslc_asset:relationshipType rdf:resource="http://example.com/oslc/relationships/Dependency/"/>
      <dcterms:creator rdf:resource="http://example.com/users/joe" />
      <oslc_asset:state rdf:resource="http://example.com/states/Approved"/>
      <dcterms:modified>2011-05-02T07:00:00.123Z</dcterms:modified>
      <dcterms:created>2011-04-28T10:00:00.000Z</dcterms:created>
   </rdf:Description>
</rdf:RDF>

Download an asset as a zip file

Request

GET http://example.com/assets/CDFE4153-9271-5CA6-425A-4CA6BE7BD7CA/1.0
Accept: application/zip
OSLC-Core-Version: 2.0

Response

HTTP/1.0 200 OK
OSLC-Core-Version: 2.0
Content-Type: application/zip
ETag: xxx
Content-Length: nnn

Body: Zipped content of the asset

Publish Samples

Publish an asset as RDF/XML

Create a new asset with a relationship to an existing asset.

Request

POST <http://example.com/oslc/assets>
Accept: application/rdf+xml
Content-Type: application/rdf+xml
OSLC-Core-Version: 2.0
Body:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dcterms="http://purl.org/dc/terms/" 
   xmlns:oslc="http://open-services.net/ns/core#"
   xmlns:oslc_asset="http://open-services.net/ns/asset#">
   <oslc_asset:Asset>
      <rdf:type rdf:resource="http://open-services.net/ns/asset#Asset"/>
      <dcterms:type rdf:resource="http://example.com/types/Implementation"/>
      <dcterms:title>Services Implementation</dcterms:title>
      <oslc_asset:version>1.0</oslc_asset:version>
      <dcterms:abstract>Build Configuration Myco's web services application</dcterms:abstract>
      <dcterms:relation rdf:ID="relationship1" rdf:resource="http://example.com/assets/52C4702C-7CA2-E46E-D373-620482ECBEED/1.0"/>
   </oslc_asset:Asset>
   <rdf:Description rdf:about="#relationship1">       
      <oslc_asset:relationshipType rdf:resource="http://example.com/relationships/Dependency/"/>
   </rdf:Description>
</rdf:RDF>

Response

HTTP/1.0 201 Created
OSLC-Core-Version: 2.0
Content-Type: application/xml
ETag: xxx
Content-Length: nnn
Location: <http://example.com/assets/B538BDD4-53CB-D52C-0E26-5997025FE8C3/1.0>

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dcterms="http://purl.org/dc/terms/" 
   xmlns:oslc="http://open-services.net/ns/core#"
   xmlns:oslc_asset="http://open-services.net/ns/asset#">
   <oslc_asset:Asset rdf:about="http://example.com/assets/B538BDD4-53CB-D52C-0E26-5997025FE8C3/1.0">
      <rdf:type rdf:resource="http://open-services.net/ns/asset#Asset"/>
      <dcterms:type rdf:resource="http://example.com/types/Implementation"/>
      <dcterms:title>Services Implementation</dcterms:title>
      <oslc_asset:guid>B538BDD4-53CB-D52C-0E26-5997025FE8C3</oslc_asset:guid>
      <oslc_asset:version>1.0</oslc_asset:version>
      <dcterms:abstract>Build Configuration Myco's web services application</dcterms:abstract>
      <dcterms:creator rdf:resource="http://example.com/oslc/users/joe"/>
      <dcterms:modified>2011-09-16T08:42:11.265Z</dcterms:modified>
      <dcterms:created>2011-09-16T08:42:11.265Z</dcterms:created>
      <oslc_asset:state rdf:resource="http://example.com/states/Draft"/>
      <oslc_asset:artifactContentFactory rdf:resource="http://example.com/assets/B538BDD4-53CB-D52C-0E26-5997025FE8C3/1.0/artifacts"/>
      <dcterms:relation rdf:ID="relationship1" rdf:resource="http://example.com/assets/52C4702C-7CA2-E46E-D373-620482ECBEED/1.0"/>
   </oslc_asset:Asset>
   <rdf:Description rdf:about="#relationship1">       
      <oslc_asset:relationshipType rdf:resource="http://example.com/relationships/Dependency/"/>
      <dcterms:creator rdf:resource="http://example.com/users/joe" />
      <oslc_asset:state rdf:resource="http://example.com/states/Draft"/>
      <dcterms:modified>2011-09-16T08:42:11.265Z</dcterms:modified>
      <dcterms:created>2011-09-16T08:42:11.265Z</dcterms:created>
   </rdf:Description>
</rdf:RDF>

Publish an artifact

Upload a new artifact to the asset that was published

Request

POST <http://example.com/assets/B538BDD4-53CB-D52C-0E26-5997025FE8C3/1.0/artifacts>
oslc_asset.name: services.ear
Content-Type: application/java-archive
OSLC-Core-Version: 2.0

The POST body contains the content of the artifact.

Response

HTTP/1.0 201 Created
OSLC-Core-Version: 2.0
Content-Type: application/xml
ETag: xxx
Content-Length: nnn
Location: <http://example.com/assets/B538BDD4-53CB-D52C-0E26-5997025FE8C3/1.0/artifacts/services.ear>

Publish a URI artifact

Upload a new URI artifact to the asset that was published

Request

POST <http://example.com/assets/B538BDD4-53CB-D52C-0E26-5997025FE8C3/1.0/artifacts>
oslc_asset.name: /helpFolder/help
Content-Type: application/rdf+xml
OSLC-Core-Version: 2.0

Body: 
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dcterms="http://purl.org/dc/terms/" 
   xmlns:oslc_asset="http://open-services.net/ns/artifact#">
   <oslc_asset:Artifact>    
      <rdf:type rdf:resource="http://open-services.net/ns/asset#Artifact"/>
      <dcterms:title>Build help documentation</dcterms:title>
      <dcterms:label>documentation</dcterms:label>
      <oslc_asset:content rdf:resource="http://help.example.com"/>
      <dcterms:format>text/html</dcterms:format>
   </oslc_asset:Artifact>
</rdf:RDF>

Response

HTTP/1.0 201 Created
OSLC-Core-Version: 2.0
Content-Type: application/xml
ETag: xxx
Content-Length: nnn
Location: <http://example.com/assets/B538BDD4-53CB-D52C-0E26-5997025FE8C3/1.0/artifacts/helpFolder/help>

Query Samples

Query result as RDF/XML

Query for all assets with ‘services’ in their title.

Request

GET http://example.com/query?oslc.where=dcterms:title="services"
Accept: application/rdf+xml
OSLC-Core-Version: 2.0

Response

HTTP/1.0 200 OK
OSLC-Core-Version: 2.0
Content-Type: application/rdf+xml
ETag: xxx
Content-Length: nnn

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF      
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:oslc="http://open-services.net/ns/core#"
   xmlns:oslc_asset="http://open-services.net/ns/asset#">

     <oslc:ResponseInfo rdf:about="http://example.com/query?oslc.where=dcterms:title=&quot;services&quot;">
         <dcterms:title>Asset query service</dcterms:title>
     </oslc:ResponseInfo>

     <rdf:Description rdf:about="http://example.com/query">
        <rdfs:member rdf:resource="http://example.com/assets/52C4702C-7CA2-E46E-D373-620482ECBEED/1.0"/>
        <rdfs:member rdf:resource="http://example.com/assets/D6199D91-9662-6977-46EC-93E656CCB7B8/2.0"/>
        <rdfs:member rdf:resource="http://example.com/assets/83ECEEAA-6E38-D0A5-0739-22E4AF38A7EE/1.0"/>
     </rdf:Description>
</rdf:RDF>

Query result as RDF/XML with select

Query for all assets with ‘services’ in their title and are version ‘1.0’. Select the title of the asset and the title of the asset’s type.

Request

GET http://example.com/query?oslc.select=dcterms:title,dcterms:type{dcterms:title}&oslc;.where=dcterms:title="services" and oslc_asset:version="1.0"
Accept: application/rdf+xml
OSLC-Core-Version: 2.0

Response

HTTP/1.0 200 OK
OSLC-Core-Version: 2.0
Content-Type: application/rdf+xml
ETag: xxx
Content-Length: nnn

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF      
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:oslc="http://open-services.net/ns/core#"
   xmlns:oslc_asset="http://open-services.net/ns/asset#">

     <oslc:ResponseInfo 
        rdf:about="http://example.com/query?oslc.select=dcterms:title,dcterms:type{dcterms:title}&amp;oslc.where=dcterms:title=&quot;services&quot; and oslc_asset:version=&quot;1.0&quot;">
        <dcterms:title>Asset query service</dcterms:title>
     </oslc:ResponseInfo>

     <rdf:Description rdf:about="http://example.com/query">
        <rdfs:member>
           <oslc_asset:Asset rdf:about="http://example.com/assets/52C4702C-7CA2-E46E-D373-620482ECBEED/1.0">
              <dcterms:title>Voice plan service</dcterms:title>
              <dcterms:type>
                 <dcterms:type rdf:about="http://example.com/types/Service">
                    <dcterms:title>Service</dcterms:title>
                 </dcterms:type>
              </dcterms:type>
           </oslc_asset:Asset>
        </rdfs:member>
        <rdfs:member>
           <oslc_asset:Asset rdf:about="http://example.com/assets/83ECEEAA-6E38-D0A5-0739-22E4AF38A7EE/1.0">
              <dcterms:title>Data plan service</dcterms:title>
              <dcterms:type>
                 <dcterms:type rdf:about="http://example.com/types/Service">
                    <dcterms:title>Service</dcterms:title>
                 </dcterms:type>
              </dcterms:type>
           </oslc_asset:Asset>
        </rdfs:member>
     </rdf:Description>
</rdf:RDF>

Query for all assets related to asset http://example.com/assets/52C4702C-7CA2-E46E-D373-620482ECBEED/1.0 and for each result select the asset name and relationship type title.

Request

GET http://example.com/query?oslc.select=dcterms:title,dcterms:relation{oslc_asset:relationshipType{dcterms:title}}&amp;oslc.where=dcterms:relation="http://example.com/assets/52C4702C-7CA2-E46E-D373-620482ECBEED/1.0"
Accept: application/rdf+xml
OSLC-Core-Version: 2.0

Response

HTTP/1.0 200 OK
OSLC-Core-Version: 2.0
Content-Type: application/rdf+xml
ETag: xxx
Content-Length: nnn

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF      
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:oslc="http://open-services.net/ns/core#"
   xmlns:oslc_asset="http://open-services.net/ns/asset#">

     <oslc ResponseInfo rdf:about="http://example.com/query?oslc.select=dcterms:title,dcterms:relation{oslc_asset:relationshipType{dcterms:title}}&amp;oslc.where=dcterms:relati>
        <dcterms:title>Asset query service</dcterms:title>
     </oslc:ResponseInfo>

     <rdf:Description rdf:about="http://example.com/query">
        <rdfs:member>
           <oslc_asset:Asset rdf:about="http://example.com/assets/CDFE4153-9271-5CA6-425A-4CA6BE7BD7CA/1.0">
              <dcterms:title>Voice plan service</dcterms:title>
              <dcterms:relation rdf:ID="relationship1" rdf:resource="http://example.com/assets/52C4702C-7CA2-E46E-D373-620482ECBEED/1.0"/>
           </oslc_asset:Asset>
        </rdfs:member>
        <rdfs:member>
           <oslc_asset:Asset rdf:about="http://example.com/assets/83ECEEAA-6E38-D0A5-0739-22E4AF38A7EE/1.0">
              <dcterms:title>Data plan service</dcterms:title>
              <dcterms:relation rdf:ID="relationship2" rdf:resource="http://example.com/assets/52C4702C-7CA2-E46E-D373-620482ECBEED/1.0"/>
           </oslc_asset:Asset>
        </rdfs:member>
     </rdf:Description>
     <rdf:Description rdf:about="#relationship1">
        <oslc_asset:relationshipType>
           <oslc_asset:RelationshipType rdf:about="http://example.com/oslc/relationships/Implementationy">
              <dcterms:title>Implementation</dcterms:title>
           </oslc_asset:RelationshipType>
        </oslc_asset:relationshipType>
     </rdf:Description>
     <rdf:Description rdf:about="#relationship2">
        <oslc_asset:relationshipType>
           <oslc_asset:RelationshipType rdf:about="http://example.com/oslc/relationships/Specification">
              <dcterms:title>Specification</dcterms:title>
           </oslc_asset:RelationshipType>
        </oslc_asset:relationshipType>
     </rdf:Description>
</rdf:RDF>

Delegated UI Examples

Selection dialog example

See Delegated UIs

Consumer IFrame embedding selection Dialog

<html>
...
window.addEventListener('message', receiver, false);
function receiver(e) {
  //Do something with the received results
}
....
<iframe src="http://example.com/assets/dialogs/pickasset"/>
...
</html>

Provider Dialog UI

<html>
....
//Handle post back search results
function respondWithPostMessage(/*string*/ response) {
    (window.parent | window).postMessage("oslc-response:" + response, "*");
}
...
</html>

Result format in JSON

{
    "oslc:results" : [{
            "oslc:label": "Myco Services Release",
            "rdf:resource": "http://example.com/oslc/assets/813/1.0" 
        }, {
            "oslc:label": "Myco Accounting App Release",
            "rdf:resource": "http://example.com/oslc/assets/23/3.5" 
        }
    ]
} 

Preview UI

The build system fetched the preview UI from the asset management system to show on hover.

See UI Preview

Request

GET http://example.com/oslc/assets/813/1.0
Accept: application/x-oslc-compact+xml
OSLC-Core-Version: 2.0

Response

HTTP/1.0 201 Created
OSLC-Core-Version: 2.0
Content-Type: application/xml
ETag: xxx
Content-Length: nnn

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:oslc="http://open-services.net/ns/core#">
 <oslc:Compact
   rdf:about="http://example.com/oslc/assets/813/1.0">
   <dcterms:title> Myco Services Release </dcterms:title>
   <oslc:icon rdf:resource="http://example.com/icons/release.jpg" />
   <oslc:smallPreview>
      <oslc:Preview>
         <oslc:document rdf:resource="http://example.com/oslc/assets/813/1.0?hover=small" />
      </oslc:Preview>
   </oslc:smallPreview>
   <oslc:largePreview>
      <oslc:Preview>
         <oslc:document rdf:resource="http://example.com/oslc/assets/813/1.0?hover=large" />
         <oslc:hintWidth> 60em </oslc:hintWidth>
         <oslc:hintHeight> 20em </oslc:hintHeight>
      </oslc:Preview>
   </oslc:largePreview>
 </oslc:Compact>
</rdf:RDF>