This wiki is locked. Future workgroup activity and specification development must take place at our new wiki. For more information, see this blog post about the new governance model and this post about changes to the website.

Scenario: Find All Resources with any relationship to a given URI.

In this scenario the client wants to find all the AM resources that have a any kind of relationship to a known resource URI ( <http://rm.acme.com/requirements/req123>).

This scenario requires that the client has already discovered the Simple Query? URI via the service catalog

Example 1. Find all resources that elaborate a requirement

Starting with Simple Query? URI the client constructs a simple query and GET the resulting ATOM collection. In the place of the property id, a wildcard (*) is used to indicate that we are interested in any type of link.

The query before encoding is

...?query=*=http://rm.acme.com/requirements/req123

A URL encoding it becomes

..?query=*%3Dhttp%3A%2F%2Frm.acme.com%2Frequirements%2Freq123

Request (request URI line wraps to make more readable)
GET https://am.acme.com/simplequery/project1?query=*%3Dhttp%3A%2F%2Frm.acme.com%2Frequirements%2Freq123
Accept: application/atom+xml
Response
200 OK
Content-Type: application/atom+xml

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
  <id>e1a00805-1bc0-4743-98c8-0cd48377b823</id>
  <updated>2010-01-11T20:57:08.187Z</updated>
  <opensearch:totalResults>2</opensearch:totalResults>
  <entry xmlns:oslc_am="http://open-services.net/xmlns/am/1.0/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <title type="text">IAudit</title>
    <link href="https://am.acme.com/resources/res158" />
    <oslc_am:etag>"_Txwpsfo1Ed6LKdTEwsKIAw"</oslc_am:etag>
    <oslc_am:Resource>
      <dc:title>IAudit</dc:title>
      <dc:description>Used to access customer audit information.</dc:description>
      <dc:type rdf:resource="http://www.eclipse.org/uml2/3.0.0/UML/Interface" />
      <dc:format>application/x-uml+xml</dc:format>
    </oslc_am:Resource> 
  </entry>
  <entry xmlns:oslc_am="http://open-services.net/xmlns/am/1.0/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <title type="text">IHistory</title>
    <link href="https://am.acme.com/resources/res529" />
    <oslc_am:etag>"_scmSBvo1Ed6LKdTEkaDiws"</oslc_am:etag>
    <oslc_am:Resource>
      <dc:title>IHistory</dc:title>
      <dc:description>Edit customer history information.</dc:description>
      <dc:type rdf:resource="http://www.eclipse.org/uml2/3.0.0/UML/Interface" />
      <dc:format>application/x-uml+xml</dc:format>
    </oslc_am:Resource> 
  </entry>
</feed>
 
Edit | Attach | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 18 Feb 2010 - 14:49:19 - JimConallen
 
This site is powered by the TWiki collaboration platform Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our Terms of Use
Ideas, requests, problems regarding this site? Send feedback