Examples of OWLOntologyLoaderConfiguration


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

Examples of org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration

    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

Examples of org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration

    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

Examples of org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration

                .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

Examples of org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration

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

Examples of org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration

        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

Examples of org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration

                getConfiguration());
    }

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

Examples of org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration

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

Examples of org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration

                + "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

Examples of org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration

    private static final long serialVersionUID = 40000L;

    @Override
    public OWLOntologyLoaderConfiguration get() {
        return new OWLOntologyLoaderConfiguration();
    }
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.