Lecture d'un fichier OWL en Java
Bonjour,
J'ai une ontologie que j'ai créée avec Protégé 3.x...
J'ai ajouté tous les jar possibles situés dans le dossier protege_dir/plugins de mon projet.
Lorsque je veux charger mon fichier OWL avec le code suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
import edu.stanford.smi.protegex.owl.ProtegeOWL;
import edu.stanford.smi.protegex.owl.model.OWLModel;
public class Protege{
public Protege() {
String ONTOLOGY_URL ;
ONTOLOGY_URL = ("file:///C:/Program%20Files/Protege_3.5_beta/examples/reuses.owl");
try {
// Load the ontology from the specified URL
OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(ONTOLOGY_URL);
}
catch (Exception e) {
e.printStackTrace();
}
System.out.println("Test ");
}
} |
J'obtiens le résultat suivant :
Citation:
WARNING: [Local Folder Repository] The specified file must be a directory. (C:\Users\Petter\Documents\NetBeansProjects\Projet\plugins\edu.stanford.smi.protegex.owl) -- LocalFolderRepository.update()
Loading triples for: file:/C:/Program%20Files/Protege_3.5_beta/examples/reuses.owl
Completed triple loading after 694 ms
Postprocess: Process entities with incorrect Java type (0 entities) ... 0 ms
Postprocess: Process metaclasses (3 metaclasses) ... 0 ms
Postprocess: Process subclasses of rdf:List (1 classes) ... 0 ms
Postprocess: Instances with multiple types (21 instances) ... 0 ms
Postprocess: Add inferred superclasses ... 0 ms
Postprocess: Process orphan classes (18 classes) ... 2 ms
Postprocess: Generalized Concept Inclusion (0 axioms) ... 2 ms
Postprocess: Abstract classes... 0 ms
Postprocess: Domain and range of properties... 4 ms
Postprocess: Possibly typed entities (0 resources) ... 0 ms
Updating underlying frames model in 1 ms
mars 09, 2013 2:11:47 PM edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser doFinalPostProcessing
INFO: Updating underlying frames model in 1 ms
Test
Pouvez-vous m'expliquer comment résoudre ces erreurs?
Merci d'avance