Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration


     *        The change to be tested.
     * @return {@code true} if the change is applicable, otherwise,
     *         {@code false}.
     */
    private boolean isChangeApplicable(OWLOntologyChange change) {
        OWLOntologyLoaderConfiguration ontologyConfig = ontologyConfigurationsByOntologyID
                .get(change.getOntology().getOntologyID());
        if (ontologyConfig != null && !ontologyConfig.isLoadAnnotationAxioms()
                && change.isAddAxiom()
                && change.getAxiom() instanceof OWLAnnotationAxiom) {
            return false;
        }
        return true;
View Full Code Here


    private PrefixDocumentFormat prefixOWLOntologyFormat;

    @Before
    public void setUp() throws OWLOntologyCreationException {
        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        OWLOntologyLoaderConfiguration config = new OWLOntologyLoaderConfiguration()
                .setStrict(false);
        @SuppressWarnings("resource")
        InputStream in = getClass().getResourceAsStream(CIDOC_FILE);
        assertNotNull("can't find CIDOC_FILE", in);
        cidocOntology = manager.loadOntologyFromOntologyDocument(
View Full Code Here

    public OWLOntology loadOntology(String fileName) {
        try {
            URL url = getClass().getResource('/' + fileName);
            return m.loadOntologyFromOntologyDocument(
                    new IRIDocumentSource(IRI.create(url), null, null),
                    new OWLOntologyLoaderConfiguration()
                            .setReportStackTraces(true));
        } catch (OWLOntologyCreationException e) {
            fail(e.getMessage());
            throw new OWLRuntimeException(e);
        }
View Full Code Here

                .loadOntologyFromOntologyDocument(
                        new StringDocumentSource(target.toString(),
                                OWLOntologyDocumentSourceBase
                                        .getNextDocumentIRI("string:ontology"),
                                format, null),
                        new OWLOntologyLoaderConfiguration()
                                .setReportStackTraces(true));
        if (logger.isTraceEnabled()) {
            logger.trace("TestBase.roundTripOntology() ontology parsed");
            Set<OWLAxiom> axioms = ont2.getAxioms();
            for (OWLAxiom ax : axioms) {
View Full Code Here

    @Nonnull
    protected OWLOntology loadOntologyStrict(@Nonnull StringDocumentTarget o)
            throws OWLOntologyCreationException {
        return loadOntologyWithConfig(o,
                new OWLOntologyLoaderConfiguration().setStrict(true));
    }
View Full Code Here

        for (OWLAxiom ax : axioms) {
            if (ax.isAnnotationAxiom()) {
                annotationAxioms.add(ax);
            }
        }
        OWLOntologyLoaderConfiguration withAnnosConfig = new OWLOntologyLoaderConfiguration();
        OWLOntology reloadedWithAnnoAxioms = reload(ontology, format,
                withAnnosConfig);
        Set<OWLAxiom> axioms2 = reloadedWithAnnoAxioms.getAxioms();
        assertEquals(axioms, axioms2);
        OWLOntologyLoaderConfiguration withoutAnnosConfig = new OWLOntologyLoaderConfiguration()
                .setLoadAnnotationAxioms(false);
        OWLOntology reloadedWithoutAnnoAxioms = reload(ontology, format,
                withoutAnnosConfig);
        assertFalse(axioms.equals(reloadedWithoutAnnoAxioms.getAxioms()));
        Set<OWLAxiom> axiomsMinusAnnotationAxioms = new HashSet<>(axioms);
View Full Code Here

                getConfiguration());
    }

    @Nonnull
    protected OWLOntologyLoaderConfiguration getConfiguration() {
        return new OWLOntologyLoaderConfiguration();
    }
View Full Code Here

     * @param s
     *        s
     */
    public ManchesterOWLSyntaxEditorParser(@Nonnull OWLDataFactory dataFactory,
            @Nonnull String s) {
        this(new OWLOntologyLoaderConfiguration(), dataFactory, s);
    }
View Full Code Here

                + "subset: unit_group_slim\n" + "is_a: UO:0000000 ! unit\n"
                + "relationship: is_unit_of PATO:0001708 ! 1-D extent\n"
                + "created_by: george gkoutos";
        StringDocumentSource streamDocumentSource = new StringDocumentSource(
                input);
        OWLOntologyLoaderConfiguration loaderConfig = new OWLOntologyLoaderConfiguration()
                .setMissingImportHandlingStrategy(MissingImportHandlingStrategy.SILENT);
        OWLOntology ontology = rootOntologyManager
                .loadOntologyFromOntologyDocument(streamDocumentSource,
                        loaderConfig);
        OWLAnnotationProperty date = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#date"));
View Full Code Here

    private static final long serialVersionUID = 40000L;

    @Override
    public OWLOntologyLoaderConfiguration get() {
        return new OWLOntologyLoaderConfiguration();
    }
View Full Code Here

TOP

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

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.