Package org.semanticweb.owl.model

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


            SAXParser parser = parserFactory.newSAXParser();
            InputStream is = new BufferedInputStream(new FileInputStream(file));
            parser.parse(is, this);
        }
        catch (ParserConfigurationException e) {
            throw new OWLRuntimeException(e);
        }
        catch (SAXException e) {
            // We simply aren't interested in any parsing problems - if
            // we can't parse a file, then we can't map it and we don't
            // care!
View Full Code Here

                builder.append(tempBuffer, 0, read);
            }
            buffer = builder.toString();
        }
        catch (IOException e) {
            throw new OWLRuntimeException(e);
        }
    }
View Full Code Here

        super(handler);
    }


    protected OWLAxiom createAxiom() throws OWLXMLParserException {
        throw new OWLRuntimeException("Not implemented!");
    }
View Full Code Here




    public OWLDescription getOWLObject() {
        throw new OWLRuntimeException("getOWLObject should not be called on OWLUnionOfElementHandler");
    }
View Full Code Here

    protected Integer recomputeMetric() {
        try {
            return reasoner.getInconsistentClasses().size();
        }
        catch (OWLReasonerException e) {
            throw new OWLRuntimeException(e);
        }
    }
View Full Code Here

    public OWLOntologyFormat parse(OWLOntologyInputSource inputSource, OWLOntology ontology) throws OWLParserException {
        try {
            final RDFXMLOntologyFormat format = new RDFXMLOntologyFormat();
            if (owlOntologyManager == null) {
                throw new OWLRuntimeException("Cannot parse because OWLOntologyManager is null!");
            }
            final RDFParser parser = new RDFParser() {
                public void startPrefixMapping(String prefix, String uri) throws SAXException {
                    super.startPrefixMapping(prefix, uri);
                    format.addPrefixNamespaceMapping(prefix, uri);
View Full Code Here

    }


    public void setReasonerFactory(OWLReasonerFactory factory) throws OWLReasonerException {
        if(!reasonerFactories.contains(factory)) {
            throw new OWLRuntimeException("Reasoner factory not registered: " + factory.getReasonerName());
        }
        currentReasonerFactory = factory;
        reasoner.dispose();
        fireReasonerFactoryChanged();
    }
View Full Code Here

        try {
            writer.endDocument();
            writer.writeComment(VersionInfo.getVersionInfo().getGeneratedByMessage());
        }
        catch (IOException e) {
            throw new OWLRuntimeException(e);
        }
    }
View Full Code Here

    public void writeStartElement(URI name) {
        try {
            writer.writeStartElement(name.toString());
        }
        catch (IOException e) {
            throw new OWLRuntimeException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.semanticweb.owl.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.