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