Package org.semanticweb.owlapi.apibinding.OWLFunctionalSyntaxFactory

Examples of org.semanticweb.owlapi.apibinding.OWLFunctionalSyntaxFactory.IRI


    }

    @Test(expected = OWLOntologyAlreadyExistsException.class)
    public void testCreateDuplicateOntologyWithIRIAndVersionIRI()
            throws OWLOntologyCreationException {
        IRI ontologyIRI = IRI("http://www.semanticweb.org/ontologies/ontology");
        IRI versionIRI = IRI("http://www.semanticweb.org/ontologies/ontology");
        m.createOntology(new OWLOntologyID(of(ontologyIRI), of(versionIRI)));
        m.createOntology(new OWLOntologyID(of(ontologyIRI), of(versionIRI)));
    }
View Full Code Here


    }

    @Test(expected = OWLOntologyDocumentAlreadyExistsException.class)
    public void testCreateDuplicatedDocumentIRI()
            throws OWLOntologyCreationException {
        IRI ontologyIRI = IRI("http://www.semanticweb.org/ontologies/ontology");
        IRI ontologyIRI2 = IRI("http://www.semanticweb.org/ontologies/ontology2");
        IRI documentIRI = IRI("file:documentIRI");
        m.getIRIMappers().add(new SimpleIRIMapper(ontologyIRI, documentIRI));
        m.getIRIMappers().add(new SimpleIRIMapper(ontologyIRI2, documentIRI));
        m.createOntology(new OWLOntologyID(of(ontologyIRI), of((IRI) null)));
        m.createOntology(new OWLOntologyID(of(ontologyIRI2), of((IRI) null)));
    }
View Full Code Here

    @Test
    public void testCreateOntologyWithIdWithVersionIRI()
            throws OWLOntologyCreationException {
        OWLOntologyManager manager = createManager();
        IRI versionIRI = IRI("http://version/1");
        OWLOntologyID id = new OWLOntologyID(of(ONTOLOGY_IRI), of(versionIRI));
        OWLOntology ontology = manager.createOntology(id);
        assertEquals(ONTOLOGY_IRI, ontology.getOntologyID().getOntologyIRI()
                .get());
        assertEquals(versionIRI, ontology.getOntologyID().getVersionIRI().get());
View Full Code Here

*/
public class OntologyVersionIRITestCase extends AbstractRoundTrippingTestCase {

    @Override
    protected OWLOntology createOntology() {
        IRI ontIRI = IRI("http://www.semanticweb.org/owlapi/ontology");
        IRI versionIRI = IRI("http://www.semanticweb.org/owlapi/ontology/version");
        OWLOntologyID ontologyID = new OWLOntologyID(of(ontIRI), of(versionIRI));
        try {
            return m.createOntology(ontologyID);
        } catch (OWLOntologyCreationException e) {
            throw new OWLRuntimeException(e);
View Full Code Here

    }

    @Test
    public void testRemoteIsParseable() throws OWLOntologyCreationException {
        OWLOntologyManager manager = getManager();
        IRI iri = IRI(str);
        OWLOntology ontology = manager.loadOntology(iri);
        assertEquals(1, ontology.getAxioms().size());
        assertEquals(ontology.getOntologyID().getOntologyIRI().get(), iri);
        assertNotNull(manager.getOntology(iri));
    }
View Full Code Here

@SuppressWarnings("javadoc")
public class OntologyURITestCase extends TestBase {

    @Test
    public void testOntologyID() {
        IRI iriA = IRI("http://www.another.com/ont");
        IRI iriB = IRI("http://www.another.com/ont/version");
        OWLOntologyID ontIDBoth = new OWLOntologyID(of(iriA), of(iriB));
        OWLOntologyID ontIDBoth2 = new OWLOntologyID(of(iriA), of(iriB));
        assertEquals(ontIDBoth, ontIDBoth2);
        OWLOntologyID ontIDURIOnly = new OWLOntologyID(of(iriA), absent());
        assertFalse(ontIDBoth.equals(ontIDURIOnly));
View Full Code Here

        assertFalse(ontIDNoneA.equals(ontIDNoneB));
    }

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

        assertEquals(ont.getOntologyID(), ontID);
    }

    @Test(expected = OWLOntologyAlreadyExistsException.class)
    public void testDuplicateOntologyURI() throws OWLOntologyCreationException {
        IRI uri = IRI("http://www.another.com/ont");
        m.createOntology(uri);
        m.createOntology(uri);
    }
View Full Code Here

        m.createOntology(uri);
    }

    @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));
View Full Code Here

        assertEquals(ont.getOntologyID().getOntologyIRI().get(), newIRI);
    }

    @Test
    public void testVersionURI() throws OWLOntologyCreationException {
        IRI ontIRI = IRI("http://www.another.com/ont");
        IRI verIRI = IRI("http://www.another.com/ont/versions/1.0.0");
        OWLOntology ont = m.createOntology(new OWLOntologyID(of(ontIRI),
                of(verIRI)));
        assertEquals(ont.getOntologyID().getOntologyIRI().get(), ontIRI);
        assertEquals(ont.getOntologyID().getVersionIRI().get(), verIRI);
    }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.apibinding.OWLFunctionalSyntaxFactory.IRI

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.