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: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>
<rdf:Description rdf:about="https://am.acme.com/resources/res158">
<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>
</rdf:Description>
</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>
<rdf:Description rdf:about="https://am.acme.com/resources/res158">
<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>
</rdf:Description>
</entry>
</feed>
(Legacy source: http://open-services.net/bin/view/Main/AmScenarioDetailFindResourcesWithAnyRelationshipTo)