![]() |
|
|
| Home | Resources | Buyer's Guide | FAQs | Newsletter | Tech Jobs | |
Introduction to DAML: Part Iby Roxane Ouellet, Uche OgbujiJanuary 30, 2002
As the ambitions of RDF and XML have expanded to include things like the Semantic Web, the limitations of this lightweight schema language have become evident. Accordingly, a group set out to develop a more expressive schema language, DARPA Agent Markup Language (DAML). Although DAML is not a W3C initiative, several familiar faces from the W3C, including Tim Berners-Lee, participated in its development. This article series introduces DAML, including practical examples and basic design principles. This first article presents basic DAML concepts and constructs, explaining the most useful modeling tools DAML puts into the designer's hands. In the next article we shall take a more in-depth look, introducing more advanced features and outlining a few useful rules of thumb for designers. Keeping the concepts straight between RDF, RDFS and DAML+OIL can be difficult, so the third article will serve as a reference of constructs, describing each, and pointing to the relevant spec where each is defined. Introducing DAMLRDF and provide a basic feature set for information modeling. RDF is very similar to a basic directed graph, which is a very well understood data structure in computer science. (Note that there are some important variations RDF makes on graph theory [RDFLG]). This simplicity serves RDF very well, making it a sort of assembly language on top of which almost every other information-modeling method can be overlaid. However, users have desired more from RDF and RDF Schema, including data types, a consistent expression for enumerations, and other facilities. Logicians, some of whom see RDF as a possible tool for developing long-promised practical AI systems, have bemoaned the rather thin set of facilities provided by RDF. In response the DARPA Agent Markup Language (DAML) [DAMLHOME] sprang from a U.S. government-sponsored effort in August 2000, which released DAML-ONT, a simple language for expressing more sophisticated RDF class definitions than permitted by RDFS. The DAML group soon pooled efforts with the Ontology Inference Layer (OIL) [OILHOME], another effort providing more sophisticated classification, using constructs from frame-based AI. The result of these efforts is DAML+OIL, a language for expressing far more sophisticated classifications and properties of resources than RDFS. The most recent release was March 2001 [DAMLOIL], which also adds facilities for data typing based on the type definitions provided in the W3C XML Schema Definition Language (XSDL). And the W3C itself is getting into the act. This DAML+OIL specification and its relationship to RDF and RDFS are also available as a series of W3C notes [DAMLOILNOTES], which are used as the base specifications in this article and the following parts. Furthermore, the newly commissioned Web Ontology (WebONT) Working Group ([WEBONT]) has taken on the task of producing an ontology language, with DAML+OIL as its basis. Readers of these articles are expected to be familiar with RDF and RDF Schema. See [RDFINTRO] and [RDFTUT] to gain some of this background. More Facilities for PropertiesLet's dive right in by looking at some examples of how DAML+OIL might be used in practice. We'll use an imaginary online sports store, Super Sports Inc. as an example. RDF Schema allows you to define classes by direct declaration: <rdfs:Class rdf:ID="Product"> <rdfs:label>Product</rdfs:label> <rdfs:comment>An item sold by Super Sports Inc.</rdfs:comment> </rdfs:Class> You can make similar definitions of properties: <rdfs:Property rdf:ID="productNumber"> <rdfs:label>Product Number</rdfs:label> <rdfs:domain rdf:resource="#Product"/> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> </rdfs:Property> You define instances of these classes by defining resources to be of the relevant RDF type, and then give them relevant properties: <Product rdf:ID="WaterBottle"> <rdfs:label>Water Bottle</rdfs:label> <productNumber>38267</productNumber> </Product> Data typing, multiple rangesThis is all very well, as far as it goes. The problem is that it
doesn't go very far. For one thing, based on the name, and the example
above, one would reasonably assume that the values of the
<daml:DatatypeProperty rdf:ID="productNumber"> <rdfs:label>Product Number</rdfs:label> <rdfs:domain rdf:resource="#Product"/> <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#nonNegativeInteger"/> </daml:DatatypeProperty> We use the "daml" prefix here to represent the DAML+OIL namespace
A property can also be defined as identical to another. DAML+OIL
provides two ways to express this: with either the
<rdf:Description about="#productNumber"> <daml:samePropertyAs rdf:resource="http://consortium-of-shoppers.org/vocab/productID"/> </rdf:Description> Unique propertiesOne can also specify that a property be unique, meaning that there can only be one value of the property for each instance. Note that there can be more than one statement with each instance as subject and the unique property as predicate, as long as the objects of all these statements are identical. We can require that each Super Sports product have a unique product number by modifying the property definition to the following: <daml:DatatypeProperty rdf:ID="productNumber"> <rdfs:label>Product Number</rdfs:label> <rdfs:domain rdf:resource="#Product"/> <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#nonNegativeInteger"/> <rdf:type rdf:resource="http://www.w3.org/2001/10/daml+oil#UniqueProperty"/> </daml:DatatypeProperty> You may notice that we are stating that the Broadening the Concept of ClassThe most important facilities provided by DAML+OIL are those that give
designers more expressiveness in classifying resources. The class
One example of an added feature in <rdfs:Class rdf:ID="MaritalStatus"/> <MaritalStatus rdf:ID="Married"/> <MaritalStatus rdf:ID="Divorced"/> <MaritalStatus rdf:ID="Single"/> <MaritalStatus rdf:ID="Widowed"/> Basically, this is just the definition of the instances of the class in the schema. The main problem is that the enumeration is not closed. Anyone can merrily add items to the enumeration without restriction. In a few cases, this might not be a problem, but usually there needs to be tight control over the items in an enumeration. DAML+OIL allows you to state that a class is defined by being one of a given set of instances. <daml:Class ID="Availability">
<daml:oneOf parseType="daml:collection">
<daml:Thing rdf:ID="InStock">
<rdfs:label>In stock</rdfs:label>
</daml:Thing>
<daml:Thing rdf:ID="BackOrdered">
<rdfs:label>Back ordered</rdfs:label>
</daml:Thing>
<daml:Thing rdf:ID="SpecialOrder">
<rdfs:label>Special order</rdfs:label>
</daml:Thing>
</daml:oneOf>
</daml:Class>
The The
Each item in the enumeration is defined as an instance of
|
|
| |
| Contact Us | Our Mission | Privacy Policy | Advertise With Us | Site Help | |
| Copyright © 2002 O'Reilly & Associates, Inc. | |