RDF and OWL Compatibility

Main Document
Overview
Usage Examples
Serialization and Deserialization
Resource Classes
RDF and OWL Serialization
RDF and OWL Deserialization

Overview

For an introduction to RDF and OWL, consult the RDF Primer and the OWL Web Ontology Language Guide.

There is an obvious correspondence between the representation of a slot value as a specialization of an ATMS node and the RDF subject-predicate-object triple.

Similarly, there is a clear correspondence between CLOS and RDF Schema, although there is no specialization of properties in CLOS. Conversely, RDF Schema does not allow the restriction of a property (or in CLOS parlance, slot) within a class. Nor does it make any provision for cardinality information. These features are to be found in OWL.

The relationship with OWL, however, is less straightforward.

The CLOS class hierarchy is solely a mechanism for elision, for recording information (properties and rules) in one place (a superclass), and having it automatically propagate to many places (its subclasses). The name of a class is merely an abbreviation for what it encapsulates (a description of its instances).

Specialized class-based reasoning has been added to this framework, in the form of classify. It infers that an instance of a class is also a member of a subordinate class that restricts the values of its properties. (change-class can then be used to change the instance’s class to the subordinate class.)

Its use presumes that subordinate classes are disjoint (see Compound Objects), and that either they have been fully enumerated and are differentiated by varying restrictions of the same property or properties, or that each subordinate class constitutes a definition, that is, contains sufficient as well as necessary conditions for membership.

Its use further presumes that the subordinate classes define additional properties, whose values can then be sought.

In contrast, a primary purpose of OWL DL is to enable one to state that, e.g., ‘WhiteWine is exactly the intersection of the class Wine and the set of things that are white in colour’. This amounts to stating that the instances to which this description applies are called WhiteWine.

The overlap with OWL, therefore, is roughly the OWL Lite subset. The knowledge representation facilities outlined above do not constitute, as a whole or in part, a description logic.

The implemented subset of OWL Lite comprises those features that have counterparts in RDF, plus property restrictions and property characteristics. Cardinality expressions with arbitrary bounds (deriving from OWL DL) and classes as instances (OWL Full) are, however, permitted. Identity of classes, and of instances, is implemented by associating multiple names (as accepted by find-class and find-instance) with a single object.

Table 1: Implemented Language Subsets
  RDF RDFS OWL
Attributes resource, about, ID, datatype    
Elements RDF, Description, Property, type comment, label, Class, Resource, subClassOf, subPropertyOf, domain, range, Datatype Ontology, Class, ObjectProperty, DatatypeProperty, Thing, sameAs, TransitiveProperty, SymmetricProperty, FunctionalProperty, inverseOf, InverseFunctionalProperty, Restriction, onProperty, cardinality, minCardinality, maxCardinality, allValuesFrom, someValuesFrom
Elements that have no effect   seeAlso, isDefinedBy equivalentClass, equivalentProperty, differentFrom, AllDifferent, distinctMembers, versionInfo, imports, priorVersion, backwardCompatibleWith, incompatibleWith, AnnotationProperty, OntologyProperty, DeprecatedClass, DeprecatedProperty

User-defined datatypes are used to denote enumerated sets of values and numeric subranges.

Usage Examples

There are example formalizations (ontology fragments) of so-called stuff (with associated datatypes) and medical terms (plus datatypes).

Serialization and Deserialization

The following should be read in conjunction with XML Serialization and Deserialization.

In whatever combination is appropriate, :owl, :rdfs and :rdf should appear in *namespaces*; :owl, if present, must precede :rdfs.

The value of *target-namespace* is interpreted as the base URI of the document.

Resource Classes

The distinction between rdfs:Class and owl:Class (the latter being a subclass of the former) relevant to OWL Lite is reflected in the CLOS class hierarchy, though not their subclass relationship with rdfs:Resource. They are instances of resource-class.

In the absence of any property classes, owl:Thing is treated as identical to rdfs:Resource.

Subclasses of these classes, and their slot definitions, can store multilingual labels, corresponding to rdfs:label elements of a class or property.

Returns multilingual label information for class, the value of the :label initialization argument.

Returns multilingual label information for slot, the value of the :label initialization argument.

This information may take the form of a string, a list comprising a single string (if supplied as a defclass class option), or a list of language-label pairs:

Returns the language tag associated with the label.

Returns the content of the label.

During deserialization information is always stored in this form.

RDF and OWL Serialization

The generic functions serialize-object, serialize-class and serialize-class-hierarchy accept :rdf, :rdfs or :owl as their format argument. serialize-object will only recursively serialize unnamed objects.

Recursively serializes object and all (i.e., named and unnamed) objects to which it refers. Does not detect circularity or repetition (but see serialize-slot). global indicates whether the element corresponding to object is defined globally in the schema; it defaults to non-nil.

serialize-class generates both property and class definitions. If generating RDF Schema definitions, this output may not capture all the information in the CLOS hierarchy. When applied to an instance of range-class, it generates a single rdfs:Datatype element.

When generating RDF Schema definitions, determines whether multiple domain and range elements, gleaned from different slot descriptions of the same name in the CLOS hierarchy, may appear within a rdfs:Property definition. If nil (the default) it will reflect only the most general slot description in the hierarchy.

Variation on with-xml, enclosing forms in an rdf:RDF element.

Like with-rdf, but incorporating an owl:Ontology element. about is used to set the base URI of the document; the value of rdf:about attribute is left empty.

RDF and OWL Deserialization

Both property specialization and property characteristics (other than owl:FunctionalProperty) are implemented by means of automatically-generated rules.

owl:someValuesFrom is treated as a kind of property specialization: a rule is generated to propagate values that satisfy the restriction to a specially-created slot with restricted cardinality. In addition, the effect of hasValue (OWL DL) can be achieved by specialization to individuals (i.e., by defining a class, say, no-other-than-foo that has a single instance, foo).

RDF containers and collections are unimplemented.

An attempt to deserialize an unimplemented feature is an error. But see define-ignored-elements.

Used to accumulate slot specifications derived from property and class definitions, to be processed upon reaching a closing rdf:RDF tag.

Binds the above variable. Within a deserialization unit (or if absent) an attempt to redefine a property is treated as an error.