Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLRuntimeException


                    }
                    headerFrame.addClause(new Clause(
                            OboFormatTag.TAG_OWL_AXIOMS, axiomString));
                }
            } catch (OwlStringException e) {
                throw new OWLRuntimeException(e);
            }
        }
        return getObodoc();
    }
View Full Code Here


            String localId;
            try {
                localId = java.net.URLDecoder.decode(s[1], "UTF-8");
                return s[0] + ':' + localId;
            } catch (UnsupportedEncodingException e) {
                throw new OWLRuntimeException(
                        "UTF-8 not supported, JRE corrupted?", e);
            }
        }
        if (s.length > 2 && !id.contains("#")
                && s[s.length - 1].replaceAll("[0-9]", "").isEmpty()) {
View Full Code Here

        error("the axiom is not translated : " + ax, shouldLogComplaint);
    }

    protected void error(String message, boolean shouldLogComplaint) {
        if (strictConversion) {
            throw new OWLRuntimeException("The conversion is halted: "
                    + message);
        } else {
            if (!muteUntranslatableAxioms && shouldLogComplaint) {
                LOG.error("MASKING ERROR «{}»", message, new Exception());
            }
View Full Code Here

        }
    }

    protected void warn(String message) {
        if (strictConversion) {
            throw new OWLRuntimeException("The conversion is halted: "
                    + message);
        } else {
            LOG.warn("MASKING ERROR «{}»", message);
        }
    }
View Full Code Here

        }
        String safeId;
        try {
            safeId = java.net.URLEncoder.encode(localId, "US-ASCII");
        } catch (UnsupportedEncodingException e1) {
            throw new OWLRuntimeException(e1);
        }
        if (safeId.contains(" ")) {
            safeId = safeId.replace(" ", "_");
        }
        IRI iri = null;
        try {
            iri = IRI.create(uriPrefix + safeId);
        } catch (IllegalArgumentException e) {
            throw new OWLRuntimeException(e);
        }
        return iri;
    }
View Full Code Here

    public OutputStream getOutputStream() {
        if (outputStream == null) {
            try {
                outputStream = new GZIPOutputStream(new FileOutputStream(out));
            } catch (FileNotFoundException e) {
                throw new OWLRuntimeException(e);
            } catch (IOException e) {
                throw new OWLRuntimeException(e);
            }
        }
        return verifyNotNull(outputStream);
    }
View Full Code Here

     * @throws OWLRendererException
     *         the oWL renderer exception
     */
    public void writeOntology() throws OWLRendererException {
        if (ontologies.size() != 1) {
            throw new OWLRuntimeException("Can only render one ontology");
        }
        OWLOntology ontology = ontologies.iterator().next();
        assert ontology != null;
        writePrefixMap();
        writeNewLine();
View Full Code Here

    }

    @Nonnull
    @Override
    public Writer getWriter() {
        throw new OWLRuntimeException(
                "Writer not available.  getWriter() should not be called if isWriterAvailable() returns false.");
    }
View Full Code Here

        return false;
    }

    @Override
    public IRI getDocumentIRI() {
        throw new OWLRuntimeException(
                "IRI not available.  getDocumentIRI() should not be called if isDocumentIRIAvailable() returns false.");
    }
View Full Code Here

                    }
                }
                Set<OWLAxiom> moduleAsSet = ontologyAxiomSet.toSet(subOnt);
                return enrich(moduleAsSet, seedSig, verbose);
            default:
                throw new OWLRuntimeException("Unsupported module type: "
                        + moduleType);
        }
    }
View Full Code Here

TOP

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

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.