Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.HasIRI


            @Nonnull String expectedDomain, @Nonnull String expectedRange,
            @Nonnull String expectedSuperProperty) {
        Collection<OWLClassExpression> ranges = Searcher.range(cidocOntology
                .getObjectPropertyRangeAxioms(p11property));
        assertEquals("should have 1 range", 1, ranges.size());
        HasIRI range = (HasIRI) ranges.iterator().next();
        IRI rangeIRI = range.getIRI();
        IRI expectedIRI = IRI.create(expectedRange);
        if (!expectedIRI.isAbsolute()) {
            expectedIRI = prefixOWLOntologyFormat.getIRI(expectedRange);
        }
        assertEquals("range", expectedIRI, rangeIRI);
        Collection<OWLClassExpression> domains = Searcher.domain(cidocOntology
                .getObjectPropertyDomainAxioms(p11property));
        // p11_property .getDomains(cidocOntology);
        assertEquals("should have 1 domain", 1, domains.size());
        HasIRI domain = (HasIRI) domains.iterator().next();
        IRI domainIRI = domain.getIRI();
        assertEquals("domain should be E5_Event",
                prefixOWLOntologyFormat.getIRI(expectedDomain), domainIRI);
        Collection<OWLObjectPropertyExpression> superProperties = Searcher
                .sup(cidocOntology
                        .filterAxioms(Filters.subObjectPropertyWithSub,
                                p11property, INCLUDED));
        // Set<OWLPropertyExpression> superProperties =
        // p11_property.getSuperProperties(cidocOntology);
        assertEquals("should have 1 super Property", 1, superProperties.size());
        HasIRI superProperty = (HasIRI) superProperties.iterator().next();
        IRI superPropertyIRI = superProperty.getIRI();
        assertEquals("super property ",
                prefixOWLOntologyFormat.getIRI(expectedSuperProperty),
                superPropertyIRI);
    }
View Full Code Here


            @Nonnull String expectedDomain, @Nonnull String expectedRange,
            @Nonnull String expectedSuperProperty) {
        Collection<OWLClassExpression> ranges = Searcher.range(cidocOntology
                .getDataPropertyRangeAxioms(p11property));
        assertEquals("should have 1 range", 1, ranges.size());
        HasIRI range = (HasIRI) ranges.iterator().next();
        IRI rangeIRI = range.getIRI();
        IRI expectedIRI = IRI.create(expectedRange);
        if (!expectedIRI.isAbsolute()) {
            expectedIRI = prefixOWLOntologyFormat.getIRI(expectedRange);
        }
        assertEquals("range", expectedIRI, rangeIRI);
        Collection<OWLClassExpression> domains = Searcher.domain(cidocOntology
                .getDataPropertyDomainAxioms(p11property));
        // p11_property .getDomains(cidocOntology);
        assertEquals("should have 1 domain", 1, domains.size());
        HasIRI domain = (HasIRI) domains.iterator().next();
        IRI domainIRI = domain.getIRI();
        assertEquals("domain should be E5_Event",
                prefixOWLOntologyFormat.getIRI(expectedDomain), domainIRI);
        Collection<OWLObjectPropertyExpression> superProperties = Searcher
                .sup(cidocOntology.filterAxioms(Filters.subDataPropertyWithSub,
                        p11property, INCLUDED));
        // Set<OWLPropertyExpression> superProperties =
        // p11_property.getSuperProperties(cidocOntology);
        assertEquals("should have 1 super Property", 1, superProperties.size());
        HasIRI superProperty = (HasIRI) superProperties.iterator().next();
        IRI superPropertyIRI = superProperty.getIRI();
        assertEquals("super property ",
                prefixOWLOntologyFormat.getIRI(expectedSuperProperty),
                superPropertyIRI);
    }
View Full Code Here

TOP

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

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.