rNews 1.0: Class Attributes in rNews

In the previous section we provided a high-level overview of the classes in rNews and the relations between classes. In the following sections we'll take a look at the attributes of each class. We'll start by reviewing important features common to all rNews attributes. After that, we'll examine each class individually. For each class we'll start by describing the class and detailing its attributes. Then we'll use the class to model some portion of our sample article. Once you've read through these sections, you'll know the definition of each rNews attribute and how to assign an appropriate value to each.

Important Features of rNews Attributes
 
Data Types
Each attribute in the rNews data model expects a value of a specific type. For instance the dateCreated attribute of the NewsItem class expects a value of type xsd:dateTime. All of the attribute data types used in rNews are drawn from the Word Wide Web Consortium's XML Schema Language or is an rNews class or the ominpresent Thing class from OWL. Below we provide a table that enumerates all of the data types used in rNews. Please note that we use QNames for the names of the data types, abbreviating the full URI <http://www.w3.org/2001/XMLSchema> as "xsd".

 

Data TypeFull DefinitionExampleBrief Definition
xsd:integer See W3C Site 1138 A whole number between x and y.
xsd:double See W3C Site 3.14159 A real-valued number.
xsd:string See W3C Site "Stuart Myles will love this document." A String is a sequence of characters.
xsd:datetime See W3C Site 1979-07-08T08:33:00-05:00 A string matching the format '-'? YYYY '-' MM '-' DD 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?.
xsd:anyURI See W3C Site http://data.nytimes.com/N66220017142656459133 A Universal Resource Identifier (URI). See IETF RFC 2396 for the full definition of URI.
a rNews class or owl:Thing rNews specs   One of the classed defined by rNews or the Thing class from OWL.

 

 
Controlled Vocabularies
For some paired attributes, implementors are encouraged to draw values from controlled vocabularies. For example, implementors are encouraged to use the IPTC's controlled vocabulary for genres for assigning values to the genre and genre attributes. But how do you use these vocabularies to assign attribute values? Well suppose we have a NewsItem that is in the "interview" genre and we want to use the IPTC's vocabulary to express this in rNews. If you take a look at this vocabulary at http://cv.iptc.org/newscodes/genre/, you'll soon find an entry for the "interview" genre that looks like this:
Figure: Entry for the 'Interview' genre in the IPTC's controlled vocabulary for genres.
To indicate that this NewsItem is an interview, we do the following. First we set the genre attribute to Interview, the value indicated in the name EN-gb is: field. Then we set the genre attribute to http://cv.iptc.org/newscodes/genre/Interview, the value indicated in the Concept Id: field.

 

So that's how attributes work in rNews. Now lets move onto the classes themselves!

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