Examples of OWLRuntimeException


Examples of org.semanticweb.owl.model.OWLRuntimeException

* Date: 15-Nov-2006<br><br>
*/
public class EmptyInMemOWLOntologyFactory extends AbstractInMemOWLOntologyFactory {

    public OWLOntology loadOWLOntology(OWLOntologyInputSource inputSource, OWLOntologyCreationHandler mediator) throws OWLOntologyCreationException {
        throw new OWLRuntimeException(new UnsupportedOperationException("Cannot load OWL ontologies."));
    }
View Full Code Here

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

Examples of org.semanticweb.owlapi.model.OWLRuntimeException

            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

Examples of org.semanticweb.owlapi.model.OWLRuntimeException

        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

Examples of org.semanticweb.owlapi.model.OWLRuntimeException

        }
    }

    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

Examples of org.semanticweb.owlapi.model.OWLRuntimeException

        }
        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

Examples of org.semanticweb.owlapi.model.OWLRuntimeException

    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

Examples of org.semanticweb.owlapi.model.OWLRuntimeException

     * @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

Examples of org.semanticweb.owlapi.model.OWLRuntimeException

    }

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

Examples of org.semanticweb.owlapi.model.OWLRuntimeException

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