4

In RDF/RDFS/OWL, how can I tell if an entity is an purely an instance or also a class? I understand that class entities are also instances, since they are instances of the "class" entity and subclasses of other classes. However, I believe some entities are simply instances of a class, and not classes in themselves.

Right now, I'm thinking the only way to tell something is purely an instance is to look (within that entity's rdf data) for statements with the rdf:type predicate and look for the absence of any statements with the rdfs:subClassOf or equivalent predicate.

However, looking for the absence of statements isn't a good way to ensure something is truly a class or an instance.

Is there a better way to discern whether an entity is a class or purely an instance? Hoping there is perhaps something right under nose.

LazerSharks
  • 3,089
  • 4
  • 42
  • 67

1 Answers1

5

In OWL, a class must be declared as such, either in the ontology where it is used, or in one of the ontologies that import it. Not having a declaration axiom is a profile violation - it means the ontology is formally in OWL Full (e.g., there is no guarantee that a reasoner will be able to use it meaningfully).

Unfortunately, ontologies used in practice often have violations, so this is not a completely satisfying criterion.

Individuals do not have this restriction, in either OWL, RDF or RDFS. so, lack of a type assertion for an entity (or the presence of only a rdf:type owl:Thing assertion) is a good indication that you're dealing with an individual.

Aside from appearing in subClassOf axioms, a class can also appear in an equivalent, disjointWith, or as the filler part of a restriction (in OWL).

To complicate the topic further, punning between classes and individuals is supported - which means, the same IRI can be declared as a class and as an individual. So, it's possible - and valid - that a class in an ontology is used as an individual in another.

Ignazio
  • 10,504
  • 1
  • 14
  • 25
  • When you say a class must be `declared as such`, do you mean that its RDF must contain a triple statement with the object as `class`? – LazerSharks Nov 20 '15 at 04:23
  • Yes - see table 7 here for the spec https://www.w3.org/TR/owl2-mapping-to-rdf/#Parsing_of_the_Ontology_Header_and_Declarations – Ignazio Mar 15 '16 at 22:20