rNews 1.0: The UserComments Class
| UserComments | ||
| creator |
|
commentText commentTime replyToUrl |
Figure 1: Attributes of the UserComments class.
The UserComments class provides five attributes for modeling user-submitted comments: commentText, commentTime, creator, discusses, and replyToUrl. 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 URL at which users may post additional comments or to respond to specific comments, this URL may be indicated with the replyToUrl. The authorship of UserComments objects is indicated via the creator property. The discusses property provides a relationship back to the NewsItem being commented on.
UserComments Attribute Summary
The table below enumerates all attributes of the Commentclass and provides the expected data type, and a definition of each attribute.
| Attribute | Type | Definition |
|---|---|---|
| commentText | xsd:string | The text of the comment. |
| commentTime | xsd:dateTime | The time at which the comment was made. |
| creator | Person | The creator of the comment.. |
| discusses | NewsItem | Specifies the NewsItem associated with this Comment. |
| replyToUrl | xsd:anyURI | The URL at which a reply may be posted to the specified comment. |
Applying the UserComments Class
To express the sample article's comments in RDF/Turtle using attributes from the rnews Commentclas, 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-10-07#> . <http://community.nytimes.com/comments/www.nytimes.com/2011/03/25/world/africa/25policy.html?permid=1#comment1> a rnews:UserComments ; 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"; rnews:discusses <http://www.nytimes.com/2011/03/25/world/africa/25policy.html>; rnews:creator <http://blogs.example.com/joe-blog>. <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"; rnews:discusses <http://www.nytimes.com/2011/03/25/world/africa/25policy.html>; rnews:creator <http://id.example.org/jane-opinion>.
Want to comment on rNews: we invite you to post your comment to the rNews Forum.