SpicyPizza

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SpicyPizza

Oscar Pereira-4
 
Hi,
 
I have been following the Pizza example.
 
How can I specify the SpicyPizza class?
 
 
_onc -> OWLNamedClass
_oic -> OWLIntersectionClass
_svf -> OWLSomeValuesFrom
 
  OWLNamedClass _oncSpicyPizza = jom.createOWLNamedClass( "SpicyPizza" );
  _oncSpicyPizza.addSuperclass( _oncPizza );
  OWLIntersectionClass _oicSpicyPizza = jom.createOWLIntersectionClass();
  _oicSpicyPizza.addOperand( _oncPizzaTopping );
  _oicSpicyPizza.addOperand( _svfSpicinessVP_hot );
  _oncSpicyPizza.setDefinition( _oicSpicyPizza );
 
This code does not achieve the necessary result.How can I specify the required restriction?
 
 
Thank you,
 
_________________________________
 
   Oscar Pereira
_________________________________
        Universidade de Aveiro - IEETA
        3810-193 Aveiro, Portugal
                 Tlf. 234 370 500, ext: 24129   
 
Reply | Threaded
Open this post in threaded view
|

Re: SpicyPizza

yulin zhang
i use the expression to achieve. hasTopping some (PizzaTopping and ( hasSpiciness some Hot))

2006/1/24, Oscar Pereira <[hidden email]>:
 
Hi,
 
I have been following the Pizza example.
 
How can I specify the SpicyPizza class?
 
 
_onc -> OWLNamedClass
_oic -> OWLIntersectionClass
_svf -> OWLSomeValuesFrom
 
  OWLNamedClass _oncSpicyPizza = jom.createOWLNamedClass( "SpicyPizza" );
  _oncSpicyPizza.addSuperclass( _oncPizza );
  OWLIntersectionClass _oicSpicyPizza = jom.createOWLIntersectionClass ();
  _oicSpicyPizza.addOperand( _oncPizzaTopping );
  _oicSpicyPizza.addOperand( _svfSpicinessVP_hot );
  _oncSpicyPizza.setDefinition( _oicSpicyPizza );
 
This code does not achieve the necessary result.How can I specify the required restriction?
 
 
Thank you,
 
_________________________________
 
   Oscar Pereira
_________________________________
        Universidade de Aveiro - IEETA
        3810-193 Aveiro, Portugal
                 Tlf. 234 370 500, ext: 24129   
 

Reply | Threaded
Open this post in threaded view
|

Re: SpicyPizza

Nick Drummond
Yes, you appear to be missing the "outer restriction"

  OWLNamedClass _oncSpicyPizza = jom.createOWLNamedClass( "SpicyPizza" );
  _oncSpicyPizza.addSuperclass( _oncPizza );

// this creates the (PizzaTopping and ( hasSpiciness some Hot))
  OWLIntersectionClass _oicSpicyPizza = jom.createOWLIntersectionClass ();
  _oicSpicyPizza.addOperand( _oncPizzaTopping );
  _oicSpicyPizza.addOperand( _svfSpicinessVP_hot ); // assuming you've
already created this

// you need the following
OWLSomeValuesFrom _svfToppingRestr =
jom.createOWLSomeValuesFrom(hasTopping, _oicSpicyPizza)
  _oncSpicyPizza.setDefinition( _svfToppingRestr );

Nick

yulin zhang wrote:

> i use the expression to achieve. hasTopping some (PizzaTopping and (
> hasSpiciness some Hot))
>
> 2006/1/24, Oscar Pereira <[hidden email] <mailto:[hidden email]>>:
>
>      
>     Hi,
>      
>     I have been following the Pizza example.
>      
>     How can I specify the SpicyPizza class?
>      
>      
>     _onc -> OWLNamedClass
>     _oic -> OWLIntersectionClass
>     _svf -> OWLSomeValuesFrom
>      
>       OWLNamedClass _oncSpicyPizza = jom.createOWLNamedClass(
>     "SpicyPizza" );
>       _oncSpicyPizza.addSuperclass( _oncPizza );
>       OWLIntersectionClass _oicSpicyPizza =
>     jom.createOWLIntersectionClass ();
>       _oicSpicyPizza.addOperand( _oncPizzaTopping );
>       _oicSpicyPizza.addOperand( _svfSpicinessVP_hot );
>       _oncSpicyPizza.setDefinition( _oicSpicyPizza );
>      
>     This code does not achieve the necessary result.How can I specify
>     the required restriction?
>      
>      
>     Thank you,
>     **
>     *_________________________________*
>      
>        Oscar Pereira
>     _________________________________
>             Universidade de Aveiro - IEETA
>             3810-193 Aveiro, Portugal
>     _                 Tlf. 234 370 500, ext: 24129_  
>      
>
>

--

Nick Drummond

http://www.cs.man.ac.uk/~drummond/ <http://www.cs.man.ac.uk/%7Edrummond/>
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: SpicyPizza

Matthew Horridge
In reply to this post by Oscar Pereira-4
Hi,

I have been following the Pizza example.
 
How can I specify the SpicyPizza class?

If the definition of  SpicyPizza is  Pizza and hasTopping some (PizzaTopping and hasSpiciness some HotSpiciness)

You therefore need to create:

1) A some values from restriction for  hasSpiciness some HotSpiciness
2) An intersection class, which is the intersection of the restriction created in 1) and the class PizzaTopping
3) A some values from restriction with a restricted property of hasTopping and a filler of the intersection class created in 2)
4) An intersection of Pizza and the restriction class created in 3)
5) Set the intersection class created in 4) to be an equivalent class of SpicyPizza

Cheers,

Matthew

 
 
_onc -> OWLNamedClass
_oic -> OWLIntersectionClass
_svf -> OWLSomeValuesFrom
 
  OWLNamedClass _oncSpicyPizza = jom.createOWLNamedClass( "SpicyPizza" );
  _oncSpicyPizza.addSuperclass( _oncPizza );
  OWLIntersectionClass _oicSpicyPizza = jom.createOWLIntersectionClass();
  _oicSpicyPizza.addOperand( _oncPizzaTopping );
  _oicSpicyPizza.addOperand( _svfSpicinessVP_hot );
  _oncSpicyPizza.setDefinition( _oicSpicyPizza );
 
This code does not achieve the necessary result.How can I specify the required restriction?
 
 
Thank you,
 
_________________________________
 
   Oscar Pereira
_________________________________
        Universidade de Aveiro - IEETA
        3810-193 Aveiro, Portugal
                 Tlf. 234 370 500, ext: 24129