What Is the Resource Description Framework?
By Michael C. Daconta, Leo J. Obrst, and Kevin T. Smith
At the simplest level, the Resource Description Framework (RDF) is an XML-based language to describe resources. While the definition of “resource” can be quite broad, let’s begin with the common understanding of a resource as an electronic file available via the Web. Such a resource is accessed through a Uniform Resource Locator (URL). While XML documents attach metadata to parts of a document, one use of RDF is to create metadata about the document as a stand-alone entity. In other words, instead of marking up the internals of a document, RDF captures metadata about the “externals” of a document, like the author, the creation date, and type. A particularly good use of RDF is to describe resources, which are “opaque” like images or audio files. Figure 1 displays an application, which uses RDF to describe an image resource.
The RDFPic application is a demonstration application developed by the W3C to embed RDF metadata inside JPEG images. The application can work in conjunction with the W3C’s Jigsaw web server to automatically extract the RDF metadata from images stored on the server. As you see in Figure 1, the application loads the image on the right side and allows data entry in a form on the left side. The tabbed panels on the left side allow you to load custom RDF schemas to describe the image. The two built-in schemas available for describing an image are the Dublin Core (www.dublincore.org) elements and a technical schema with metadata properties on the camera used. Besides embedding the metadata in the photo, you can export the RDF annotations to an external file, as shown in Listing 1.
Figure 1. An RDFPic application describing an image. RDFPic is copyrighted by the World Wide Web Consortium. All Rights Reserved. www.w3.org/Consortium/Legal/
Figure 2. The RDF triple.
The first thing you should notice about Listing 1 is the consistent use of namespaces on all elements in the listing. In the root element , four namespaces are declared. The root element specifies this document is an RDF document. An RDF document contains one or more “descriptions” of resources. A description is a set of statements about a resource. The element contains an rdf:about attribute that refers to the resource being described. In Listing 1, the rdf:about attribute points to the URL of a JPEG image called shop1.jpg. The rdf:about attribute is critical to understanding RDF because all resources described in RDF must be denoted via a URI. The child elements of the Description element are all properties of the resource being described. Two properties [to note are] one in the Dublin Core namespaces and one in the technical namespace. The values of those properties are stored as the element content. In summary, this code demonstrates a syntax where we describe a resource, a resource’s properties, and the property values. This three-part model is separate from the RDF syntax. The RDF syntax in Listing 1 is considered to be one (of many) serializations of the RDF model. Now let’s examine the RDF model. The RDF model is often called a “triple” because it has three parts, as described previously. Though described in terms of resource properties in the preceding text, in the knowledge representation community, those three parts are described in terms of the grammatical parts of a sentence: subject, predicate, and object. Figure 2 displays the elements of the tri-part model and the symbology associated with the elements when graphing them.
Editor’s Note: This article is an excerpt of Chapter 5, “Understanding the Resource Description Framework,” in The Semantic Web: A Guide to the Future of XML, Web Services, and Knowledge Management (Wiley Publishing 2003).
This excerpt first appeared on Devx’s Semantic Web Zone. Go there for the full excerpt.
Key RDF Triple Elements
The key elements of an RDF triple are as follows:
We should stress that resources in RDF must be identified by resource IDs, which are URIs with optional anchor IDs. This is important so that a unique concept can be unambiguously identified via a globally unique ID. This is a key difference between relying on semantics over syntax. The syntactic meaning of words is often ambiguous. For example, the word “bark” in the sentences “The bark felt rough” and “The bark was loud” has two different meanings; however, by giving a unique URI to the concept of tree bark like “www.business.org/ontology/plant/#bark,” we can always refer to a single definition of bark.
Subject. In grammar, this is the noun or noun phrase that is the doer of the action. In the sentence “The company sells batteries,” the subject is “the company.” The subject of the sentence tells us what the sentence is about. In logic, this is the term about which something is asserted. In RDF, this is the resource that is being described by the ensuing predicate and object. Therefore, in RDF, we want a URI to stand for the unique concept “company” like “http://www.business.org/ontology/#company” to denote that we mean a form of business ownership and not friends coming for a visit.
Predicate. In grammar, this is the part of a sentence that modifies the subject and includes the verb phrase. Returning to our sentence “The company sells batteries,” the predicate is the phrase “sells batteries.” In other words, the predicate tells us something about the subject. In logic, a predicate is a function from individuals (a particular type of subject) to truth-values with an arity based on the number of arguments it has. In RDF, a predicate is a relation between the subject and the object. Thus, in RDF, we would define a unique URI for the concept “sells” like “http://www.business.org/ontology/#sells.”
Figure 3. A graph of two RDF statements. IsaViz is copyrighted by the W3C. All Rights Reserved. www.w3.org/Consortium/Legal/
Object. In grammar this is a noun that is acted upon by the verb. Returning to our sentence “The company sells batteries,” the object is the noun “batteries.” In logic, an object is acted upon by the predicate. In RDF, an object is either a resource referred to by the predicate or a literal value. In our example, we would define a unique URI for “batteries” like “http://www.business.org/ontology/#batteries.”
Statement. In RDF, the combination of the preceding three elements-subject, predicate, and object-as a single unit. Figure 3 displays a graph representation of two RDF statements. These two statements illustrate the concepts in Figure 2. Note that the object can be represented by a resource or by a literal value. The graphing is done via a W3C application called IsaViz available at www.w3.org/2001/11/IsaViz/.
Editor’s Note: This article is an excerpt of Chapter 5, “Understanding the Resource Description Framework,” in The Semantic Web: A Guide to the Future of XML, Web Services, and Knowledge Management (Wiley Publishing 2003).
This excerpt first appeared on Devx’s Semantic Web Zone. Go there for the full excerpt.
Please enter your content here.


The 
Eric Franzon
VP Community
Jennifer Zaino
Contributor
Angela Guess Contributor
semanticweb.com Twitter feed loading...