Package org.mindswap.pellet

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


    // peform ABox addition which results in a consistent KB
    ATermAppl concept = ATermUtils.makeTermAppl( mindswap + "GraduateStudent" );
    ATermAppl individual = ATermUtils.makeTermAppl( mindswappers + "JohnDoe" );
    kb.addIndividual( individual );
    kb.addType( individual, concept );

    // perform incremental consistency check
    s = System.currentTimeMillis();
    consistent = kb.isConsistent();
    e = System.currentTimeMillis();
View Full Code Here


    kb.addSubProperty( p, q );
    kb.addInverseProperty( p, invP );
    kb.addInverseProperty( q, invQ );

    // force b to be merged to one of c or d
    kb.addType( b, or( value( c ), value( d ) ) );

    assertTrue( kb.isConsistent() );

    // ask a query that will force the merge to be restored. with the bug
    // the q would not be restored causing either an internal exception or
View Full Code Here

    kb.addSubClass( term( "C" ), ATermUtils.makeSomeValues( term( "p" ), ATermUtils
        .makeValue( ATermUtils.makePlainLiteral( "0" ) ) ) );
    kb.addSubClass( term( "D" ), ATermUtils.makeSomeValues( term( "p" ), ATermUtils
        .makeValue( ATermUtils.makePlainLiteral( "1" ) ) ) );

    kb.addType( term( "x" ), ATermUtils.makeOr( ATermUtils.makeList( new ATerm[] {
        term( "C" ), term( "D" ) } ) ) );

    /*
     * At this point we can get onto one of two branches. In one p(x,"0"),
     * in the other p(x,"1") The branch point is a concept disjunction and
View Full Code Here

    // kb.addSubClass( c, or(e,not(d)) );

    kb.addIndividual( x );
    kb.addIndividual( y3 );

    kb.addType( x, and( min( p, 2, and( d, e ) ), max( p, 2, d ) ) );
    kb.addType( y3, not( e ) );
    kb.addType( y3, some( inv( p ), value( x ) ) );
    kb.addType( y3, or( d, c ) );

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

    kb.addIndividual( x );
    kb.addIndividual( y3 );

    kb.addType( x, and( min( p, 2, and( d, e ) ), max( p, 2, d ) ) );
    kb.addType( y3, not( e ) );
    kb.addType( y3, some( inv( p ), value( x ) ) );
    kb.addType( y3, or( d, c ) );

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

    kb.addIndividual( x );
    kb.addIndividual( y3 );

    kb.addType( x, and( min( p, 2, and( d, e ) ), max( p, 2, d ) ) );
    kb.addType( y3, not( e ) );
    kb.addType( y3, some( inv( p ), value( x ) ) );
    kb.addType( y3, or( d, c ) );

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

    kb.addIndividual( y3 );

    kb.addType( x, and( min( p, 2, and( d, e ) ), max( p, 2, d ) ) );
    kb.addType( y3, not( e ) );
    kb.addType( y3, some( inv( p ), value( x ) ) );
    kb.addType( y3, or( d, c ) );

    assertTrue( kb.isConsistent() );
  }

  @Test
View Full Code Here

    kb.addObjectProperty( q );

    kb.addSubClass( C, or( not( self( p ) ), not( self( q ) ) ) );

    kb.addIndividual( a );
    kb.addType( a, C );

    assertTrue( kb.isConsistent() );

    assertFalse( kb.isType( a, not( self( p ) ) ) );
    assertFalse( kb.isType( a, not( self( q ) ) ) );
View Full Code Here

    kb.addObjectProperty( weakR );
    kb.addReflexiveProperty( r );
    kb.addRange( r, d );

    kb.addIndividual( x );
    kb.addType( x, self( p ) );
    kb.addType( x, not( some( weakR, value( x ) ) ) );
    kb.addIndividual( y );
    kb.addPropertyValue( weakR, y, x );

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

    kb.addReflexiveProperty( r );
    kb.addRange( r, d );

    kb.addIndividual( x );
    kb.addType( x, self( p ) );
    kb.addType( x, not( some( weakR, value( x ) ) ) );
    kb.addIndividual( y );
    kb.addPropertyValue( weakR, y, x );

    assertTrue( 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.