Java 类org.semanticweb.owlapi.model.OWLPropertyExpressionVisitorEx 实例源码

项目:elk-reasoner    文件:OwlObjectPropertyExpressionConverterVisitorTest.java   
/**
 * Testing correctness of converting nested inverses
 */
@Test
public void testNestedInverses() {


    OWLDataFactory factory = new OWLDataFactoryImpl();
    OWLObjectProperty r = factory.getOWLObjectProperty(IRI.create("R"));
    OWLObjectPropertyExpression ri = factory.getOWLObjectInverseOf(r);

    OWLPropertyExpressionVisitorEx<ElkObjectPropertyExpression> converter = OwlObjectPropertyExpressionConverterVisitor
            .getInstance();

    ElkObjectPropertyExpression s = r.accept(converter);
    ElkObjectPropertyExpression si = ri.accept(converter);

    assertTrue(s instanceof ElkObjectProperty);
    assertTrue(si instanceof ElkObjectInverseOf);

    ElkIri expectedIri = ((ElkObjectProperty) s).getIri();

    assertEquals(expectedIri, ((ElkObjectInverseOf) si).getObjectProperty()
            .getIri());

}
项目:owlapi-gwt    文件:OWLDataPropertyImpl.java   
@Override
public <O> O accept(OWLPropertyExpressionVisitorEx<O> visitor) {
    return visitor.visit(this);
}
项目:owlapi-gwt    文件:OWLObjectInverseOfImpl.java   
@Override
public <O> O accept(OWLPropertyExpressionVisitorEx<O> visitor) {
    return visitor.visit(this);
}