rNews: Class Relations

In the previous section we used our sample article to demonstrate how to specify various attributes for several rNews classes. Prior to that we explored the various class relations in the rNews data model. In this section we'll tie together these previous discussions by demonstrating how to specify the class relations for our sample article using rNews.

The previous section introduced 28 objects each of which is in at least one relation. To keep things simple we'll consider the objects in our model on a class-by-class basis. For each class, we will enumerate all of the relations that objects in that class participate in as subjects. To enumerate each set of relations, we'll start with a diagram of these relation and then we'll provide an RDF/Turtle snippet of the relation. Also, even though relations in rnews are symetric, we'll only be considering a single direction for each relation to keep things simple.

The Comment Class
Figure: Attributes of the Comment class.

As the figure above shows, there are two Comment objects in our sample article. Each Comment is in a createdBy relationship with single a Person object. These relations are indicated in RDF/Turtle as follows:

      <http://community.nytimes.com/comments/www.nytimes.com/2011/03/25/world/africa/25policy.html?permid=1#comment1>
        rnews:createdBy <http://timespeople.nytimes.com/view/user/54638514> .           
      
      <http://community.nytimes.com/comments/www.nytimes.com/2011/03/25/world/africa/25policy.html?permid=4#comment4>
        rnews:createdBy <http://timespeople.nytimes.com/view/user/27242827> .

 

The Organization Class
Figure: Relation of Organization objects.

As the figure above shows, there are two Organization objects in our sample article. Each Organization object is in a hasTickerSymbol relationship with single a TickerSymbol object. These relations are indicated in RDF/Turtle as follows:

      <http://www.nytimes.com>
        rnews:hasTickerSymbol <http://markets.on.nytimes.com/research/stocks/tools/analysis_tools.asp?symbol=NYT> .
      
      <http://www.reuters.com>
        rnews:hasTickerSymbol <http://markets.on.nytimes.com/research/stocks/tools/analysis_tools.asp?symbol=TRI> .

 

The Media Class
Figure: Relations of the Media object.

As the figure above shows, there is a single Media objects in our sample article. This Media object is in several relations.

  • A createdBy relationship with single a Person object.
  • A copyrightedBy relationship with single a Organization object.
  • A providedBy relationship with single a Organization object.
  • A hasSource relationship with single a Organization object.
These relations are indicated in RDF/Turtle as follows:
      <http://dev.iptc.org/files/rNews-Sample-Story/libya_sample_reuters.jpg>
        rnews:createdBy   <http://blogs.reuters.com/goran-tomasevic/> ;
        rnews:copyrightedBy <http://www.reuters.com> ;
        rnews:hasSource     <http://www.reuters.com> ;
        rnews:providedBy    <http://www.reuters.com>. 

 

The Article Class
Figure: Relations of the Article object.

As the figure above shows, there is a single Article objects in our sample article. This Article object is in several relations (starting clockwise from top).

  • A depictedBy relation with single a Media object.
  • A contributedBy relation with two Person objects.
  • A headlinedBy relation with five headline objects.
  • A copyrightedBy relation with single a Organization object.
  • A providedBy relation with single a Organization object.
  • A hasSource relation with single a Organization object.
  • A taggedBy relation with eight Tag objects.
  • A createdBy relation with two Person objects.
These relations are indicated in RDF/Turtle as follows:
      <http://dev.iptc.org/rNews-Sample-Story>
        rnews:contributeBy 
          <http://topics.nytimes.com/top/reference/timestopics/people/l/mark_landler>,
          <http://topics.nytimes.com/top/reference/timestopics/people/s/eric_schmitt> ;          
        rnews:headlinedBy
          <http://dev.iptc.org/rNews-Sample-Story#headline>,
          <http://dev.iptc.org/rNews-Sample-Story#print_headline>,
          <http://dev.iptc.org/rNews-Sample-Story#print_jump_headline>,
          <http://dev.iptc.org/rNews-Sample-Story#print_sub_headline_1>,
        rnews:discussedBy 
          <http://community.nytimes.com/comments/www.nytimes.com/2011/03/25/world/africa/25policy.html?permid=1#comment1>, 
          <http://community.nytimes.com/comments/www.nytimes.com/2011/03/25/world/africa/25policy.html?permid=4#comment4> ;
        rnews:copyrightedBy <http://www.nytimes.com> ;
        rnews:providedBy <http://www.nytimes.com> ;
        rnews:hasSource <http://www.nytimes.com> ;
        rnews:taggedBy
          <http://data.nytimes.com/32718077124339208210>,
          <http://data.nytimes.com/42273881931420178781>,
          <http://data.nytimes.com/55791562732592005121>,
          <http://data.nytimes.com/66285699086722007041>,
          <http://data.nytimes.com/67127587134490296321>,
          <http://data.nytimes.com/91178019641520997503>,
          <http://data.nytimes.com/N31642451125599181492>,
          <http://data.nytimes.com/N84789043836346105961> ;  
        rnews:createdBy 
          <http://topics.nytimes.com/topics/reference/timestopics/people/k/david_d_kirkpatrick>,
          <http://topics.nytimes.com/topics/reference/timestopics/people/m/steven_lee_myers/> .

 

Final Assembly

We started with a class diagram and a sample article. We subjected you to a litany of class specifications and piecemeal examples. We laboriously trudged through each and every relation in our sample article. And now that we have all the peices in place, its finally time for the final assembly. Below is the complete rNews RDF model for our sample article. Every class, every property, every relation, it's all there.

    @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    @prefix rnews: <http://iptc.org/std/rNews/2011-02-02#> .
    
    <http://dev.iptc.org/rNews-Sample-Story>
      a rnews:Article ;
      rnews:commentCount "2" ;
      rnews:contributeBy <http://topics.nytimes.com/top/reference/timestopics/people/l/mark_landler>, <http://topics.nytimes.com/top/reference/timestopics/people/s/eric_schmitt> ;
      rnews:copyrightNoticeUri <http://www.nytimes.com/content/help/rights/copyright/copyright-notice.html> ;
      rnews:copyrightedBy <http://www.nytimes.com> ;
      rnews:createdBy <http://topics.nytimes.com/topics/reference/timestopics/people/k/david_d_kirkpatrick>, <http://topics.nytimes.com/topics/reference/timestopics/people/m/steven_lee_myers/> ;
      rnews:dateCreated "2011-03-24" ;
      rnews:dateline "WASHINGTON" ;
      rnews:description "The questions about the command mirrored the strategic divisions over how the coalition will end the operation." ;
      rnews:discussedBy <http://community.nytimes.com/comments/www.nytimes.com/2011/03/25/world/africa/25policy.html?permid=1#comment1>, <http://community.nytimes.com/comments/www.nytimes.com/2011/03/25/world/africa/25policy.html?permid=4#comment4> ;
      rnews:discussionUri <http://community.nytimes.com/comments/www.nytimes.com/2011/03/25/world/africa/25policy.html> ;
      rnews:genre "Current" ;
      rnews:genreUri <http://cv.iptc.org/newscodes/genre/Current> ;
      rnews:guid "1248069687395" ;
      rnews:hasSource <http://www.nytimes.com> ;
      rnews:headlinedBy
        <http://dev.iptc.org/rNews-Sample-Story#headline>,
        <http://dev.iptc.org/rNews-Sample-Story#print_headline>,
        <http://dev.iptc.org/rNews-Sample-Story#print_jump_headline>,
        <http://dev.iptc.org/rNews-Sample-Story#print_sub_headline_1>,
        <http://dev.iptc.org/rNews-Sample-Story#print_sub_headline_2> ;
      rnews:language "en" ;
      rnews:printColumn "6" ;
      rnews:printDesk "Foreign" ;
      rnews:printEdition "NewYork" ;
      rnews:printPage "1" ;
      rnews:printSection "A" ;
      rnews:providedBy <http://www.nytimes.com> ;
      rnews:section "world" ;
      rnews:taggedBy
        <http://data.nytimes.com/32718077124339208210>,
        <http://data.nytimes.com/42273881931420178781>,
        <http://data.nytimes.com/55791562732592005121>,
        <http://data.nytimes.com/66285699086722007041>,
        <http://data.nytimes.com/67127587134490296321>,
        <http://data.nytimes.com/91178019641520997503>,
        <http://data.nytimes.com/N31642451125599181492>,
        <http://data.nytimes.com/N84789043836346105961> ;
      rnews:thumbnailUri <http://graphics8.nytimes.com/images/common/icons/t_wb_75.gif> ;
      rnews:title "Allies Are Split on Goal and Exit Strategy in Libya" ;
      rnews:usageTermsUri <http://www.nytimes.com/ref/membercenter/help/agree.html> ;
      rnews:version "1" ;
      rnews:wordCount "1223" . 
    
    <http://dev.iptc.org/files/rNews-Sample-Story/libya_sample_reuters.jpg>
      a rnews:Media ;
      rnews:copyrightedBy <http://www.reuters.com> ;
      rnews:createdBy <http://blogs.reuters.com/goran-tomasevic/> ;
      rnews:description "Rebel fighters take cover during a shelling near Ajdabiyah, Libya on Thursday." ;
      rnews:encoding "JPEG Baseline" ;
      rnews:hasSource <http://www.reuters.com> ;
      rnews:height "360" ;
      rnews:mediaType "Picture" ;
      rnews:mediaTypeUri <http://cv.iptc.org/newscodes/mediatype/picture> ;
      rnews:providedBy <http://www.reuters.com> ;
      rnews:width "600" . 
    
    <http://blogs.reuters.com/goran-tomasevic/>
      a rnews:Person ;
      rnews:name "Goran Tomasevic" . 
    
    <http://community.nytimes.com/comments/www.nytimes.com/2011/03/25/world/africa/25policy.html?permid=1#comment1>
      a rnews:Comment ;
      rnews:commentText "The decision to enter into the Libyan fray was not the right decision. That said, when you go in, you should go all in or not..." ;
      rnews:commentTime "2001-03-25T08:23:00" ;
      rnews:createdBy <http://timespeople.nytimes.com/view/user/54638514> . 
    
    <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:createdBy <http://timespeople.nytimes.com/view/user/27242827> . 
    
    <http://data.nytimes.com/32718077124339208210>
      a rnews:Tag ;
      rnews:name "Defense and Military Forces" . 
    
    <http://data.nytimes.com/42273881931420178781>
      a rnews:Location ;
      rnews:latitude "54.0" ;
      rnews:longitude "-4.0" ;
      rnews:name "Great Britain" . 
    
    <http://data.nytimes.com/55791562732592005121>
      a rnews:Location ;
      rnews:latitude "39.0" ;
      rnews:longitude "35.0" ;
      rnews:name "Turkey" . 
    
    <http://data.nytimes.com/66285699086722007041>
      a rnews:Location ;
      rnews:latitude "25.0" ;
      rnews:longitude "17.0" ;
      rnews:name "Libya" . 
    
    <http://data.nytimes.com/67127587134490296321>
      a rnews:Location ;
      rnews:latitude "46.0" ;
      rnews:longitude "2.0" ;
      rnews:name "France" . 
    
    <http://data.nytimes.com/91178019641520997503>
      a rnews:Person ;
      rnews:name "Qaddafi, Muammar el-" . 
    
    <http://data.nytimes.com/N31642451125599181492>
      a rnews:Organization ;
      rnews:name "North Atlantic Treaty Organization" . 
    
    <http://data.nytimes.com/N84789043836346105961>
      a rnews:Location ;
      rnews:latitude "39.76" ;
      rnews:longitude "-98.5" ;
      rnews:name "United States" . 
    
    <http://dev.iptc.org/rNews-Sample-Story#headline>
      a rnews:Headline ;
      rnews:div "Allies Are Split on Goal and Exit Strategy in Libya" ;
      rnews:headlineType "headline" . 
    
    <http://dev.iptc.org/rNews-Sample-Story#print_headline>
      a rnews:Headline ;
      rnews:headlineText "Allies are Split Over Final Goal of Libya Mission" ;
      rnews:headlineType "print_headline" . 
    
    <http://dev.iptc.org/rNews-Sample-Story#print_jump_headline>
      a rnews:Headline ;
      rnews:headlineText "Ultimate Goal of Mission In Libya Divides Allies" ;
      rnews:headlineType "print_jump_headline" . 
    
    <http://dev.iptc.org/rNews-Sample-Story#print_sub_headline_1>
      a rnews:Headline ;
      rnews:headlineText "NATO Takes Command" ;
      rnews:headlineType "print_sub_headline" . 
    
    <http://dev.iptc.org/rNews-Sample-Story#print_sub_headline_2>
      a rnews:Headline ;
      rnews:headlineText "Strategy for an Exit and the Fate of Qaddafi Remain Murky" ;
      rnews:headlineType "print_sub_headline" . 
    
    <http://markets.on.nytimes.com/research/stocks/tools/analysis_tools.asp?symbol=NYT>
      a rnews:TickerSymbol ;
      rnews:exchange "NYSE" ;
      rnews:symbol "NYT" . 
    
    <http://markets.on.nytimes.com/research/stocks/tools/analysis_tools.asp?symbol=TRI>
      a rnews:TickerSymbol ;
      rnews:exchange "NYSE" ;
      rnews:symbol "TRI" . 
    
    <http://timespeople.nytimes.com/view/user/27242827>
      a rnews:person ;
      rnews:name "Chuck" . 
    
    <http://timespeople.nytimes.com/view/user/54638514>
      a rnews:person ;
      rnews:name "John" . 
    
    <http://topics.nytimes.com/top/reference/timestopics/people/l/mark_landler>
      a rnews:Person ;
      rnews:email "xxx@nytimes.com" ;
      rnews:givenName "Mark" ;
      rnews:lastName "Landler" ;
      rnews:name "Mark Landler" . 
    
    <http://topics.nytimes.com/top/reference/timestopics/people/s/eric_schmitt>
      a rnews:Person ;
      rnews:email "xxx@nytimes.com" ;
      rnews:givenName "Eric" ;
      rnews:lastName "Schmitt" ;
      rnews:name "Eric Schmitt" . 
    
    <http://topics.nytimes.com/topics/reference/timestopics/people/k/david_d_kirkpatrick>
      a rnews:Person ;
      rnews:additionalName "D." ;
      rnews:email "xxx@nytimes.com" ;
      rnews:givenName "David" ;
      rnews:lastName "Kirkpatrick" ;
      rnews:name "DAVID D. KIRKPATRICK" . 
    
    <http://topics.nytimes.com/topics/reference/timestopics/people/m/steven_lee_myers/>
      a rnews:Person ;
      rnews:additionalName "Lee" ;
      rnews:email "xxx@nytimes.com" ;
      rnews:givenName "Steven" ;
      rnews:lastName "Myers" ;
      rnews:name "STEVEN LEE MYERS" . 
    
    <http://www.nytimes.com>
      a rnews:Organization ;
      rnews:countryName "US" ;
      rnews:hasTickerSymbol <http://markets.on.nytimes.com/research/stocks/tools/analysis_tools.asp?symbol=NYT> ;
      rnews:locality "New York" ;
      rnews:name "The New York Times" ;
      rnews:postalCode "10018" ;
      rnews:region "NY" ;
      rnews:streetAddress "620 8th Ave" ;
      rnews:tel "(212) 556-1234" ;
      rnews:url "http://www.nytimes.com" . 
    
    <http://www.reuters.com>
      a rnews:Organization ;
      rnews:hasTickerSymbol <http://markets.on.nytimes.com/research/stocks/tools/analysis_tools.asp?symbol=TRI> ;
      rnews:name "Reuters" . 
  
Want to comment on rNews: we invite you to post your comment to the rNews Forum.