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.

DRAFT Comment Specification

Additional property on ChangeRequest resource shape:

  • Name: discussion
  • Description: The discussion property holds a reference to the set of all comments on a ChangeRequest?
  • Occurs: at-most-one
  • Value-type: Resource Comments
  • Version: 2.0

Resource: Discussion

Resource: Comment

  • Name: Comment
  • Type URI: http://open-services.net/xmlns/cm/2.0#Comment
  • Version: 2.0
  • Description: Data necessary to represent a comment
  • Properties:
    • dc:identifier (exactly-one)
    • dc:creator (exactly-one)
    • dc:created (exactly-one)
    • oslc_cm:body (XMLLiteral xhtml, exactly-one)
    • oslc_cm:changeRequest (exactly-one) reference to associated change request
    • dc:title (XMLLiteral xhtml, zero-or-one)
    • oslc_cm:inReply-to (URI, zero-or-one) reference to comment this comment is in reply to

Sample

ChangeRequest? with discussion inlined (RDF/XML)

Click HERE to see RDF/XML validation results

<?xml version="1.0" encoding="UTF-8"?>
<oslc_cm:ChangeRequest
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/terms/"
  xmlns:oslc_cm="http://open-services.net/xmlns/cm/2.0#" 

  rdf:about="http://example.com/bugs/2314">
  
  <oslc_cm:discussion>
    <oslc_cm:Discussion rdf:about= [[http://myserver/mycmapp/bugs/2314/discussion][http://myserver/mycmapp/bugs/2314/discussion]]>
      <oslc_cm:comment>
       <oslc_cm:Comment rdf:about="http://myserver/mycmapp/bugs/2314/discussion/1">
        <dc:identifier>comment1</dc:identifier>
        <dc:creator rdf:resource="http://myserver/mycmapp/users/joe" />
        <dc:title>comment title 1</dc:title>
        <dc:created>2008-07-04T11:00:00.000Z</dc:created>
        <oslc_cm:body rdf:parseType="Literal">
          This is my comment
        </oslc_cm:body>
        <oslc_cm:changeRequest rdf:resource="http://example.com/bugs/2314" />
        <oslc_cm:inReplyTo rdf:resource="" />
       </oslc_cm:Comment>
      </oslc_cm:comment>
      <oslc_cm:comment>
       <oslc_cm:Comment rdf:about="http://myserver/mycmapp/bugs/2314/discussion/2">
        <dc:identifier>Comment 2</dc:identifier>
        <dc:creator rdf:resource="http://myserver/mycmapp/users/joe" />
        <dc:title>comment title 2</dc:title>
        <dc:created>2008-07-05T11:00:00.000Z</dc:created>
        <oslc_cm:body rdf:parseType="Literal">
          This is my 2nd comment
        </oslc_cm:body>
        <oslc_cm:changeRequest rdf:resource="http://example.com/bugs/2314" />
        <oslc_cm:inReplyTo rdf:resource="http://myserver/mycmapp/bugs/2314/discussion/1" />
       </oslc_cm:Comment>
      </oslc_cm:comment>
    </oslc_cm:Discussion>
  </oslc_cm:discussion>
      
</oslc_cm:ChangeRequest>
 

Retrieving all Discussion

Get {CR URI}/discussion

Code Content Description
200 OK Comments resource Comments resource with a number of comment resources
404 Not Found Error message Either the root URI is invalid or the service can't locate the specified change request resource
405 Not Acceptable Error message Server can not fulfill the request due to it's Accept headers

Comment Creation

POST {CR URI}/discussion
Posting a well formed comment shape results in creation of a comment resource resource. A service provider MUST support at least the following HTTP response status codes:
Status CodeResponse Content
Description
201 CreatedHTTP-Header > Location: {New Comment URI}A new comment resource has been created at the URI returned
400 Bad Request
Error message
Malformed content (comment xml invalid)
404 Not Found
Error messageThe request URL does not represent a URL on the serve
409 Conflict
Error message

Possible reasons:

  • inReplyTo not supported
  • referencd comment uri invalid

Comment Deletion

 DELETE {Comment URI}     Response: 501 Not Implemented 

Comment Update

 PUT {Comment URI}

Response: 501 Not Implemented

Topic attachments
I Attachment Action Size Date Who Comment
xmlxml cr_v2.xml manage 1.7 K 13 Apr 2010 - 19:38 SteveSpeicher  
Topic revision: r7 - 21 Apr 2010 - 16:53:01 - RobertElves
 
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