Package edu.pitt.ontology

Examples of edu.pitt.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


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

  public void save() throws IOntologyException {
    throw new IOntologyException("BioPortal is read-only");
  }
View Full Code Here

  public void setRepository(IRepository r) {
    repository = (BioPortalRepository) r;
  }

  public void write(OutputStream out, int format) throws IOntologyException {
    throw new IOntologyException("writing BioPortal is not supported yet");
  }
View Full Code Here

     
      //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

    // 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

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

  public IOntology importOntology(URI path) throws IOntologyException {
    URL url = null;
    try {
      url = path.toURL();
    } catch (MalformedURLException e) {
      throw new IOntologyException("Invalid URI supplied: "+path,e);
    }
    IOntology ont = OOntology.loadOntology(url);
    importOntology(ont);
    return getOntology(ont.getURI());
   
View Full Code Here

  public void importOntology(IOntology ont) throws IOntologyException {
    File file = new File(ontologyDirectory,ont.getName());
    try {
      ont.write(new FileOutputStream(file),IOntology.OWL_FORMAT);
    } catch (FileNotFoundException e) {
      throw new IOntologyException("Unable to save file in the local cache at "+file.getAbsolutePath(),e);
    }
    // reload from cache
    ont.dispose();
    ont = OOntology.loadOntology(file);
    addOntology(ont);
View Full Code Here

        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

  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

TOP

Related Classes of edu.pitt.ontology.IOntologyException

Copyright © 2018 www.massapicom. 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.