Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


What Is the Resource Description Framework?

You might be familiar with RDF as a technology for describing resources like images, audio, and video. However, take a deeper look into its core model, syntax, and features to see how this framework is shaping the semantic web.

t 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.

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 <rdf:RDF>, 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 <rdf:Description> 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).

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date