Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.UnloadableImportException


                    ontologyIDsByImportsDeclaration.put(declaration,
                            ont.getOntologyID());
                }
            } catch (OWLOntologyCreationException e) {
                // Wrap as UnloadableImportException and throw
                throw new UnloadableImportException(e, declaration);
            }
        }
    }
View Full Code Here


                OWLOntologyAlreadyExistsException ex = (OWLOntologyAlreadyExistsException) e
                        .getCause();
                IRI importedOntologyIRI = ex.getOntologyID().getOntologyIRI()
                        .get();
                assert importedOntologyIRI != null;
                throw new UnloadableImportException(ex, ontology
                        .getOWLOntologyManager().getOWLDataFactory()
                        .getOWLImportsDeclaration(importedOntologyIRI));
            }
            Token currentToken = e.currentToken;
            if (currentToken != null) {
View Full Code Here

          if(e.getCause()!=null && e.getCause() instanceof OWLOntologyChangeException) {
            throw (OWLOntologyChangeException)e.getCause();
          }
          if(e.getCause()!=null && e.getCause() instanceof OWLOntologyAlreadyExistsException) {
            OWLOntologyAlreadyExistsException ex=(OWLOntologyAlreadyExistsException)e.getCause();
            throw new UnloadableImportException(ex, ontology.getOWLOntologyManager().getOWLDataFactory().getOWLImportsDeclaration(ex.getOntologyID().getOntologyIRI()));
          }
            Token currentToken = e.currentToken;
            if (currentToken != null) {
                int beginLine = currentToken.beginLine;
                int beginColumn = currentToken.beginColumn;
View Full Code Here

                    ontologyIDsByImportsDeclaration.put(declaration, ont.getOntologyID());
                }
            }
            catch (OWLOntologyCreationException e) {
                // Wrap as UnloadableImportException and throw
                throw new UnloadableImportException(e, declaration);
            }
        }
    }
View Full Code Here

    private static String getErrorMessage(OWLOntologyCreationException e) {
        if(e instanceof UnparsableOntologyException) {
            return "Could not parse ontology. Please load your ontology document into Protege to check that it is well formed.";
        }
        else if(e instanceof UnloadableImportException) {
            UnloadableImportException importException = (UnloadableImportException) e;
            return "Could not load imported ontology: " + importException.getImportsDeclaration().getIRI();
        }
        else if(e instanceof OWLOntologyCreationIOException) {
            OWLOntologyCreationIOException ioException = (OWLOntologyCreationIOException) e;
            return "Problem reading ontology document: " + ioException.getCause().getMessage();
        }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.UnloadableImportException

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.