Package org.semanticweb.owlapi.apibinding.OWLFunctionalSyntaxFactory

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


    }

    @Test
    public void testLengthNoPrefix() {
        String str = "#ABC";
        IRI iri = IRI(str);
        assertEquals(str.length(), iri.length());
    }
View Full Code Here


@SuppressWarnings("javadoc")
public class SimpleIRIShortFormProviderTestCase {

    @Test
    public void testFragmentShortForm() {
        IRI iri = IRI("http://owl.cs.manchester.ac.uk/ontology/x#A");
        SimpleIRIShortFormProvider sfp = new SimpleIRIShortFormProvider();
        String shortForm = sfp.getShortForm(iri);
        assertEquals("A", shortForm);
    }
View Full Code Here

        assertEquals("A", shortForm);
    }

    @Test
    public void testLastPathShortForm() {
        IRI iri = IRI("http://owl.cs.manchester.ac.uk/ontology/x");
        SimpleIRIShortFormProvider sfp = new SimpleIRIShortFormProvider();
        String shortForm = sfp.getShortForm(iri);
        assertEquals("x", shortForm);
    }
View Full Code Here

        assertEquals("x", shortForm);
    }

    @Test
    public void testEmptyPathShortForm() {
        IRI iri = IRI("http://owl.cs.manchester.ac.uk/");
        SimpleIRIShortFormProvider sfp = new SimpleIRIShortFormProvider();
        String shortForm = sfp.getShortForm(iri);
        assertEquals("<http://owl.cs.manchester.ac.uk/>", shortForm);
    }
View Full Code Here

public class OWLOntologyToStringTestCase {

    @Test
    public void testNamedOntologyToString() throws OWLOntologyCreationException {
        OWLOntologyManager man = OWLManager.createOWLOntologyManager();
        IRI ontIRI = IRI("http://owlapi.sourceforge.net/ont");
        OWLOntology ont = man.createOntology(ontIRI);
        String s = ont.toString();
        String expected = "Ontology(" + ont.getOntologyID() + ") [Axioms: "
                + ont.getAxiomCount() + " Logical Axioms: "
                + ont.getLogicalAxiomCount() + "] First 20 axioms: {}";
View Full Code Here

                m.getOntologyDocumentIRI(ontology));
    }

    @Test
    public void testCreateOntologyWithIRI() throws OWLOntologyCreationException {
        IRI ontologyIRI = IRI("http://www.semanticweb.org/ontologies/ontology");
        OWLOntology ontology = m.createOntology(ontologyIRI);
        assertNotNull("ontology should not be null", ontology);
        assertNotNull("ontology id should not be null",
                ontology.getOntologyID());
        assertEquals(ontologyIRI, ontology.getOntologyID()
View Full Code Here

    }

    @Test
    public void testCreateOntologyWithIRIAndVersionIRI()
            throws OWLOntologyCreationException {
        IRI ontologyIRI = IRI("http://www.semanticweb.org/ontologies/ontology");
        IRI versionIRI = IRI("http://www.semanticweb.org/ontologies/ontology/version");
        OWLOntology ontology = m.createOntology(new OWLOntologyID(
                of(ontologyIRI), of(versionIRI)));
        assertNotNull("ontology should not be null", ontology);
        assertNotNull("ontology id should not be null",
                ontology.getOntologyID());
View Full Code Here

    }

    @Test
    public void testCreateOntologyWithIRIWithMapper()
            throws OWLOntologyCreationException {
        IRI ontologyIRI = IRI("http://www.semanticweb.org/ontologies/ontology");
        IRI documentIRI = IRI("file:documentIRI");
        SimpleIRIMapper mapper = new SimpleIRIMapper(ontologyIRI, documentIRI);
        m.getIRIMappers().add(mapper);
        OWLOntology ontology = m.createOntology(ontologyIRI);
        assertNotNull("ontology should not be null", ontology);
        assertNotNull("ontology id should not be null",
View Full Code Here

    }

    @Test
    public void testCreateOntologyWithIRIAndVersionIRIWithMapper()
            throws OWLOntologyCreationException {
        IRI ontologyIRI = IRI("http://www.semanticweb.org/ontologies/ontology");
        IRI versionIRI = IRI("http://www.semanticweb.org/ontologies/ontology/version");
        IRI documentIRI = IRI("file:documentIRI");
        SimpleIRIMapper mapper = new SimpleIRIMapper(versionIRI, documentIRI);
        m.getIRIMappers().add(mapper);
        OWLOntology ontology = m.createOntology(new OWLOntologyID(
                of(ontologyIRI), of(versionIRI)));
        assertNotNull("ontology should not be null", ontology);
View Full Code Here

    }

    @Test(expected = OWLOntologyAlreadyExistsException.class)
    public void testCreateDuplicateOntologyWithIRI()
            throws OWLOntologyCreationException {
        IRI ontologyIRI = IRI("http://www.semanticweb.org/ontologies/ontology");
        m.createOntology(ontologyIRI);
        m.createOntology(ontologyIRI);
    }
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.