Examples of IOntologyException


Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntologyException

     
      //System.out.println(repository);
     
      // now parse each individual resource
    }catch(Exception ex){
      throw new IOntologyException("Could not connect to Protege Database Repository "+url,ex);
      //ex.printStackTrace();
    }
  }
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntologyException

    // load ontology
    try{
      ont = POntology.loadOntology(path);
      importOntology(ont);
    }catch(Exception ex){
      throw new IOntologyException("problem loading "+path,ex);
    }
    return ont;
  }
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntologyException

          importOntology(o);
        }
      }
    }catch(Exception ex){
      ex.printStackTrace();
      throw new IOntologyException("problem importing "+ont.getURI(),ex);
    }
  }
View Full Code Here

Examples of edu.pitt.ontology.IOntologyException

      reasoner.initialize();
      //reasoner.setURL("http://localhost:8081");
      taskListener = new TaskListener();
      reasoner.setReasonerTaskListener(taskListener);
    }catch(Exception ex){
      throw new IOntologyException("Problem Initializing Reasoner ("+reasonerClass+")",ex);
    }
  }
View Full Code Here

Examples of edu.pitt.ontology.IOntologyException

    POntology ont = null;
    if(uri.toString().endsWith(".pprj")){
      ArrayList errors = new ArrayList();
      Project project = Project.loadProjectFromURI(uri,errors);
      if(!errors.isEmpty()){
        throw new IOntologyException("Problem loading PPRJ file "+uri,getException(errors));
      }
      ont =  new POntology((OWLModel) project.getKnowledgeBase());
    }else {
      try{
        ont = new POntology(ProtegeOWL.createJenaOWLModelFromURI(""+uri));
      }catch(Exception ex){
        throw new IOntologyException("Problem loading OWL file "+uri,ex);
      }
    }
   
    // set some meta data
    if(ont != null){
View Full Code Here

Examples of edu.pitt.ontology.IOntologyException

      // set project save path
      model.getProject().setProjectFilePath((new File(dir,name+".pprj")).getAbsolutePath());
      model.getOWLProject().getSettingsMap().setString("owl_file_name",filePath);
      return new POntology(model);
    }catch(Exception ex){
      throw new IOntologyException("problem creating new ontology "+path,ex);
    }
  }
View Full Code Here

Examples of edu.pitt.ontology.IOntologyException

      }
      */
     
      return new POntology(model);
    }catch(Exception ex){
      throw new IOntologyException("problem creating new ontology "+path,ex);
    }
  }
View Full Code Here

Examples of edu.pitt.ontology.IOntologyException

    // check if this is an pprj file
    if(uri.getName().endsWith(".pprj")){
      ArrayList errors = new ArrayList();
      Project project = Project.loadProjectFromFile(uri.getAbsolutePath(),errors);
      if(!errors.isEmpty()){
        throw new IOntologyException("Could not open "+uri,getException(errors));
      }
      return new POntology((OWLModel) project.getKnowledgeBase());
    }
    return loadOntology(uri.toURI());
  }
View Full Code Here

Examples of edu.pitt.ontology.IOntologyException

      imported.add(o);
     
      // set prefix somewhere????
      prefix = null;
    }catch(Exception ex){
      throw new IOntologyException("failed to import "+o.getURI(),ex);
   
  }
View Full Code Here

Examples of edu.pitt.ontology.IOntologyException

    }
    try{
      JenaOWLModel.saveModel(out,model.getOntModel(),lang,getNameSpace(),""+getURI());
      //model.getOntModel().write(out,lang,""+getURI());
    }catch(Exception ex){
      throw new IOntologyException("Problem writing protege",ex);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.