hasOWLIndividual method if Any?

2 messages Options
Embed this post
Permalink
Nick Khamis

hasOWLIndividual method if Any?

Reply Threaded More More options
Print post
Permalink
Hello Everyone,

When inserting individuals using java and the protegex api is there a method for example:

private OWLNamedClass commitAuthor;

.....


if(!commitAuthor.hasOWLIndividual(someones_string_name)) {
     Create The Individual
}


I am trying not to crash with a "non unique" exception.


Thanks in Advanced,
Nick.
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Thomas Russ

Re: hasOWLIndividual method if Any?

Reply Threaded More More options
Print post
Permalink

On Jul 3, 2009, at 2:26 PM, Nick Khamis wrote:

> Hello Everyone,
>
> When inserting individuals using java and the protegex api is there  
> a method for example:
>
> private OWLNamedClass commitAuthor;
>
> .....
>
>
> if(!commitAuthor.hasOWLIndividual(someones_string_name)) {
>      Create The Individual
> }
>
>
> I am trying not to crash with a "non unique" exception.

Just try to find the individual name with

    owlModel.getOWLIndividual(someones_string_name)

to see if there is already an individual with that name.

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03