Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLOntologyCreationException


            throws OWLOntologyCreationException {
        try {
            OBOFormatParser p = new OBOFormatParser();
            return convert(p.parse(oboFile));
        } catch (IOException ex) {
            throw new OWLOntologyCreationException(
                    "Error Occured while parsing OBO '" + oboFile + '\'', ex);
        } catch (OBOFormatParserException ex) {
            throw new OWLOntologyCreationException(
                    "Syntax error occured while parsing OBO '" + oboFile + '\'',
                    ex);
        }
    }
View Full Code Here


    } catch (UnloadableImportException e) {
      // If our ontology contains imports and one or more of the imports
      // could not be loaded then an
      // UnloadableImportException will be thrown (depending on the
      // missing imports handling policy)
      OWLOntologyCreationException cause = e
          .getOntologyCreationException();
      throw new ActivityUserException(new ActivityInferenceException(
          "ActivityInferenceException", "Could not load import: "
              + e.getImportsDeclaration() + "Reason: "
              + cause.getMessage()));
    } catch (OWLOntologyCreationException e) {
      throw new ActivityUserException(new ActivityInferenceException(
          "ActivityInferenceException", "Reason: " + e.getMessage()));
    } catch (PipeClosedException e) {
      // TODO Auto-generated catch block
View Full Code Here

        if( str == null ) {
          final String msg = format(
              "Imported ontology (%s) not provided in " + format + " syntax for testcase (%s)",
              iri, t.getIdentifier() );
          log.warning( msg );
          throw new OWLOntologyCreationException( msg );
        }
        else {
          StringDocumentSource source = new StringDocumentSource( str, iri );
          try {
            manager.loadOntologyFromOntologyDocument( source );
View Full Code Here

            System.err.println("Runtime Warning: Parsers should load imported ontologies using the makeImportLoadRequest method.");
        }
        fireStartedLoadingEvent(new OWLOntologyID(ontologyIRI), documentSource.getDocumentIRI(), loadCount > 0);
        loadCount++;
        broadcastChanges = false;
        OWLOntologyCreationException ex = null;
        OWLOntologyID idOfLoadedOntology = new OWLOntologyID();
        try {
            for (OWLOntologyFactory factory : ontologyFactories) {
                if (factory.canLoad(documentSource)) {
                    try {
View Full Code Here

     * If yes, throw an exception!
     */
    if (missingImports != 0) {
      String[] missuris = new String[missing.size()];
      missuris = missing.toArray(missuris);
      throw new OWLOntologyCreationException(
          "There are missing imports: " + Arrays.toString(missuris));
    }
    /**
     * If no, just return the filled ontology manager.
     */
 
View Full Code Here

TOP

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

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.