> *
> hi
> I am new to Protege OWL-API wrote this. but giving lots of erro. I have
> uplaod all library files but still showing error. Plz resolve it give
> me some suggestion.
>
> thankx
>
>
> import
> * edu.stanford.smi.protegex.owl.model.OWLModel;
>
> *import* edu.stanford.smi.protegex.owl.model.OWLNamedClass;
>
> *import* edu.stanford.smi.protegex.owl.ProtegeOWL;
>
> *import* edu.stanford.smi.protegex.owl.model.OWLIndividual;
>
> *import* edu.stanford.smi.protegex.owl.inference.util.*;
>
> *import* java.util.Collections;
>
> *import* java.util.*;
>
> *public* *class* vinay {
>
> *public* *static* *void* main(String[] args) {
>
> *try*
>
> {
>
> String uri =
>
> "file:///C:/Documents and Settings/vinay/Desktop/Data Warhouse Gernalize
> Ontology/DataWH.owl";
>
> OWLModel owlModel = _ProtegeOWL.createJenaOWLModelFromURI(uri)_;
>
> _Collection_ classes = owlModel.getUserDefinedOWLNamedClasses();
>
> *for* (_Iterator_ it = classes.iterator(); it.hasNext();) {
>
> OWLNamedClass cls = (edu.stanford.smi.protegex.owl.model.OWLNamedClass)
> it.next();
>
> _Collection_ instances = _cls.getInstances(_
>
> *false*);
>
> System.out.println(
>
> "Class " + cls.getBrowserText() + " (" + instances.size() + ")");
>
> *for* (_Iterator_ jt = instances.iterator(); jt.hasNext();) {
>
> OWLIndividual individual = (OWLIndividual) jt.next();
>
> System.out.println(
>
> " - " + _individual.getBrowserText()_;
>
> }
>
> }
>
> }
>
> *catch*(Exception e)
>
> {
>
> System.out.println(
>
> "Exception");
>
> }
>
> }
>
> }
>
> Errors:
>
>
> Exception in thread "main" java.lang.Error: Unresolved compilation
> problems:
>
> The type
>
> _edu.stanford.smi.protege.exception.OntologyLoadException_
> cannot be resolved. It is indirectly referenced from required .class files
>
> The method createJenaOWLModelFromURI(String) from the type ProtegeOWL
> refers to the missing type
>
> _OntologyLoadException_
>
> The type edu.stanford.smi.protege.model.Cls cannot be resolved. It is
> indirectly referenced from required .class files
>
> The type edu.stanford.smi.protege.model.Instance cannot be resolved. It
> is indirectly referenced from required .class files
>
> The type edu.stanford.smi.protege.model.SimpleInstance cannot be
> resolved. It is indirectly referenced from required .class files
>
> Syntax error, insert ")" to complete Expression
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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