Package org.mindswap.pellet

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


    kb.addObjectProperty( invP );
    kb.addObjectProperty( invQ );

    // first add the ABox assertions to make sure none is ignored
    kb.addPropertyValue( p, a, b );
    kb.addPropertyValue( q, a, b );

    // add the subproperty axiom later
    kb.addSubProperty( p, q );
    kb.addInverseProperty( p, invP );
    kb.addInverseProperty( q, invQ );
View Full Code Here


    assertNotNull( kb.getABox().getIndividual( term( "y" ) ) );

    /*
     * This assertion causes a clash regardless of which branch we are on
     */
    kb.addPropertyValue( term( "p" ), term( "x" ), ATermUtils.makePlainLiteral( "2" ) );

    assertFalse( kb.isConsistent() );

    /*
     * In 2.0.0-rc5 (and perhaps earlier, this assertion fails)
View Full Code Here

    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() );

    assertTrue( kb.isSubClassOf( and( c, self( p ) ), some( p, c ) ) );
    assertTrue( kb.isSubClassOf( and( c, min( r, 1, not( c ) ) ), min( r, 2, TOP ) ) );
View Full Code Here

    kb.addIndividual( term( "x3" ) );
    kb.addType( term( "x3" ), term( "D3" ) );
    kb.addIndividual( term( "x4" ) );
    kb.addType( term( "x4" ), term( "D4" ) );

    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x1" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x2" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x3" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x4" ) );

    kb.addDisjointClass( term( "E1" ), term( "E2" ) );
View Full Code Here

    kb.addType( term( "x3" ), term( "D3" ) );
    kb.addIndividual( term( "x4" ) );
    kb.addType( term( "x4" ), term( "D4" ) );

    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x1" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x2" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x3" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x4" ) );

    kb.addDisjointClass( term( "E1" ), term( "E2" ) );
    kb.addDisjointClass( term( "E1" ), term( "E4" ) );
View Full Code Here

    kb.addIndividual( term( "x4" ) );
    kb.addType( term( "x4" ), term( "D4" ) );

    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x1" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x2" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x3" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x4" ) );

    kb.addDisjointClass( term( "E1" ), term( "E2" ) );
    kb.addDisjointClass( term( "E1" ), term( "E4" ) );
    kb.addDisjointClass( term( "E2" ), term( "E3" ) );
View Full Code Here

    kb.addType( term( "x4" ), term( "D4" ) );

    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x1" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x2" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x3" ) );
    kb.addPropertyValue( term( "p" ), term( "x" ), term( "x4" ) );

    kb.addDisjointClass( term( "E1" ), term( "E2" ) );
    kb.addDisjointClass( term( "E1" ), term( "E4" ) );
    kb.addDisjointClass( term( "E2" ), term( "E3" ) );
View Full Code Here

    kb.addSubClass( C, some( p, some( q, all( inv( r ), D ) ) ) );

    kb.addIndividual( a );
    kb.addIndividual( b );
    kb.addIndividual( c );
    kb.addPropertyValue( p, a, b );
    kb.addPropertyValue( q, b, c );

    assertTrue( kb.isSubClassOf( C, D ) );
    assertTrue( kb.hasPropertyValue( a, r, c ) );
    assertEquals( Arrays.asList( c ), kb.getPropertyValues( r, a ) );
View Full Code Here

    kb.addIndividual( a );
    kb.addIndividual( b );
    kb.addIndividual( c );
    kb.addPropertyValue( p, a, b );
    kb.addPropertyValue( q, b, c );

    assertTrue( kb.isSubClassOf( C, D ) );
    assertTrue( kb.hasPropertyValue( a, r, c ) );
    assertEquals( Arrays.asList( c ), kb.getPropertyValues( r, a ) );
  }
View Full Code Here

    kb.addIndividual( a );
    kb.addIndividual( b );
    kb.addIndividual( c );
    kb.addIndividual( d );
    kb.addPropertyValue( p, a, b );
    kb.addPropertyValue( q, b, c );
    kb.addPropertyValue( r, c, d );

    kb.prepare();
   
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.