[protege-owl]

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[protege-owl]

Selvanayaki M.
hi
    i create one Class person and i create one individual for that class
named "sudha".this file in test.pprj.

    i create another Class tuple and tuple has two properties named
has_UniqueId(xsd:int),is_of_type(i didnt spacify any type,that is it can
store any type value).this class in tuplespace.pprj

   i create individual for person named "sudha" and i stored that indidual
in tuple class.tuple class instance is

instance name:Myspace1
has_UniqueId:1
is_of_type:sudha

afterthat from instance value "sudha" i got the Class name person.i done
these all works in single java program.i use the following code to get the
Class name from instance sudha.

OWLIndividual typevalue =
(OWLIndividual)delInstance.getPropertyValue(is_of_typeproperty);
 System.out.println("The tuple instance belongs to this class " +
typevalue.getProtegetype());

it return Cls(person, FrameID(1:29921))

i want to use the following code in separate java program.i use it in
separate  program.but it shows error "ClasscastException" in the following
line


OWLIndividual typevalue =
(OWLIndividual)delInstance.getPropertyValue(is_of_typeproperty);

plz give a solution to this problem.



thanks a lot,
Selva





   

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html