From: Serge L. <sli...@gm...> - 2007-10-18 16:56:04
|
> Start with the individual new_individual_pizza_2 is_a pizza > and add assertions like > new_individual_pizza_2 hasTopping new_tomato_topping_individual_2 > new_tomato_topping_individual_2 is_a TomatoTopping > until the reasoner can deduce that... Yes, I'm using Pellet... This is exactly what I'm doing. (let's continue with the Pizza since this i= s easier to explain than my ont) >From the pizza.owl I could invent a new pizza, let's say (simplified) - MyPizza has Tomato - MyPizza has TastyCheee - Gorgonzola is_a TastyCheese - Calandos is_a TastyCheese - MyPizzaOrder contains MyPizza - RedWine isOptionOf MyPizzaOrder - Bordeau is_a RedWine etc.. With owlapi (funny name, almost "I'm Happy") I instanciate an individual: - myPizzaOrder_individual is_a MyPizzaOrder Scanning the ontology (with a specific visitor is best I suppose) I can discover that: 1) I need to instantiate a MyPizza --> myPizza_indifidual 2) I need to instantiate some TastyCheese so it means that I have to ask th= e customer about what concrete subclass (Gorgonzola or Calandos) he wants. (I= n my ontology I even have [CustomerInput defines TastyCheese] since some inpu= t are supposed to come from some Services or Parameter or Others..) 3) I can find what isOptionOf the current order type I first did some tests on the ontology using SPARQL and Jena. Now I'm using owlapi (since this is the chooice made by Prot=E9g=E9 now) (a) Can I use some SPARQL with owlapi? (even if I don't really appreciate the fact I'm too close to the rdfs definition) (b)Can I use some owl construct to achive the queries or should I (c) use a Java POJ approach (iterating again and again) >For instance in many fast food restaurants there is a >requirement that the cashier must offer me a drink or the meal is >free. But the order is complete even before I include the drink (or >even if I don't include the drink). An option is an option so effectively the order is complete, but not committed (which is a user action) For this last case I was thinking about SWRL. Thanks for your help, Serge. 2007/10/18, Timothy Redmond <tre...@st...>: > > > > Take the pizza.owl > > From code I can create an individual and assert it's a Margarita type. > > Clearly it's not finished since it's missing some TomatoTopping and > > some more. > > I wonder what's the best solution to get the missing things for a > > new individual. > > It sounds like you are now moving from OWL api issues to OWL > semantics issues. The problem is how to write a application based > > |