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: Remove Existing Link from AM Resource

In this scenario an AM resource has a link to some external resource. The client knows the URI of the AM resource, the URI of the external resource, and the link type URI. The overall procedure is the same as adding links; GET the resource, change it, and PUT it back.

Example 1. Remove a simple link to a requirement

This example removes a simple link, one with no extra properties associated with it.

1.The client GET's the AM resource to insert a link into, and notes the ETag value.

Request
GET https://am.acme.com/resources/res323
Accept: application/x-oslc-am-resource+xml
Response
200 OK
Content-Type: application/x-oslc-am-resource+xml
ETag: "_siemvnshyu2746sakalfuy" 

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/terms/" 
   xmlns:oslc_am="http://open-services.net/xmlns/am/1.0/"
   rdf:about="https://acme.com/resources/res323">

    <oslc_am:Resource>
      <dc:title>ServiceInterface</dc:title>
      <dc:description>This interface is used to do service things.</dc:description>
      <dc:type rdf:resource="http://www.eclipse.org/uml2/3.0.0/UML/Interface" />
      <dc:format>application/x-uml+xml</dc:format>
      <acme:elaborates rdf:resource="https://reqserver.acme.com/requirements/req10"/>
    </oslc_am:resource> 

</rdf:RDF>

 

2. The client modifies the content, removing the link and PUTing back the resource with the ETag in the If-Match header.

If the service provider permits the the removal of the link, the user has authorization, the syntax of the link is correct, the service provider will response with a 200 OK response.

Request
PUT https://am.acme.com/resources/res323
Content-Type: application/x-oslc-am-resource+xml
If-Match: "_siemvnshyu2746sakalfuy"

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/terms/" 
   xmlns:oslc_am="http://open-services.net/xmlns/am/1.0/"
   rdf:about="https://acme.com/resources/res323">

    <oslc_am:Resource>
      <dc:title>ServiceInterface</dc:title>
      <dc:description>This interface is used to do service things.</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> 

</rdf:RDF> 
Response
200 OK
ETag: "_sownmds21sa92js6aloaa"

asd

Edit | Attach | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 12 Jan 2010 - 15:42:50 - 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