Web Ontology Language: OWL Grigoris Antoniou and Frank van Harmelen Department of Computer Science, University of Crete, ga@csduocgr Department of Al, Vrije Universiteit Amsterdam Frank, van Harmelen@cs. vu, nl 1 Motivation and overview The expressivity of RDF and RDF Schema that was described in [12 is de- liberately very limited: RDF is(roughly) limited to binary ground predicates and RDF Schema is(again roughly) limited to a subclass hierarchy and a property hierarchy, with domain and range definitions of these properties However, the Web Ontology Working Group of W3C3 identified of characteristic use-cases for Ontologies on the Web which would require much more expressiveness than RDF and RDF Schema A number of research groups in both America and Europe had already identified the need for a more powerful ontology modelling language. This lead to a joint initiative to define a richer language, called DAML+oiL(the name is the join of the names of the American proposal DAML-ont, and the European language OIL) DAML+OIL in turn was taken as the starting point for the W3C Web Ontology Working Group in defining OWL, the language that is aimed to be the standardised and broadly accepted ontology language of the Semantic In this chapter, we first describe the motivation for OWL in terms of its requirements, and the resulting non-trivial relation with RDF Schema. We then describe the various language elements of OWL in some deta Ontology languages allow users to write explicit, formal conceptualizations of domains models. The main requirements are 3http://www.w3.org/2001/sw/webont http://www.daml.org/2001/03/daml+oil-index.html http://www.daml.org/2000/10/daml-ont.html http://www.ontoknowledge.org/
Web Ontology Language: OWL Grigoris Antoniou1 and Frank van Harmelen2 1 Department of Computer Science, University of Crete, ga@csd.uoc.gr 2 Department of AI, Vrije Universiteit Amsterdam, Frank.van.Harmelen@cs.vu.nl 1 Motivation and Overview The expressivity of RDF and RDF Schema that was described in [12] is deliberately very limited: RDF is (roughly) limited to binary ground predicates, and RDF Schema is (again roughly) limited to a subclass hierarchy and a property hierarchy, with domain and range definitions of these properties. However, the Web Ontology Working Group of W3C3 identified a number of characteristic use-cases for Ontologies on the Web which would require much more expressiveness than RDF and RDF Schema. A number of research groups in both America and Europe had already identified the need for a more powerful ontology modelling language. This lead to a joint initiative to define a richer language, called DAML+OIL4 (the name is the join of the names of the American proposal DAML-ONT5 , and the European language OIL6 ). DAML+OIL in turn was taken as the starting point for the W3C Web Ontology Working Group in defining OWL, the language that is aimed to be the standardised and broadly accepted ontology language of the Semantic Web. In this chapter, we first describe the motivation for OWL in terms of its requirements, and the resulting non-trivial relation with RDF Schema. We then describe the various language elements of OWL in some detail. Requirements for ontology languages Ontology languages allow users to write explicit, formal conceptualizations of domains models. The main requirements are: 3 http://www.w3.org/2001/sw/WebOnt/ 4 http://www.daml.org/2001/03/daml+oil-index.html 5 http://www.daml.org/2000/10/daml-ont.html 6 http://www.ontoknowledge.org/oil/
Grigoris Antoniou and Frank van Harmelen 1. a well-defined synta 2. a well-defined semantics 3. efficient reasoning support 4. sufficient expressive power The importance of a well-defined syntan is clear, and known from the area of programming languages: it is a necessary condition for machine-processing of information. All the languages we have presented so far have a well-defined syntax. DAML+OIL and Ow build upon RDF and RDFS and have the same kind of syntax. Of course it is questionable whether the XML-based RDF syntax is very ser-friendly, there are alternatives better suitable for humans(for example, see the OIL syntax). However this drawback is not very significant, because ultimately users will be developing their ontologies using authoring tools, or more generally ontology development tools, instead of writing them directly in DAML+OIL or OWl. Formal semantics describes precisely the meaning of knowledge. " Pre- cisely" here means that the semantics does not refer to subjective intuitions nor is it open to different interpretations by different persons(or machines) The importance of formal semantics is well-established in the domain of math ematical logic, among others edge. For ontological knowledge we may reason about. ason about the knowl- One use of formal semantics is to allow humans to re Class membership: If r is an instance of a class C, and C is a subclass of D, then we can infer that r is an instance of d Equivalence of classes: If class A is equivalent to class B, and class B equivalent to class C, then A is equivalent to C, too Consistency: Suppose we have declared a to be an instance of the class A. Further suppose that A is a subclass of b∩C A is a subclass of D B and D are disjoint Then we have an inconsistency because A should be empty, but has the instance a. This is an indication of an error in the ontology Classification: If we have declared that certain property-value pairs are sufficient condition for membership of a class A, then if an individual a satisfies such conditions. we can conclude that r must be an instance of Semantics is a prerequisite for reasoning support: Derivations such as the above can be made mechanically, instead of being made by hand. Reasoning support is important because it allows one to check the consistency of the ontology and the knowledge
2 Grigoris Antoniou and Frank van Harmelen 1. a well-defined syntax 2. a well-defined semantics 3. efficient reasoning support 4. sufficient expressive power 5. convenience of expression. The importance of a well-defined syntax is clear, and known from the area of programming languages; it is a necessary condition for machine-processing of information. All the languages we have presented so far have a well-defined syntax. DAML+OIL and OWL build upon RDF and RDFS and have the same kind of syntax. Of course it is questionable whether the XML-based RDF syntax is very user-friendly, there are alternatives better suitable for humans (for example, see the OIL syntax). However this drawback is not very significant, because ultimately users will be developing their ontologies using authoring tools, or more generally ontology development tools, instead of writing them directly in DAML+OIL or OWL. Formal semantics describes precisely the meaning of knowledge. “Precisely” here means that the semantics does not refer to subjective intuitions, nor is it open to different interpretations by different persons (or machines). The importance of formal semantics is well-established in the domain of mathematical logic, among others. One use of formal semantics is to allow humans to reason about the knowledge. For ontological knowledge we may reason about: • Class membership: If x is an instance of a class C, and C is a subclass of D, then we can infer that x is an instance of D. • Equivalence of classes: If class A is equivalent to class B, and class B equivalent to class C, then A is equivalent to C, too. • Consistency: Suppose we have declared x to be an instance of the class A. Further suppose that - A is a subclass of B ∩ C - A is a subclass of D - B and D are disjoint Then we have an inconsistency because A should be empty, but has the instance x. This is an indication of an error in the ontology. • Classification: If we have declared that certain property-value pairs are sufficient condition for membership of a class A, then if an individual x satisfies such conditions, we can conclude that x must be an instance of A. Semantics is a prerequisite for reasoning support: Derivations such as the above can be made mechanically, instead of being made by hand. Reasoning support is important because it allows one to • check the consistency of the ontology and the knowledge;
Web Ontology language: OWL check for unintended relationships between classes automatically classify instances in classes Automated reasoning support allows one to check many more cases than what can be done manually. Checks like the above are valuable for integrating and sharing ontologies from various source Formal semantics and reasoning support is usually provided by mapping an ontology language to a known logical formalism, and by using automated reasoners that already exist for those formalisms. We will see that OWL is (partially) mapped on a description logic, and makes use of existing reasoners such as FaCT and RACER Description logics are a subset of predicate logic for which efficient reason ing support is possible. See 13 for more detail. Limitations of the expressive power of RDF Schema RDF and RDFS allow the representation of some ontological knowledge. The main modelling primitives of RDF/RDFS concern the organization of vocab- ularies in typed hierarchies: subclass and subproperty relationships, domain and range restrictions, and instances of classes. However a number of other features are missing. Here we list a few: say eats, for all classes. Thus in RDF Schema we cannot declare perty, Local scope of properties: rdfs: range defines the range of a pre restrictions that apply to some classes only. For example, we cannot say that cows eat only plants, while other animals may eat meat, too. Disjointness of classes: Sometimes we wish to say that classes are disjoint For example, male and female are disjoint. But in RDF Schema we can only state subclass relationships, e. g. female is a subclass of person Boolean combinations of classes: Sometimes we wish to build new classes by combining other classes using union, intersection and complement. For example, we may wish to define the class person to be the disjoint union of the classes male and female RdF Schema does not allow such definitions Cardinality restrictions: Sometimes we wish to place restrictions on how many distinct values a property may or must take. For example, we woul like to say that a person has exactly two parents, and that a course taught by at least one lecturer. Again such restrictions are impossible to express in RDF Schema. Special characteristics of properties: Sometimes it is useful to say that a property is transitive(like "greater than), unique(like"is mother of") or the inverse of another property(ike“eats”and" is eaten by”)
Web Ontology Language: OWL 3 • check for unintended relationships between classes. • automatically classify instances in classes Automated reasoning support allows one to check many more cases than what can be done manually. Checks like the above are valuable for • designing large ontologies, where multiple authors are involved; • integrating and sharing ontologies from various sources. Formal semantics and reasoning support is usually provided by mapping an ontology language to a known logical formalism, and by using automated reasoners that already exist for those formalisms. We will see that OWL is (partially) mapped on a description logic, and makes use of existing reasoners such as FaCT and RACER. Description logics are a subset of predicate logic for which efficient reasoning support is possible. See [13] for more detail. Limitations of the expressive power of RDF Schema RDF and RDFS allow the representation of some ontological knowledge. The main modelling primitives of RDF/RDFS concern the organization of vocabularies in typed hierarchies: subclass and subproperty relationships, domain and range restrictions, and instances of classes. However a number of other features are missing. Here we list a few: • Local scope of properties: rdfs:range defines the range of a property, say eats, for all classes. Thus in RDF Schema we cannot declare range restrictions that apply to some classes only. For example, we cannot say that cows eat only plants, while other animals may eat meat, too. • Disjointness of classes: Sometimes we wish to say that classes are disjoint. For example, male and female are disjoint. But in RDF Schema we can only state subclass relationships, e.g. female is a subclass of person. • Boolean combinations of classes: Sometimes we wish to build new classes by combining other classes using union, intersection and complement. For example, we may wish to define the class person to be the disjoint union of the classes male and female. RDF Schema does not allow such definitions. • Cardinality restrictions: Sometimes we wish to place restrictions on how many distinct values a property may or must take. For example, we would like to say that a person has exactly two parents, and that a course is taught by at least one lecturer. Again such restrictions are impossible to express in RDF Schema. • Special characteristics of properties: Sometimes it is useful to say that a property is transitive (like “greater than”), unique (like “is mother of”), or the inverse of another property (like “eats” and “is eaten by”)
rigoris Antoniou and Frank van Harmelen we need an ontology language that is richer than RDF Schema, a language that offers these features and more. In designing such a language one should be aware of the tradeoff between expressive power and efficient reasoning sup port. Generally speaking, the richer the language is, the more inefficient the reasoning support becomes, often crossing the border of non-computability Thus we need a compromise, a language that can be supported by reasonably efficient reasoners, while being sufficiently expressive to express large classes of ontologies and know ledge Compatibility of OWL with RDF/RDFS Ideally, OWL would be an extension of RDF Schema, in the sense that OWL would use the RDF meaning of classes and properties( rdfs: Class rdfs: subClassOf, etc), and would add language primitives to support the richer expressiveness identified above Unfortunately, the desire to simply extend RDF Schema clashes with the trade-off between expressive power and efficient reasoning mentioned be- fore. RDF Schema has some very powerful modelling primitives, such as the rdfs: Class(the class of all classes) and rdf: Property(the class of all prop erties). These primitives are very expressive, and will lead to uncontrollable computational properties if the logic is extended with the expressive primitives dentified above Three species of OWL All this as lead to a set of requirements that may seem incompatible: efficient reasoning support and convenience of expression for a language as powerful as a combination of RDF Schema with a full logic. Indeed, these requirements have prompted w3C's Web Ontology Working Group to define Owl as three different sublanguages, each of which is geared towards fulfilling different aspects of these incompatible full set of require- OWL Full: The entire language is called OWL Full and uses all the OWL languages primitives(which we will discuss later in this chapter). It also allows to combine these primitives in arbitrary ways with RDF and RDF Schema. This includes the possibility(also present in RDF)to change the meaning of the pre-defined(RDF or OWL) primitives, by applying the language primitives to each other. For example, in OwL Full we could im- pose a cardinality constraint on the class of all classes, essentially limiting the number of classes that can be described in any ontology. The advantage of OWL Full is that it is fully upward compatible with RDF, both syntactically and semantically: any legal rdF document is also a legal OWL Full document, and any valid RDF/RDF Schema conclusion is also a valid OWL Full conclusion
4 Grigoris Antoniou and Frank van Harmelen So we need an ontology language that is richer than RDF Schema, a language that offers these features and more. In designing such a language one should be aware of the tradeoff between expressive power and efficient reasoning support. Generally speaking, the richer the language is, the more inefficient the reasoning support becomes, often crossing the border of non-computability. Thus we need a compromise, a language that can be supported by reasonably efficient reasoners, while being sufficiently expressive to express large classes of ontologies and knowledge. Compatibility of OWL with RDF/RDFS Ideally, OWL would be an extension of RDF Schema, in the sense that OWL would use the RDF meaning of classes and properties ( rdfs:Class, rdfs:subClassOf, etc), and would add language primitives to support the richer expressiveness identified above. Unfortunately, the desire to simply extend RDF Schema clashes with the trade-off between expressive power and efficient reasoning mentioned before. RDF Schema has some very powerful modelling primitives, such as the rdfs:Class (the class of all classes) and rdf:Property (the class of all properties). These primitives are very expressive, and will lead to uncontrollable computational properties if the logic is extended with the expressive primitives identified above. Three species of OWL All this as lead to a set of requirements that may seem incompatible: efficient reasoning support and convenience of expression for a language as powerful as a combination of RDF Schema with a full logic. Indeed, these requirements have prompted W3C’s Web Ontology Working Group to define OWL as three different sublanguages, each of which is geared towards fulfilling different aspects of these incompatible full set of requirements: • OWL Full: The entire language is called OWL Full, and uses all the OWL languages primitives (which we will discuss later in this chapter). It also allows to combine these primitives in arbitrary ways with RDF and RDF Schema. This includes the possibility (also present in RDF) to change the meaning of the pre-defined (RDF or OWL) primitives, by applying the language primitives to each other. For example, in OWL Full we could impose a cardinality constraint on the class of all classes, essentially limiting the number of classes that can be described in any ontology. The advantage of OWL Full is that it is fully upward compatible with RDF, both syntactically and semantically: any legal RDF document is also a legal OWL Full document, and any valid RDF/RDF Schema conclusion is also a valid OWL Full conclusion
Web Ontology Language: OWL The disadvantage of OWL Full is the language has become so powerful as to be undecidable, dashing any hope of complete (let alone efficient) reason OWL DL: In order to regain computational efficiency, OWL DL(short for: Description Logic)is a sublanguage of OWL Full which restricts the way in which the constructors from OWL and RDF can be used. We will give details later, but roughly this amounts to disallowing application of OWLs constructor's to each other, and thus ensuring that the language corresponds to a well studied description logic. The advantage of this is that it permits efficient reasoning support The disadvantage is that we loose full compatibility with RDF: an RDF document will in general have to be extended in some ways and restricted in others before it is a legal OWL DL document. Conversely, every legal OWL DL document is still a legal rdF document OwL Lite: An ever further restriction limits oWl dl to a subset of the language constructors. For example, OWL Lite excludes enumerated classes, disjointness statements and arbitrary cardinality(among others) The advantage of this is a language that is both easier to grasp(for users) and easier to implement(for tool builders) The disadvantage is of course a restricted expressivity. Ontology developers adopting OWL should consider which sublanguage best suits their needs. The choice between OwL Lite and OWL Dl depends on the extent to which users require the more-expressive constructs provided by OWL DL and OWL Full. The choice between OWL DL and OWl Full mainly depends on the extent to which users require the meta-modeling facilities of RDF Schema (e.g. defining classes of classes, or attaching properties to classes). When using OWL Full as compared to OWL DL, reasoning support is less predictable since complete OWl Full implementations will be imposs There are strict notions of upward compatibility between these three sub- Every legal Owl Lite ontology is a legal oWL dl ontology. Every legal OWL DL ontology is a legal OWL Full ontology. Every valid OWl Lite conclusion is a valid OWL DL conclusion Every valid OWL DL conclusion is a valid OWL Full conclus OWL still uses RDF and RDF Schema to a large extent all varieties of OWL use RDF for their syntax instances are declared as in RDF, using rdF descriptions and typing OWL constructors like owl: Class, owl: DatatypeProperty and owl: ObjectProperty are all specialisations of their RDF counterparts Figure 1 shows the subclass relationships between some modelling primi- tives of owl and RDF/ RDFS
Web Ontology Language: OWL 5 The disadvantage of OWL Full is the language has become so powerful as to be undecidable, dashing any hope of complete (let alone efficient) reasoning support. • OWL DL: In order to regain computational efficiency, OWL DL (short for: Description Logic) is a sublanguage of OWL Full which restricts the way in which the constructors from OWL and RDF can be used. We will give details later, but roughly this amounts to disallowing application of OWL’s constructor’s to each other, and thus ensuring that the language corresponds to a well studied description logic. The advantage of this is that it permits efficient reasoning support. The disadvantage is that we loose full compatibility with RDF: an RDF document will in general have to be extended in some ways and restricted in others before it is a legal OWL DL document. Conversely, every legal OWL DL document is still a legal RDF document. • OWL Lite: An ever further restriction limits OWL DL to a subset of the language constructors. For example, OWL Lite excludes enumerated classes, disjointness statements and arbitrary cardinality (among others). The advantage of this is a language that is both easier to grasp (for users) and easier to implement (for tool builders). The disadvantage is of course a restricted expressivity. Ontology developers adopting OWL should consider which sublanguage best suits their needs. The choice between OWL Lite and OWL DL depends on the extent to which users require the more-expressive constructs provided by OWL DL and OWL Full. The choice between OWL DL and OWL Full mainly depends on the extent to which users require the meta-modeling facilities of RDF Schema (e.g. defining classes of classes, or attaching properties to classes). When using OWL Full as compared to OWL DL, reasoning support is less predictable since complete OWL Full implementations will be impossible. There are strict notions of upward compatibility between these three sublanguages: • Every legal OWL Lite ontology is a legal OWL DL ontology. • Every legal OWL DL ontology is a legal OWL Full ontology. • Every valid OWL Lite conclusion is a valid OWL DL conclusion. • Every valid OWL DL conclusion is a valid OWL Full conclusion. OWL still uses RDF and RDF Schema to a large extent: • all varieties of OWL use RDF for their syntax • instances are declared as in RDF, using RDF descriptions and typing information • OWL constructors like owl:Class, owl:DatatypeProperty and owl:ObjectProperty are all specialisations of their RDF counterparts. Figure 1 shows the subclass relationships between some modelling primitives of OWL and RDF/RDFS
rigoris Antoniou and Frank van Harmelen rdfs Resource rdfs: Class rdf: Property owl Class owl: Object Propert Fig. 1. Subclass relationships between OWL and RDF/RDFS The original hope in the design of owl was that there would be a down- ward compatibility with corresponding re-use of software across the various layers. However, the advantage of full downward compatibility for OWL(that any OWl aware processor will also provide correct interpretations of any RDF Schema document) is only achieved for OWL Full, at the cost of computa tional intractability Chapter overview Section 2 presents OWL in some detail. Because OWL is such a new language, only very limited examples of its use have been published. Section 3 therefore lustrates the lang 2 The OWL Lang OWL builds on RDF and RDF Schema, and uses RDF's XML syntax. Since this is the primary syntax for OWL, we will use it here, but it will soon become clear that RDF/XML does not provide a very readable syntax. Because of this other syntactic forms for Owl have also been defined an XML-based syntax which does not follow the RDF conventions. This makes this syntax already significantly easier to read by humans an abstract syntax which is used in the language specification document This syntax is much more compact and readable then either the XML syntax or the RDF/XML synta a graphical syntax based on the conventions of the UML language(Uni- versal Modelling Language). Since UML is widely used, this will be an easy way for people to get familiar with OWL
6 Grigoris Antoniou and Frank van Harmelen rdfs:Class owl:Class owl:ObjectProperty owl:DatatypeProperty rdf:Property rdfs:Resource Fig. 1. Subclass relationships between OWL and RDF/RDFS The original hope in the design of OWL was that there would be a downward compatibility with corresponding re-use of software across the various layers. However, the advantage of full downward compatibility for OWL (that any OWL aware processor will also provide correct interpretations of any RDF Schema document) is only achieved for OWL Full, at the cost of computational intractability. Chapter overview Section 2 presents OWL in some detail. Because OWL is such a new language, only very limited examples of its use have been published. Section 3 therefore illustrates the language by giving a few examples. 2 The OWL Language Syntax OWL builds on RDF and RDF Schema, and uses RDF’s XML syntax. Since this is the primary syntax for OWL, we will use it here, but it will soon become clear that RDF/XML does not provide a very readable syntax. Because of this, other syntactic forms for OWL have also been defined: • an XML-based syntax which does not follow the RDF conventions. This makes this syntax already significantly easier to read by humans. • an abstract syntax which is used in the language specification document. This syntax is much more compact and readable then either the XML syntax or the RDF/XML syntax • a graphical syntax based on the conventions of the UML language (Universal Modelling Language). Since UML is widely used, this will be an easy way for people to get familiar with OWL
Web Ontology Language: OWL OWL documents are usually called OWL ontologies, and are RDF documents So the root element of a OWl ontology is an rdf: RDF element which als specifies a number of namespaces. For example xmlns:owl=http://www.w3.org/2002/07/owl# xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#" //www xmlns:xsd=http://www.w3.org/2001/xlmschema#"> An OWL ontology may start with a collection of assertions for hous keeping purposes. These assertions are grouped under an owl: Ontology ele- ment which contains comments version control and inclusion of other ontolo- gies. For example An example OWL ontology University Ontology The only of these assertions which has any consequences for the logical meaning of the ontology is owl: imports: this lists other ontologies whose content is assumed to be part of the current document ontology. Notice that while namespaces are used for disambiguation purposes, imported ontologies provide definitions that can be used. Usually there will be an import element for each used namespace, but it is possible to import additional ontologies for example ontologies that provide definitions without introducing any new Also note that owl: imports is a transitive property: if ontology A imports B and ology C Class elements Classes are defined using a owl: Class element. For example, we can define academicStaffMember"/> owl: Class is a subclass of rdfs: Class
Web Ontology Language: OWL 7 Header OWL documents are usually called OWL ontologies, and are RDF documents. So the root element of a OWL ontology is an rdf:RDF element which also specifies a number of namespaces. For example: An OWL ontology may start with a collection of assertions for housekeeping purposes. These assertions are grouped under an owl:Ontology element which contains comments, version control and inclusion of other ontologies. For example: An example OWL ontology University Ontology The only of these assertions which has any consequences for the logical meaning of the ontology is owl:imports: this lists other ontologies whose content is assumed to be part of the current document. ontology. Notice that while namespaces are used for disambiguation purposes, imported ontologies provide definitions that can be used. Usually there will be an import element for each used namespace, but it is possible to import additional ontologies, for example ontologies that provide definitions without introducing any new names. Also note that owl:imports is a transitive property: if ontology A imports ontology B, and ontology B imports ontology C, then ontology A also imports ontology C. Class elements Classes are defined using a owl:Class element 7 . For example, we can define a class associateProfessor as follows: 7 owl:Class is a subclass of rdfs:Class
8 Grigoris Antoniou and Frank van Harmelen We can also say that this class is disjoint from the professor and assistantProfessor classes using owl: disjointWith elements. These ele. ments can be included in the definition above, or can be added by referring to the id using rdf: about. This mechanism is inherited from RdF. Equivalence of classes can be defined using a owl: equivalentClass element Cowl: equivalentclass rdf: resource=#academicStaffMember"/> Finally, there are two predefined classes, owl: Thing and owl: Nothing. The former is the most general class which contains everything (everything is a thing), the latter is the empty class. Thus every class is a subclass of owl: Thing and a superclass of owl: Nothing Property elements In OWl there are two kinds of properties Object properties which relate objects to other objects Examples are is TaughtBy, supervises et Datatype properties which relate objects to datatype values Examples are phone, title, age etc. OWL does not have any predefined data types, nor does it provide special definition facilities. Instead it al- lows one to use XML Schema data types, thus making use of the layered architecture the Semantic Web Here is an example of a datatype property
8 Grigoris Antoniou and Frank van Harmelen We can also say that this class is disjoint from the professor and assistantProfessor classes using owl:disjointWith elements. These elements can be included in the definition above, or can be added by referring to the id using rdf:about. This mechanism is inherited from RDF. Equivalence of classes can be defined using a owl:equivalentClass element: Finally, there are two predefined classes, owl:Thing and owl:Nothing. The former is the most general class which contains everything (everything is a thing), the latter is the empty class. Thus every class is a subclass of owl:Thing and a superclass of owl:Nothing. Property elements In OWL there are two kinds of properties: • Object properties which relate objects to other objects. Examples are isTaughtBy, supervises etc. • Datatype properties which relate objects to datatype values. Examples are phone, title, age etc. OWL does not have any predefined data types, nor does it provide special definition facilities. Instead it allows one to use XML Schema data types, thus making use of the layered architecture the Semantic Web Here is an example of a datatype property. User-defined data types will usually be collected in an XML schema, and then used in an OWL ontology. Here is an example of an object property:
Web Ontology Language: OWL More than one domain and range may be declared. In this case the intersection of the domains, respectively ranges, is taken. oWL allows us to relate "inverse properties". A typical example s TaughtBy and teaches /owl: Obj Actually domain and range can be inherited from the inverse property(inter change domain with range Equivalence of properties can be defined using a owl: equivale /owl: ObjectProperty> Property restrictions With rdfs: subClassOf we can specify a class C to be subclass of another class C; then every instance of C is also an instance of C con Now suppose we wish to declare, instead, that the class C satisfies certain ditions, that is, all instances of C satisfy the conditions. Obviously it is equivalent to saying that C is subclass of a class C, where C collects all objects that satisfy the conditions. That is exactly how it is done in OWl as we will show. Note that, in general, C can remain anonymous, as we will explain below. The following element requires first year courses to be taught by profess only(according to a questionable view, older and more senior academics are better fowl: allvaluesFrom rdf: resource=#Professor"/> owl: allvaluesFrom is used to specify the class of possible values the property specified by owl: on Property can take(in other words: all values of the prop- erty must come from this class). In our example, only professors are allowed as values of the property isTaughtBy We can declare that mathematics courses are taught by david Billington as follows
Web Ontology Language: OWL 9 More than one domain and range may be declared. In this case the intersection of the domains, respectively ranges, is taken. OWL allows us to relate “inverse properties”. A typical example is isTaughtBy and teaches. Actually domain and range can be inherited from the inverse property (interchange domain with range). Equivalence of properties can be defined using a owl:equivalentProperty element. Property restrictions With rdfs:subClassOf we can specify a class C to be subclass of another class C 0 ; then every instance of C is also an instance of C 0 . Now suppose we wish to declare, instead, that the class C satisfies certain conditions, that is, all instances of C satisfy the conditions. Obviously it is equivalent to saying that C is subclass of a class C 0 , where C 0 collects all objects that satisfy the conditions. That is exactly how it is done in OWL, as we will show. Note that, in general, C 0 can remain anonymous, as we will explain below. The following element requires first year courses to be taught by professors only (according to a questionable view, older and more senior academics are better at teaching). owl:allValuesFrom is used to specify the class of possible values the property specified by owl:onProperty can take (in other words: all values of the property must come from this class). In our example, only professors are allowed as values of the property isTaughtBy. We can declare that mathematics courses are taught by David Billington as follows:
rigoris Antoniou and Frank van Harmelen fowl: has Value rdf: resource=#949352"/> owl: has Value states a specific value that the property, specified by owl: on Property must have And we can declare that all academic staff members must teach at least one undergraduate course as follows rl: onProperty rdf: resource=#teaches"/> owl: someValuesFrom rdf: resource=#undergraduate Course"/>
10 Grigoris Antoniou and Frank van Harmelen owl:hasValue states a specific value that the property, specified by owl:onProperty must have. And we can declare that all academic staff members must teach at least one undergraduate course as follows: Let us compare owl:allValuesFrom and owl:someValuesFrom. The example using the former requires every person who teaches an instance of the class, a first year subject, to be a professor. In terms of logic we have a universal quantification. The example using the latter requires that there exists an undergraduate course that is taught by an instance of the class, an academic staff member. It is still possible that the same academic teaches postgraduate courses, in addition. In terms of logic we have an existential quantification. In general, a owl:Restriction element contains a owl:onProperty element, and one or more restriction declarations. One type of restriction declarations are those that define restrictions on the kinds of values the property can take: owl:allValuesFrom, owl:hasValue and owl:someValuesFrom. Another type are cardinality restrictions. For example, we can require every course to be taught by at least someone. 1