diff --git a/specs/ldm/link-discovery-management-spec.html b/specs/ldm/link-discovery-management-spec.html index a52aa76..426efb0 100644 --- a/specs/ldm/link-discovery-management-spec.html +++ b/specs/ldm/link-discovery-management-spec.html @@ -79,8 +79,8 @@ editors: [ { name: "Eran Gery", - mailto: "eran.gery@il.ibm.com", - company: "IBM", + mailto: "egery@sodiuswillert.com", + company: "Sodius Willert", companyURL: "http://www.ibm.com", }, { @@ -520,32 +520,39 @@

Pagination

LDM Service Description

Discover links inquiry

- LDM clients inquire for incoming links related to a set of target object resources, typically owned and/or + LDM clients inquire for links related to a set of resources, typically owned and/or visualized by the client. The discover links inquiry is exposed under the discover-links path as described in - the open-API section below For the incoming links inquiry, the client provides: + the open-API section below For the links inquiry, the client provides:

In case the Configuration Context is specified, any object- or subject-resource shall be specified based on - concept resources. The server MUST respond with a set of triples for the incoming links, which are valid for the + concept resources. The server MUST respond with a set of triples for the links, which are valid for the given Configuration Context. In case the Configuration Context is not specified, any object- or subject-resource shall be specified based on unversioned resources. the server MUST respond with a set of triples for the - incoming links, which are not bound to a Configuration Context. Rationale: to support bidirectionality for + links, which are not bound to a Configuration Context. Rationale: to support bidirectionality for non-configuration aware links In case no predicates are provided, the server MUST provide all incoming links irrespective of their predicate. + The optional direction parameter is assumed by default to be "incoming". Another possible value "any".

- The LDM Server response is a set of triples consisting of + The LDM Server response is a set of link triples consisting of

+

+ If the direction is "incoming", object resource should be one of requested Object concept resource. + If the direction is "any", the subject resource or object resource should match one of the resource URIs specified +

+

+ In case of AdditionalResouceProperties predicates specified, LDM may return additional triples {subject, predicate, object} + where {subject} needs to be one of the subjects in the link triples, and predicate should be one of the + AdditionalResourceProperties predicates. +

Based on the LDM service response, the LDM client would typically show the incoming link with an inverse - predicate label (e.g., “validated by” vs. “validates”). The inquiry MUST be implemented as an HTTP post request, + predicate label (e.g., “validated by” vs. “validates”), for incoming links. The inquiry MUST be implemented as an HTTP post request, where the target concept resources and the predicates are provided with the request body.

@@ -574,28 +590,102 @@

Discover links inquiry

req2 in configuration baseline1 with predicates oslc_cm:tracks and oslc_cm:implements

-  POST http://ldm.example.com:8080/
-  Content-Type: application/x-www-form-urlencoded
-  Configuration-Context: http://elm.example.com/gcm/baseline1URI
-  objectConceptResources=http://elm.example.com/rm/req1URI,http://elm.example.com/rm/req2URI
-  predicateFilters=http:// elm.example.com/implementsURI, http://elm.example.com/tracksURI
-  
+ POST http://ldm.example.com:8080/ + +Content-Type: text/turtle + +Configuration-Context: http://elm.example.com/gcm/baseline1URI + +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. +@prefix ldp: <http://www.w3.org/ns/ldp# >. +@prefix oslc_cm: <http://open-services.net/ns/cm#>. +@prefix oslc_ldm: <http://open-services/net/ns/ldm#>. + +_:b1 oslc_ldm:resources + <http://example.org/rm/req1URI >, <http://example.org/rm/req2URI>. + +_:b2 oslc_ldm: linkPredicates + oslc_cm:implementsRequirement, oslc_cm:tracksRequirement . + +

Response (in turtle):

+
+        HTTP/1.1 200 OK
+
+        Content-Type: text/turtle
+         
+        @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+        @prefix oslc_am: <http://open-services.net/ns/am# . 
+        @prefix oslc_cm: <http://open-services.net/ns/cm#>.
+        
+          
+          <http://example.com/cm/resource/workitem1URI>
+            oslc_cm:tracks <http://elm.example.com/rm/req1URI>; 
+            oslc_cm:tracks <http://elm.example.com/rm/req2URI>.
+          <http://example.com/am/am1URI>
+            oslc_am:implements <http://elm.example.com/rm/req1URI>.
+       
+  
+ +

+ Example2: requesting all links including the title property of the resources +

+ +
+  POST http://ldm.example.com:8080/
+  
+  Content-Type: text/turtle
+  
+  Configuration-Context: http://elm.example.com/gcm/baseline1URI
+   
+  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+  @prefix dcterms: <http://purl.org/dc/terms/>.
+  @prefix oslc_cm: <http://open-services.net/ns/cm#>.
+  @prefix oslc_rm: <http://open-services.net/ns/rm#>.
+  @prefix oslc_ldm: <http://open-services/net/ns/ldm#>.
+   
+  _:b1 oslc_ldm:resources
+      <http://example.org/rm/req1URI >, <http://example.org/rm/req2URI>.
+   
+  _:b2 oslc_ldm:linkPredicates
+      oslc_cm:implementsRequirement, oslc_rm:satisfyRequirement .
+  
+  _:b3 oslc_ldm:direction “any”.
+  
+  _:b4 oslc_ldm:additionalProperties  
+    dcterms:title .
+
+  
+

+ Response (in turtle): +

+ +
   HTTP/1.1 200 OK
-  Content-Type: application/turtle
   
-   
-    oslc_cm:implements http://elm.example.com/rm/req1URI 
-    oslc_cm:tracks http://elm.example.com/rm/req1URI.
-   
-    oslc_cm:tracks http://elm.example.com/rm/req2URI.
+  Content-Type: text/turtle
+   
+  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+  @prefix oslc_am: <http://open-services.net/ns/am#>. 
+  @prefix oslc_cm: <http://open-services.net/ns/cm#>.
   
-  
+ + <http://example.com/cm/resource/workitem1URI> + oslc_cm:tracks <http://elm.example.com/rm/req1URI>; + oslc_cm:tracks <http://elm.example.com/rm/req2URI>. + <http://elm.example.com/rm/req1URI> + oslc_rm:satisfy <http://elm.example.com/rm/req2URI> + dcterms:title “requirement2”. + + <http://example.com/am/am1URI> + oslc_am:implements <http://elm.example.com/rm/req1URI>. + + + +

LDM contributions discovery