Examples of IOntologyException


Examples of edu.pitt.dbmi.nlp.noble.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.dbmi.nlp.noble.ontology.IOntologyException

        data = manager.getOWLDataFactory();
        setOntology(this);
        prefixManager = manager.getOntologyFormat(ontology).asPrefixOWLOntologyFormat();
       
      } catch (OWLOntologyCreationException e) {
        throw new IOntologyException("Unable to create ontology "+location,e);
      }
    }
  }
View Full Code Here

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

  public static OOntology loadOntology(File file) throws IOntologyException {
    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    try{
      return new OOntology(manager.loadOntologyFromOntologyDocument(file));
    } catch (OWLOntologyCreationException e) {
      throw new IOntologyException("Unable to create ontology "+file,e);
    }
  }
View Full Code Here

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

        return loadOntology(new URL(url));
      } catch (MalformedURLException e) {
        throw new IOntologyError("This is not a valid URL: "+url,e);
      }
    }
    throw new IOntologyException("Unable to load ontology "+url);
  }
View Full Code Here

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

    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    //manager.addOntologyStorer(new OWLXMLOntologyStorer());
    try{
      return new OOntology(manager.createOntology(IRI.create(uri)));
    } catch (OWLOntologyCreationException e) {
      throw new IOntologyException("Unable to create ontology "+uri,e);
    }
  }
View Full Code Here

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

  public static OOntology loadOntology(URL file) throws IOntologyException {
    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    try {
      return new OOntology(manager.loadOntologyFromOntologyDocument(IRI.create(file)));
    } catch (OWLOntologyCreationException e) {
      throw new IOntologyException("Unable to create ontology "+file,e);
    } catch (URISyntaxException e) {
      throw new IOntologyException("Unable to create ontology "+file,e);
    }
  }
View Full Code Here

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

    modified = false;
    try {
      manager.saveOntology(ontology, getIRI());
    } catch (OWLOntologyStorageException e) {
      if(e.getCause() instanceof ProtocolException)
        throw new IOntologyException("Unable to save ontology opened from URL "+getIRI()+". You should use IOntology.write() to save it as a file first.",e);
      throw new IOntologyException("Unable to save ontology "+getIRI(),e);
    }
  }
View Full Code Here

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

    case OWL_FORMAT:
      ontologyFormat = new OWLXMLOntologyFormat();break;
    case RDF_FORMAT:
      ontologyFormat = new RDFXMLOntologyFormat();break;
    case NTRIPLE_FORMAT:
      throw new IOntologyException("Unsupported export format");
    case OBO_FORMAT:
      ontologyFormat = new OBOOntologyFormat();break;
    case TURTLE_FORMAT:
      ontologyFormat = new TurtleOntologyFormat();break;
    }
   
   
    try {
      manager.saveOntology(ontology, ontologyFormat, out);
    } catch (OWLOntologyStorageException e) {
      if(e.getCause() instanceof ProtocolException)
        throw new IOntologyException("Unable to save ontology opened from URL "+getIRI()+". You should use IOntology.write() to save it as a file first.",e);
      throw new IOntologyException("Unable to save ontology "+getIRI(),e);
    }
   
  }
View Full Code Here

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

  public void removePropertyChangeListener(PropertyChangeListener listener){
    pcs.removePropertyChangeListener(listener);
  }
 
  public void addImportedOntology(IOntology o) throws IOntologyException {
    throw new IOntologyException("BioPortal is read-only");
  }
View Full Code Here

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

  public void flush() {
    // no-op
  }

  public void save() throws IOntologyException {
    throw new IOntologyException("BioPortal is read-only");
  }
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.