1

Lets assume a very simple axiom in an ontology that says that All cheesypizza are pizzas that have topping of cheese. In OWL representation, the cheeseypizza would be represented as a subclass of restriction on the has-topping property. However, I would like to extract in the following triples dataset format :

  1. CheesyPizza1 sub-class Pizza1
  2. Pizza1 has-topping CheeseTopping1

assuming that Pizza1 is a dynamic instantiation (not the true individual of the Pizza class in the ontology but just a random variable while writing in the triples format) of Pizza class and similarly, CheesyPizza1 is a dynamic instantiation of CheesyPizza class and CheeseTopping1 is a dynamic instantiation of CheeseTopping class.

How can I get the above representation?

Bikash Gyawali
  • 969
  • 2
  • 15
  • 33
  • It's not really clear what you're asking. An *instance* of a class is an individual. We don't have "individualA subClassOf individualB", so your first item doesn't make a lot of sense. CheeseTopping is a class, so (assuming that Pizza1 is an individual), it doesn't make sense to say "Pizza1 hasTopping CheeseTopping", because object properties relate two individuals. Please clarify what sort of input you've got, and what sort of output you're trying to get. – Joshua Taylor Sep 16 '14 at 00:51
  • As an aside, part of the reason you've only gotten 16 views in 3 days is that the tags you've used are rather infrequently used. I'd suggest that you add the probably most appropriate tag, [tag:owl]. – Joshua Taylor Sep 16 '14 at 00:51
  • @JoshuaTaylor : I have edited to address your comments. – Bikash Gyawali Sep 16 '14 at 08:40
  • I still don't know what you you mean. OWL doesn't have random variables. It sounds like you want a fresh instance x of CheesyPizza and a fresh instance y of Pizza, and you're looking for a triple `x rdfs:subClassOf y`, but that doesn't make any sense; rdfs:subClassOf relates Classes, not Individuals (or RandomVariables, which OWL doesn't have anyway). – Joshua Taylor Sep 16 '14 at 10:52

1 Answers1

3

Your example needs clarification as your axioms seem invalid. Anyway, if in your example, CheesyPizza1, Pizza1 and CheeseTopping1 are classes and then you want to say that CheesyPizza1 is sublcass of Pizza1 and that CheesyPizza1 has an OWL Restriction hasTopping some CheeseTopping1, then the triples should be:

:Pizza1 rdf:type owl:Class .

:CheeseTopping1 rdf:type owl:Class .

:CheesyPizza1 rdf:type owl:Class ;
   rdfs:subClassOf :Pizza1,
        [ a owl:Restriction ;
          owl:onProperty :hasTopping ;
          owl:someValuesFrom :CheeseTopping1 
        ] .

I would suggest to look at Guus Schreiber's OWL restrictions, for checking how OWL restriction are expressed as triples.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
mikrohelen
  • 249
  • 1
  • 3