Menu

DAML Reference

May 1, 2002

Uche Ogbuji and Roxane Ouellet

This third installment of our series looking at the DARPA Agent Markup Language provides a quick reference for concepts from RDF, RDF Schema and DAML.


1.  RDF Syntax Elements
2.  DAML+OIL Syntax Elements
3.  RDF Classes and Properties
4.  RDFS Classes and Properties
5.  DAML Classes and Properties

1. RDF Syntax Elements

Namespace URI: http://www.w3.org/1999/02/22-rdf-syntax-ns#
Specification: http://www.w3.org/TR/1999/REC-rdf-syntax-19990222

The syntax elements in the RDF XML syntax have been designed to allow grouping of multiple statements about a resource into an rdf:Description element. These elements are not part of the model and are therefore not deserialized into triples.

1.1. rdf:about

Attribute. rdf:about identifies the resource to which the following statements apply. The value of the attribute is a URI reference.

1.2. rdf:Description

Element. The RDF XML syntax groups multiple statements for the same resource into this rdf:Description element. The rdf:Description element references, in the rdf:about attribute, the resource to which each of the statements apply. If the resource does not yet exist (i.e., does not yet have a resource identifier), then a rdf:Description element can supply the identifer for the resource using an rdf:ID attribute.

1.3. rdf:ID

Attribute. rdf:ID also identifies the resource to which the following statements apply. The resource will be created in the default namespace of the declaring document. The resulting URI is made by concatenating the namespace with the value of the attribute.

1.4. rdf:li

Element. rdf:li is used by RDF/XML as a convenience element to avoid having to explicitly number each member of a rdf:Bag, rdf:Seq, or rdf:Alt. The rdf:li element assigns the properties _1, _2, and so on as necessary. The element name "li" was chosen as a mnemonic with the term "list item" from HTML.

1.5. rdf:parseType

Attribute. rdf:ParseType is an attribute whose values are either Resource or Literal. The value is case-sensitive. DAML+OIL introduced the daml:collection value, see daml:collection

1.6. rdf:RDF

Element. The RDF element is a simple wrapper that marks the boundaries in an XML document between which the content is explicitly intended to be mapped into an RDF data model instance, including RDF, RDFS, and DAML+OIL.

1.7. rdf:resource

Attribute. rdf:resource is used in a property declaration to specify that some other resource, not a literal, is the value of the property.

1.8. Literal

Attribute value. Literal parsetype means that the content of the element is a literal and any markup will not be interpreted by RDF.

1.9. Resource

Attribute value. Resource parsetype specifies that the element content must be treated as if it were the content of an rdf:Description element.

1.10. xml:lang

Namespace URI: http://www.w3.org/2000/10/XML#
Specification: http://www.w3.org/TR/2001/REC-xml-20001006

Attribute. The xml:lang attribute may be used as defined by XML to associate a language with the property value.

2. DAML+OIL Syntax Elements

Namespace URI: http://www.daml.org/2001/03/daml+oil#
Specification: http://www.daml.org/2001/03/daml+oil.daml

2.1. daml:collection

Attribute value. DAML+OIL needs to represent unordered collections of items (also known as bags or multisets) in a number of constructions, such as daml:intersectionOf, daml:unionOf, daml:oneOf, daml:disjointUnionOf. DAML+OIL exploits the rdf:parseType attribute to extend the syntax of RDF with a convenient notation for such collections. Whenever an element has the rdf:parseType attribute with value "daml:collection", the enclosed elements must be interpreted as elements in a list structure, constructed using the elements daml:List, daml:first, daml:rest and daml:nil.

3. RDF Classes and Properties

Namespace URI: http://www.w3.org/1999/02/22-rdf-syntax-ns#
Specification: http://www.w3.org/TR/1999/REC-rdf-syntax-19990222

3.1. rdf:Alt

rdf:Alt represents an instance of an Alternative container resource type. It represents alternatives for the (single) value of a property. The members of the collection are denoted by rdf:li in the XML syntax and by _1, _2, _3 etc. in the model.

3.2. rdf:Bag

rdf:Bag represents an instance of a Bag container resource type. A Bag is an unordered list of resources or literals. The members of the collection are denoted by rdf:li in the XML syntax and by _1, _2, _3 etc. in the model.

3.3. rdf:Property

rdf:Property represents the subset of RDF resources that are properties. A property is a specific aspect, characteristic, attribute, or relation used to describe a resource. For instance in the following statement "Mr. John Smith is a member of the Boulder Nordic Club", being a member would be a relation that Mr. Smith has with the Club, therefore member can be considered an rdf:Property of Mr. Smith. In XML that statement could be defined as shortly as this:

  <rdf:Description rdf:about="#jsmith">
    <member rdf:resource="#BoulderNordicClub"/>
  </rdf:Description>

3.4. rdf:Seq

rdf:Seq represents an instance of a Sequence container resource type. A Sequence is an ordered list of resources or literals. The members of the collection are denoted by rdf:li in the XML syntax and by _1, _2, _3 etc. in the model.

3.5. rdf:Statement

When a resource represents a reified statement and has an rdf:type of rdf:Statement, then that resource must have a rdf:subject property, one rdf:object property, and one rdf:predicate property. A reified statement is a statement about another statement.

For instance the statement "The manager says that Mr. John Smith is a member of the Boulder Nordic Club" is a reified statement where the statement "Mr. John Smith is a member of the Boulder Nordic Club" is attributed to the manager. The syntax of that statement could look like this:

  <rdf:Statement>
    <rdf:subject rdf:resource="#jsmith" />
    <rdf:predicate rdf:resource="#member" />
    <rdf:object rdf:resource="#BoulderNordicClub">
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
    <attributedTo rdf:resource="#manager"/>
  </rdf:Statement>

3.6. rdf:object

rdf:type rdf:Property

rdf:object identifies the value of the property in the modeled statement. The value of the object property is the object in the original rdf:Statement. In our example the resource "#BoulderNordicClub" is the rdf:object.

3.7. rdf:predicate

rdf:type rdf:Property
rdf:predicate identifies the original property itself in the modeled statement. In our example, the resource "#member" represents the member property.

3.8. rdf:subject

rdf:type rdf:Property

rdf:subject identifies the resource being described by the modeled statement; that is, the value of the subject property is the resource about which the original rdf:Statement was made. Therefore, "#jsmith" was our rdf:subject.

3.9. rdf:type

rdf:type rdf:Property

rdf:type indicates that a resource is a member of a class, and thus has all the characteristics that are to be expected of a member of that class. Note that a resource can be an instance of more than one class.

Take the following statements as an example:

  <rdf:Description rdf:ID="TreZetta1010">
    <rdf:type rdf:about="#Footwear"/>
    <rdf:type rdf:about="#HikingGear"/>
  </rdf:Description>

Not only are we saying that the resource "#TreZetta1010" is an instance of both "#Footwear" and "#HikingGear" but by inference it is also of rdf:type "#HikingShoes".

  <daml:Class rdf:ID="HikingShoes">
    <rdfs:label>Hiking Shoes</rdfs:label>
    <rdfs:comment>An item worn on the feet while hiking</rdfs:comment>
    <daml:intersectionOf rdf:parseType="daml:collection">
      <daml:Class rdf:about="#HikingGear"/>
      <daml:Class rdf:about="#Footwear"/>
    </daml:intersectionOf>
  </daml:Class>

3.10. rdf:value

rdf:type rdf:Property

rdf:value specifies the value of a property: it can be a literal or a resource defined by the attribute rdf:resource.

4. RDFS Classes and Properties

Namespace URI: http://www.w3.org/2000/01/rdf-schema##
Specification: http://www.w3.org/TR/2000/CR-rdf-schema-20000327

4.1. rdfs:Class

rdfs:Class corresponds to the generic concept of a Type or Category, similar to the notion of a Class in object-oriented programming languages. When a schema defines a new class, the resource representing that class must have an rdf:type property whose value is the resource rdfs:Class.

4.2. rdfs:Resource

Anything described by RDF expressions is called a resource and is considered to be an instance of the class rdfs:Resource. The RDF class rdfs:Resource represents the set called "Resources" in the formal model for RDF presented in section 5 of the RDF Model and Syntax specification.

4.3. rdfs:comment

rdf:type rdf:Property

rdfs:comment is a human-readable description of a resource.

4.4. rdfs:domain

rdf:type rdf:Property

rdfs:domain indicates the classes on whose member a property can be used. (each containing a class-expression). If there are multiple domains, then according to DAML+OIL semantics, the domain is the union of all domain specifications. Warning: this is different from the semantics in RDFS.

4.5. rdfs:isDefinedBy

rdf:type rdf:Property

rdfs:isDefinedBy is a subproperty of rdfs:seeAlso and indicates the resource defining the subject resource. Its most common use is to identify an RDF schema that is not otherwise identified, i.e. the URI in the resource attribute does not indicate the URI of its schema.

4.6. rdfs:label

rdf:type rdf:Property

rdfs:label is a human-readable version of a resource name and it can only be a string literal.

4.7. rdfs:range

rdf:type rdf:Property

rdfs:range indicates the classes that the values of a property must be members of. If there are multiple ranges, then according to DAML+OIL semantics, the range is the union of all range specifications. Warning: this is different from the semantics in RDFS.

4.8. rdfs:seeAlso

rdf:type rdf:Property

rdfs:seeAlso specifies a resource that might provide additional information about the subject resource.

4.9. rdfs:subClassOf

rdf:type rdf:Property

rdfs:subClassOf is a transitive property that specifies a subset-superset relation between classes. Both the subject and object of the rdfs:subClassOf property must be class-expression. An example of a rdfs:subClassOf can represent a specialization between classes, for instance, a ball is not only a product but one that is used in sports.
  <daml:Class rdf:ID="Ball">
    <rdfs:label>Ball</rdfs:label>
    <rdfs:comment>A ball designed to be in sports</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#Product"/>
  </daml:Class>

4.10. rdfs:subPropertyOf

rdf:type rdf:Property

rdfs:subPropertyOf is an instance of rdf:Property used to specify that one property is a specialization of another. A property can never be declared to be a subproperty of itself, nor of any of its own subproperties. For instance we have defined a member property, we could then define an inactive member that is a an rdfs:subProperty of member.
  <daml:ObjectProperty rdf:ID="inactiveMember">
    <rdfs:label>Inactive Member</rdfs:label>
    <rdfs:comment>A member that temporarily stopped its
      activity within the Club.</rdfs:comment>
    <rdfs:subPropertyOf rdf:resource="#member"/>
  </daml:ObjectProperty>

5. DAML Classes and Properties

Namespace URI: http://www.daml.org/2001/03/daml+oil#
Specification: http://www.daml.org/2001/03/daml+oil.daml

5.1. daml:Class

rdfs:subClassOf rdfs:Class

The class of all "object" classes.

5.1.1. Syntax

A daml:Class contains part of the definition of an object class. A class refers to a class name using either rdf:about or rdf:ID attributes, and contains:

5.1.2. Syntax

A class-expression is the name used in this document for either:

5.2. daml:Datatype

rdf:type rdfs:Class
rdfs:subClassOf rdfs:Class

Instances of daml:Datatype are datatypes instead of object classes like instances of daml:Class. A datatype is a simple type such as those defined in the W3C XML Schema; it includes string, numbers, date, etc. The daml:Datatype class is disjoint from the daml:Class class, therefore no instance can be a datatype and an object class.

5.3. daml:DatatypeProperty

rdf:type daml:Class
rdfs:subClassOf rdfs:Property

The rdfs:range value of a daml:DatatypeProperty is an instance of daml:Datatype. An example of a daml:DatatypeProperty is the #productNumber property, its range is a xsd:nonNegativeInteger datatype as defined in the XML Schema specification.

5.4. daml:List

rdf:type daml:Class
rdfs:subClassOf rdf:Seq

A daml:List is a set of statements which recursively breaks the list down into the first element, daml:first, and the sublist consisting of the rest of the elements daml:rest. When the last element is reached, the sublist of remaining elements is a special DAML resource daml:nil.

5.5. daml:Nothing

rdf:type daml:Class

The class with no things in it.

5.6. daml:ObjectProperty

rdf:type daml:Class
rdfs:subClassOf rdf:Property

The rdfs:range value of a daml:ObjectProperty is of rdf:type, daml:Class, or any of its sub-classes. Any instance of any class, except daml:Datatype ,can be the value of the range of an instance of a daml:ObjectProperty. An example of a daml:ObjectProperty is the #gear property, its range is a #Product which is of rdf:type daml:Class.

5.6.1. Syntax

A property (daml:ObjectProperty and daml:DatatypeProperty) contains:

5.7. daml:Ontology

rdf:type rdfs:Class
rdfs:subClassOf rdf:Property

daml:Ontology is the DAML+OIL header. This provides certain metadata for the ontology itself.

5.7.1. Syntax

A daml:Ontology class contains zero or more daml:versionInfo and daml:imports properties.

5.8. daml:Restriction

rdf:type daml:Class
rdfs:subClassOf daml:Class

something is in the class R if it satisfies the attached restrictions, and vice versa.

5.8.1. Syntax

daml:Restriction is a property restriction which is a special kind of class-expressions. It implicitly defines an anonymous class, namely, the class of all objects that satisfy the restriction on their properties. daml:Restriction contains:

5.9. daml:Thing

rdf:type daml:Class

The most general (object) class in DAML. This is equal to the union of any class and its complement.

5.10. daml:TransitiveProperty

rdf:type daml:Class
rdfs:subClassOf daml:ObjectProperty

daml:TransitiveProperty is a daml:ObjectProperty that is transitively applied. If Mr. John Smith is a member of the Boulder Nordic Club (BNC) and the BNC is a member of the American Cross Country Skiers (ACCS), then Mr. Smith is also a meber of the ACCS.

5.11. daml:UnambiguousProperty

rdf:type daml:Class
rdfs:subClassOf daml:ObjectProperty

a daml:UnambiguousProperty is a property that has only one possible subject per object; it is an injective property. For example, if Mr.Smith position in the race is first, and there was tie in the race, then the person who came in first place in the race is Mr. Smith and nobody else.

5.12. daml:UniqueProperty

rdf:type daml:Class
rdfs:subClassOf rdf:Property

daml:UniqueProperty is a property that has only one possible value, it is a short-cut for a property with a daml:maxCardinality of 1. Example: Mount Everest is the highest peak on Earth. No other mountain is the highest peak.

5.13. daml:cardinality

rdf:type daml:Property
rdfs:domain xsd:nonNegativeInteger
rdfs:range daml:Restriction

daml:cardinality determine the exact number of possible values for a given property. For instance, a daml:UniqueProperty is like a property with a daml:cardinality equal to 1.

5.14. daml:cardinalityQ

rdf:type daml:Property
rdfs:domain xsd:nonNegativeInteger
rdfs:range daml:Restriction

daml:cardinalityQ is like daml:cardinality except that it specifies the rdf:type of the possible values of the property. Example, not only is there a single highest peak on Earth, but that peak must be natural, i.e. of rdf:type Mountain. Something of another type would be considered the highest structure and not the highest peak.

5.15. daml:complementOf

rdf:type daml:Property
rdfs:domain daml:Class
rdfs:range daml:Class

daml:complementOf is a property that specifies that if something is an instance of X, and Y is the daml:complement of X, then Y cannot be an instance of X.

5.15.1. Syntax

daml:complementOf contains a single class-expressions and defines the class that consists of exactly all objects that do not belong to the class-expressions. It is analogous to logical negation but restricted to objects only.

5.16. daml:differentIndividualFrom

rdf:type daml:Property
rdfs:domain daml:Thing
rdfs:range daml:Thing

daml:differentIndividualFrom property means that an instance of a class is specifically not the same as some other instance.

5.17. daml:disjointUnionOf

rdf:type daml:Property
rdfs:subClassOf rdf:Property

daml:disjointUnionOf property means that a class contains all the disjoint instances of the specified classes. For instance our class #Product is made of all the instances of #CurrentProduct, #DiscontinuedProduct, and #UnreleasedProduct, but no product can be an instance of more than one of the three latter classes.

5.17.1. Syntax

daml:disjointUnionOf contains a list of class-expressions.

5.18. daml:disjointWith

rdf:type daml:Property
rdfs:domain daml:Class
rdfs:range daml:Class

The daml:disjointWith property states that all the instances of the class will not be instances of the class it is disjoint with. In our previous example, we could have said that
  <rdf:Description rdf:about="#CurrentProduct">
    <daml:disjointWith rdf:resource="#DiscontinuedProduct"
  </rdf:Description>

5.18.1. Syntax

daml:disjointWith contains a class-expression, it means that no instances of the class-expression are common to the subject.

5.19. daml:equivalentTo

rdf:type daml:Property
rdfs:subClassOf rdf:Property

daml:equivalentTo means that X is equivalent to Y, therefore it can be replaced by it.

5.19.1. Syntax

daml:equivalentTo has the same semantics as the daml:sameClassAs property when it is applied to a class.

5.20. daml:first

rdf:type daml:Property
rdfs:subClassOf daml:List

daml:first represents the first element of a daml:List.

5.21. daml:hasClass

rdf:type daml:Property
rdfs:domain daml:Restriction
rdfs:range rdfs:Class
The daml:hasClass property specifies that at least one value of the property must be of the rdf:type in order to satisfy a restriction.

5.21.1. Syntax

daml:hasClass property contains a class-expression or a datatype reference and defines the class of all objects for which at least one value of the property is a member of the class-expressions or datatype.

5.22. daml:hasClassQ

rdf:type daml:Property
rdfs:domain daml:Restriction
rdfs:range rdfs:Class

The daml:hasClassQ property is used for specifying class restriction with daml:cardinalityQ constraints. Which means that not only must there be at least one of the values of the property with the given class (as with daml:hasClass), but the number of such properties must also meet the given cardinality rules. So, for instance, if we wish to make a rule that a BasketballTeam has 5 StartingPlayers, we can do so using a daml:hasClassQ of StartingPlayer and a daml:cardinalityQ of 5.

5.23. daml:hasValue

rdf:type daml:Property
rdfs:domain daml:Restriction

daml:hasValue property is used to specify that a property must have at least one value equivalent to the specified value.

5.23.1. Syntax

daml:hasValue property contains a reference to an individual object or a datatype value and defines the class of all objects for whom the property has at least one value equal to the named object or datatype value.

5.24. daml:imports

rdf:type daml:Property

5.24.1. Syntax

Each daml:imports statement references another DAML+OIL ontology containing definitions that apply to the current DAML+OIL resource. Each reference consists of a URI specifying where the ontology is to be imported from. daml:imports are transitive.

5.25. daml:intersectionOf

rdf:type daml:Property
rdfs:domain daml:Class
rdfs:range daml:List

daml:intersectionOf property means that the defined class contains all the instances that belong to all the classes in the list. In our example, the #HikingShoes class instances must be instances of both #HikingGear and #Footwear.

5.25.1. Syntax

daml:intersectionOf contains a list of class-expressions and defines the class that consists of exactly all the objects that are common to all class-expressions from the list. It is analogous to logical conjunction.

5.26. daml:inverseOf

rdf:type daml:Property
rdfs:domain daml:ObjectProperty
rdfs:range daml:ObjectProperty

daml:inverseOf property means that it is the inverse of another property. For example, a product is used for a specific activity, an ice axe for mountaineering. The inverse relation is that one instance of mountaineering gear is an ice axe. Here #gear is the daml:inverseOf #usedFor.

5.27. daml:item

rdfs:domain daml:ObjectProperty

daml:item property represents an item in a daml:List, it is either a daml:first element or a part of the daml:rest.

5.28. daml:maxCardinality

rdf:type daml:Property
rdfs:domain daml:Restriction
rdfs:range xsd:nonNegativeInteger

daml:maxCardinality determine the maximum number of possible values for a given property.

5.29. daml:maxCardinalityQ

rdf:type daml:Property
rdfs:domain daml:Restriction
rdfs:range xsd:nonNegativeInteger

daml:maxCardinalityQ determine the maximum number of possible values of a certain rdf:type for a given property.

5.30. daml:minCardinality

rdf:type daml:Property
rdfs:domain daml:Restriction
rdfs:range xsd:nonNegativeInteger


daml:minCardinality determine the minimum number of possible values for a given property.

5.31. daml:minCardinalityQ

rdf:type daml:Property
rdfs:domain daml:Restriction
rdfs:range xsd:nonNegativeInteger

daml:minCardinalityQ determine the minimum number of possible values of a certain rdf:type for a given property.

5.32. daml:nil

rdf:type daml:List

daml:nil represents the empty list, used as the value of daml:rest when no more items are in the daml:List.

5.33. daml:onProperty

rdf:type daml:Property
rdfs:domain daml:Restriction
rdfs:range rdf:Property
daml:onProperty property is used on a daml:Restriction class to specify the property the restriction will act on.

5.33.1. Syntax

daml:onProperty property refers to a property name (a URI) by the attribute rdf:resource.

5.34. daml:oneOf

rdf:type daml:Property
rdfs:domain daml:Class
rdfs:range daml:List

daml:oneOf property lists all the things that are instances of the domain. This lets us define classes by enumerating the members.

5.34.1. Syntax

daml:oneOf contains a list of the objects that are its instances. The class defined by the daml:oneOf property contains exactly the enumerated objects, declared using daml:Thing.

5.35. daml:rest

rdf:type daml:Property
rdfs:domain daml:List
rdfs:range daml:List

daml:rest represents all parts of daml:List except daml:first.

5.36. daml:sameClassAs

rdf:type daml:Property
rdfs:domain daml:Class
rdfs:range daml:Class
rdfs:subPropertyOf daml:equivalentTo
rdfs:subPropertyOf rdfs:subClassOf

daml:sameClassAs property means that the value of the property is an equivalent class to its subject.

5.36.1. Syntax

daml:sameClassAs property asserts that the subject is equivalent to the class-expression(i.e. the subject and all the class-expression must have the same instances).

5.37. daml:sameIndividualAs

rdf:type daml:Property
rdfs:domain daml:Thing
rdfs:range daml:Thing
rdfs:subPropertyOf daml:equivalentTo


daml:sameIndividualAs property states that the value of the property is the same individual as its subject.

5.38. daml:samePropertyAs

rdf:type daml:Property
rdfs:subPropertyOf daml:equivalentTo
rdfs:subPropertyOf rdfs:subPropertyOf

daml:samePropertyAs defines that the value is an equivalent property to its subject.

5.38.1. Syntax

daml:samePropertyAs asserts that the subject is equivalent to the named property (i.e. they must have the same instances).

5.39. daml:toClass

rdf:type daml:Property
rdfs:domain daml:Restriction
rdfs:range rdfs:Class

The daml:toClass property means that only instances of the specified class can be values of the property. For example, an obsolete activity is one for which all its gear has been discontinued.
  <daml:Class rdf:ID="ObsoleteActivity">
    <rdfs:label>Obsolete activity</rdfs:label>
    <rdfs:comment>Activities for which all related
      products have been discontinued</rdfs:comment>
    <daml:intersectionOf rdf:parseType="daml:collection">
      <daml:Class rdf:resource="#Activity"/>
      <daml:Restriction>
        <daml:onProperty rdf:resource="#gear"/>
        <daml:toClass rdf:resource="#DiscontinuedProduct"/>
      </daml:Restriction>
    </daml:intersectionOf>
  </daml:Class>

5.39.1. Syntax

The daml:toClass property contains a class-expressions and defines the class of all objects for whom the values of the property all belong to the class-expressions.

5.40. daml:unionOf

rdf:type daml:Property
rdfs:domain daml:Class
rdfs:range daml:List

The daml:unionOf property means that a class contains all the instances of all the classes it is the unionOf. For example, all camping and hiking products are considered family products.

5.40.1. Syntax

daml:unionOf contains a list of class-expressions and defines the class that consists of all the objects that belong to at least one of the class-expressions from the list. It is analogous to logical disjunction.

5.41. daml:versionInfo

rdf:type daml:Property

daml:versionInfo is an arbitrary value that describes versioning information for the document. It can be a simple string, as we have it here, or a complex RDF or literal XML structure.