in black and white
Main menu
Share a book About us Home
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics

the semantic web a gide to the future of XML, Web Services and Knowledge Management - Daconta M,C.

Daconta M,C. the semantic web a gide to the future of XML, Web Services and Knowledge Management - Wiley publishing , 2003. - 304 p.
ISBN 0-471-43257-1
Download (direct link): thesemanticwebguideto2003.pdf
Previous << 1 .. 42 43 44 45 46 47 < 48 > 49 50 51 52 53 54 .. 116 >> Next

Chapter 5
Understanding the Resource Description Framework
RDF Schema
XML Namespaces
URI Unicode
Figure 5.8 The Semantic Web Stack.
Copyright © [2002] World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved. 2002/copyright-documents-20021231
Figure 5.9 UML class diagram of employee expertise.
Figure 5.9 uses several UML symbols to denote the concepts of class, inheritance, and association. The rectangle with three sections is the symbol for a class. The three sections are for the class name, the class attributes (middle section), and the class behaviors or methods (bottom section). RDF Schema only uses the first two parts of a class, since it is for data modeling and not programming behaviors. Also, to reduce the size of the diagram, we eliminated the bottom two sections of the class for Topic, Technology, Artifact, and so on. Inheritance is when a subclass inherits the characteristics of a superclass. The arrow from the subclass to the superclass denotes this. The inheritance relation is often called "isa," as in "a software engineer is a(n) employee."
Lastly, a labeled line between two classes denotes an association (like knows or writes). The key point of Figure 5.9 is that we are modeling two types of employees: software engineer and system-analyst. The key difference between the employees that we want to capture is the different types of artifacts that they create. Whereas both employees may know about a technology, the key differentiator of developing source code to implement a technology is important enough to be formally captured in RDF. This is precisely the type of key determining factor that is often lost in a jumble of plaintext. So, let's see how we would model this in RDF Schema.
Figure 5.10 displays the Protégé open source ontology editor developed by Stanford University with the same class hierarchy. Protégé is available at Protégé allows you to easily describe classes and class hierarchies.
Chapter 5
Figure 5.10 Improved expertise modeling via RDFS.
Understanding the Resource Description Framework
Notice in Figure 5.10 the right pane is a visualization of the ontology, while the left pane allows you to choose what class or classes to visualize from the class list (bottom left pane). The Protégé class structure is identical to the UML model except for the lack of behaviors. RDFS classes only have a name and properties. After modeling the classes, Protégé allows you to generate both the RDF schema and an RDF document if you create instances of the Schema (Figure 5.10 has one tab labeled "Instances"). Remember, a class is the blueprint from which you can create many instances. So, if the class describes the properties of an address like street, city, state, and zip code, you can create an number of instances of addresses like "3723 Saint Andrews Drive," "Sierra Vista," "Arizona," and "85650." Listing 5.6 is the RDF Schema for the class model in Figure 5.10. Listing 5.7 is an RDF document with instances of the classes in Listing 5.6.
<?xml version='1.0' encoding='ISO-8859-1'?>
<!ENTITY rdf ''>
<!ENTITY example_chp5 ''>
<!ENTITY rdfs ''>
<rdf:RDF xmlns:rdf="&rdf;"
<rdfs:Class rdf:about="&example_chp5;Artifacts" rdfs:label="Artifacts">
<rdfs:subClassOf rdf:resource="&rdfs;Resource"/>
<rdfs:Class rdf:about="&example_chp5;DesignDocument" rdfs:label="DesignDocument">
<rdfs:subClassOf rdf:resource="&example_chp5;Artifacts"/>
<rdfs:Class rdf:about="&example_chp5;Employee" rdfs:label="Employee">
<rdfs:subClassOf rdf:resource="&rdfs;Resource"/>
<rdfs:Class rdf:about="&example_chp5;Software-Engineer" rdfs:label="Software-Engineer">
<rdfs:subClassOf rdf:resource="&example_chp5;Employee"/>
<!-- Classes SourceCode, System-Analyst, Technology, and Topic omitted for brevity. They are similar to the above Classes. -->
Listing 5.6 RDF schema for Figure 5.9. (continued)
Chapter 5
<rdf:Property rdf:about="&example_chp5;knows"
<rdfs:domain rdf:resource="&example_chp5;Employee' />
<rdfs:range rdf:resource="&example_chp5;Topic"/>
<rdf:Property rdf:about="&example_chp5;writes"
<rdfs:range rdf:resource="&example_chp5;Artifacts' />
<rdfs:domain rdf:resource="&example_chp5;Employee' />
Listing 5.6 (continued)
Listing 5.6 uses the following key components of RDF Schema:
rdfs:Class. An element that defines a group of related things that share a set of properties. This is synonymous with the concept of type or category. Works in conjunction with rdf:Property, rdfs:range, and rdfs:domain to assign properties to the class. Requires a URI as an identifier in the rdf:about attribute. In Listing 5.6 we see the following classes defined: "Artifacts," "DesignDocument," "Employee," and "Software-Engineer."
Previous << 1 .. 42 43 44 45 46 47 < 48 > 49 50 51 52 53 54 .. 116 >> Next