Amlan
Amlan

Reputation: 33

Semantic Web - Ontology OWL class vs OOPS class

What is the difference between an OWL class and a class in OOPS language, e.g. Java?

Upvotes: 0

Views: 379

Answers (2)

panda_nerd
panda_nerd

Reputation: 11

The true and simple difference is that a class in OOP is a framework/template/blueprint, something that you use to create other objects in your program. While a semantic class is a set that contains entities that can be grouped as they have a similar characteristic that nominate the class. (e.g., the class country contains elements like UK, Italy, Germany, Brasil, etc.)

One thing that I usually like to mention when I'm answering this question in my classes is that, when you come from the OOP world, you should move the focus from the class to the properties (OWL properties).

In a graph based representation of the reality the focus is more on the properties rather than the classes.

In OOP you focus on the class, which is like a framework/blueprint, containing: (i) Attributes: What the class looks like (ii) Methods: What the class does (iii) Objects: What the class is

While when you think about creating a semantic model, your focus moves more on the properties that relate classes with each other. A property, a relation between two classes, has a direction.

E.g., [class_1]--property-->[class_2]

In this example the property has a domain (class_1) and a range (class_2). These 2 entities (domain and range) characterize and define the applicability of the property.

Upvotes: 0

Ivo Velitchkov
Ivo Velitchkov

Reputation: 2431

Here is a list of 10 main differences, some of them applicable only for OWL-DL:

  1. OWL classes are like sets, OOPS classes are like templates
  2. OWL classes follow Description Logics, OOPS don't (or any other formal logic; they are based on heuristics)
  3. OOPS classes have relations, while the only relation between OWL classes is rdfs:subClassOf (when OWL classes are treated only as classes, see point 10 for an exeption). What looks a bit like indirect description of relations, are the necessary and sufficient conditions of sublcasses and individuals, using owl:Restriction
  4. OWL classes are not disjoint by default
  5. OWL classes don't have attributes, apart from the annotation properties, providing meta-description, not affecting the members of a class
  6. Although sometimes the concept of "instance" is used, strictly speaking in OWL there is no such thing as instance of a class, as the existence of individuals is not dependant on classes being defined beforehand.
  7. OWL classes can be anonymous, defined through the conditions of classification.
  8. Inference rules can be applied to OWL classes based on DL axioms
  9. OWL classes follow the Open World Assumption
  10. OWL classes can be treated as individuals in OWL2 (aka punning)

Disclaimer: the list is made just on top of my head. It doesn't claim rigour or completeness.

Upvotes: 2

Related Questions