rNews 0.5: The Comment Class

Figure 1: Attributes of the Comment class.

The Comment class provides three attributes for modeling user-submitted comments: commentText, commentTime, and replyToUri. The commentText attribute is used to indicate the text of the comment. The commentTime attribute is used to indicate the time at which the comment was submitted. If your site provides a URI at which users may post additional comments or to respond to specific comments, this URI may be indicated with the replyToUri.

The authorship of Comment objects is indicated via creates/createdBy relations to Party objects.

 

Comment Attribute Summary
The table below enumerates all attributes of the Comment class and provides the expected data type, category (core/power) and a definition of each attribute.

 

AttributeTypeCategoryDefinition
commentText xsd:string core The text of the comment.
commentTime xsd:dateTime core The time at which the comment was made.
replyToUri xsd:anyURI power The URI at which a reply may be posted to the specified comment.

 

Applying the Comment Class
To express the sample article's comments in RDF/Turtle using attributes from the rnews Comment clas, we would write the following:
        
      @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>  .
      @prefix rnews: <http://iptc.org/std/rNews/2011-05-17#> .
      <http://community.nytimes.com/comments/www.nytimes.com/2011/03/25/world/africa/25policy.html?permid=1#comment1>  
        a  rnews:Comment ;
        rnews:commentText "Those opposed to the UN sanctioned US-EU attack  on Libya claim there is no clear goal or exit strategy. Wrong!..." ;
        rnews:commentTime "2001-03-25T08:14:00" . 
        
      <http://community.nytimes.com/comments/www.nytimes.com/2011/03/25/world/africa/25policy.html?permid=4#comment4>  
        a  rnews:Comment ;
        rnews:commentText "So the question is: Why is Secretary of Defense  Hillary Clinton speaking as the Defense Secretary..." ;
        rnews:commentTime "2001-03-25T08:27:00" . 

 

Want to comment on rNews: we invite you to post your comment to the rNews Forum.