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|
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.
Attribute. rdf:about identifies the resource to which the following statements apply. The value of the attribute is a URI reference.
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.
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.
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.
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.
Attribute. rdf:resource is used in a property declaration to specify that some other resource, not a literal, is the value of the property.
Attribute value. Literal parsetype means that the content of the element is a literal and any markup will not be interpreted by RDF.
Attribute value. Resource parsetype specifies that the element content must be treated as if it were the content of an rdf:Description element.
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.
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.
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.
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>
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.
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>
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.
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.
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>