Examples of SetOntologyID


Examples of org.semanticweb.owlapi.model.SetOntologyID

                        .isPresent()) {
                    @SuppressWarnings("null")
                    OWLOntologyID id = new OWLOntologyID(Optional.of(subject),
                            consumer.getOntology().getOntologyID()
                                    .getVersionIRI());
                    consumer.applyChange(new SetOntologyID(consumer
                            .getOntology(), id));
                }
            }
            consumer.addOntology(subject);
        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.SetOntologyID

        @SuppressWarnings("null")
        OWLOntologyID ontologyID = new OWLOntologyID(
                Optional.fromNullable(ontologyIRI),
                Optional.fromNullable(versionIRI));
        ontology.getOWLOntologyManager().applyChange(
                new SetOntologyID(ontology, ontologyID));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.SetOntologyID

            @SuppressWarnings("null")
            OWLOntologyID newID = new OWLOntologyID(Optional.of(IRI
                    .create(value)), handler.getOntology().getOntologyID()
                    .getVersionIRI());
            handler.getOWLOntologyManager().applyChange(
                    new SetOntologyID(handler.getOntology(), newID));
        }
        if (localName.equals("versionIRI")) {
            @SuppressWarnings("null")
            OWLOntologyID newID = new OWLOntologyID(handler.getOntology()
                    .getOntologyID().getOntologyIRI(), Optional.of(IRI
                    .create(value)));
            handler.getOWLOntologyManager().applyChange(
                    new SetOntologyID(handler.getOntology(), newID));
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.SetOntologyID

    @Test
    public void testSetOntologyURI() throws OWLOntologyCreationException {
        IRI iri = IRI("http://www.another.com/ont");
        OWLOntology ont = m.createOntology(iri);
        IRI newIRI = IRI("http://www.another.com/newont");
        SetOntologyID sou = new SetOntologyID(ont, new OWLOntologyID(
                of(newIRI), absent()));
        m.applyChange(sou);
        assertFalse(m.contains(iri));
        assertTrue(m.contains(newIRI));
        assertEquals(ont.getOntologyID().getOntologyIRI().get(), newIRI);
View Full Code Here

Examples of org.semanticweb.owlapi.model.SetOntologyID

        // Note that we MUST specify an ontology IRI if we want to specify a
        // version IRI
        OWLOntologyID newOntologyID = new OWLOntologyID(
                Optional.of(ontologyIRI), Optional.of(versionIRI));
        // Create the change that will set our version IRI
        SetOntologyID setOntologyID = new SetOntologyID(ontology, newOntologyID);
        // Apply the change
        manager.applyChange(setOntologyID);
        // We can also just specify the ontology IRI and possibly the version
        // IRI at ontology creation time Set up our ID by specifying an ontology
        // IRI and version IRI
View Full Code Here

Examples of org.semanticweb.owlapi.model.SetOntologyID

    @SuppressWarnings("null")
    @Override
    public List<OWLOntologyChange> repair() {
        // XXX arbitrary choice
        return list(new SetOntologyID(ontology, new OWLOntologyID(
                Optional.of(IRI.create("urn:ontology#replaced")),
                Optional.of(IRI.create("urn:ontology#replaced1")))));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.SetOntologyID

        return newId;
    }

    @Override
    public SetOntologyID createOntologyChange(@Nonnull OWLOntology ontology) {
        return new SetOntologyID(ontology, newId);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.SetOntologyID

     *
     * @param ontologyID
     *        the new ontology id
     */
    protected void setOntologyID(@Nonnull OWLOntologyID ontologyID) {
        applyChange(new SetOntologyID(ontology, ontologyID));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.SetOntologyID

        if (ontologyIRIToSet.isPresent()
                && !NodeID.isAnonymousNodeIRI(ontologyIRIToSet.get())) {
            Optional<IRI> versionIRI = ontology.getOntologyID().getVersionIRI();
            OWLOntologyID ontologyID = new OWLOntologyID(ontologyIRIToSet,
                    versionIRI);
            applyChange(new SetOntologyID(ontology, ontologyID));
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.SetOntologyID

            default:
                jj_la1[2] = jj_gen;
                ;
        }
        OWLOntologyID id = new OWLOntologyID(ontologyIRI, versionIRI);
        applyChange(new SetOntologyID(ontology, id));
        label_2: while (true) {
            switch (jj_ntk == -1 ? jj_ntk_f() : jj_ntk) {
                case IMPORT:
                case ANNOTATION: {
                    ;
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.