Package org.mindswap.pellet

Examples of org.mindswap.pellet.KnowledgeBase.addEquivalentClass()


    kb.addClass( C );
    kb.addIndividual( a );
    kb.addIndividual( b );

    kb.addSubClass( C, oneOf( a, b ) );
    kb.addEquivalentClass( A, oneOf( a ) );
    kb.addEquivalentClass( B, oneOf( b ) );
    kb.addDisjointClass( A, B );

    assertTrue( kb.isConsistent() );
View Full Code Here


    kb.addIndividual( a );
    kb.addIndividual( b );

    kb.addSubClass( C, oneOf( a, b ) );
    kb.addEquivalentClass( A, oneOf( a ) );
    kb.addEquivalentClass( B, oneOf( b ) );
    kb.addDisjointClass( A, B );

    assertTrue( kb.isConsistent() );

    assertTrue( kb.isSatisfiable( C ) );
View Full Code Here

    kb.addIndividual( i1 );
    kb.addIndividual( i21 );
    kb.addIndividual( i22 );
    kb.addIndividual( test );

    kb.addEquivalentClass( t1, t1eq );
    kb.addSame( i1, i21 );
    kb.addSame( i21, i1 );

    kb.addPropertyValue( p, test, i21 );
    kb.addPropertyValue( p, test, i22 );
View Full Code Here

    kb.addObjectProperty( p );

    kb.addIndividual( b );
    kb.addIndividual( c );

    kb.addEquivalentClass( A, oneOf( b, c ) );
    kb.addEquivalentClass( B, hasValue( p, b ) );
    kb.addEquivalentClass( C, hasValue( p, c ) );
    kb.addEquivalentClass( D, and( some( p, A ), min( p, 1, value(b) ), min( p, 1, value(c) ), max( p, 1,
        TOP ) ) );
View Full Code Here

    kb.addIndividual( b );
    kb.addIndividual( c );

    kb.addEquivalentClass( A, oneOf( b, c ) );
    kb.addEquivalentClass( B, hasValue( p, b ) );
    kb.addEquivalentClass( C, hasValue( p, c ) );
    kb.addEquivalentClass( D, and( some( p, A ), min( p, 1, value(b) ), min( p, 1, value(c) ), max( p, 1,
        TOP ) ) );

    assertTrue( kb.isConsistent() );
View Full Code Here

    kb.addIndividual( b );
    kb.addIndividual( c );

    kb.addEquivalentClass( A, oneOf( b, c ) );
    kb.addEquivalentClass( B, hasValue( p, b ) );
    kb.addEquivalentClass( C, hasValue( p, c ) );
    kb.addEquivalentClass( D, and( some( p, A ), min( p, 1, value(b) ), min( p, 1, value(c) ), max( p, 1,
        TOP ) ) );

    assertTrue( kb.isConsistent() );
View Full Code Here

    kb.addIndividual( c );

    kb.addEquivalentClass( A, oneOf( b, c ) );
    kb.addEquivalentClass( B, hasValue( p, b ) );
    kb.addEquivalentClass( C, hasValue( p, c ) );
    kb.addEquivalentClass( D, and( some( p, A ), min( p, 1, value(b) ), min( p, 1, value(c) ), max( p, 1,
        TOP ) ) );

    assertTrue( kb.isConsistent() );

    kb.classify();
View Full Code Here

    kb.addObjectProperty( p );

    kb.addIndividual( a );
    kb.addIndividual( b );

    kb.addEquivalentClass( A, value( a ) );
    kb.addSubClass( A, all( inv(p), not( B ) ) );
    kb.addSubClass( B, or( some( p, A ), C ) );

    kb.addType( b, B );
View Full Code Here

    kb.addClass( C );

    kb.addDatatypeProperty( p );

    // B is completely defined except this equivalence
    kb.addEquivalentClass( A, B );
    // A is not primitive because of the domain axiom
    kb.addDomain( p, A );
    // C should be inferred to be a subclass of A and B
    kb.addSubClass( C, some(p, TOP_LIT ) );
View Full Code Here

  @Test
  public void testCyclicTBox1() {
    KnowledgeBase kb = new KnowledgeBase();

    ATermAppl C = term( "C" );
    kb.addEquivalentClass( C, not( C ) );

    assertFalse( kb.isConsistent() );
  }

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.