Package org.mindswap.pellet

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


    kb.addIndividual( i );
    kb.addIndividual( j );
    kb.addIndividual( k );

    kb.addPropertyValue( p, i, d );
    kb.addPropertyValue( r, i, j );
    kb.addPropertyValue( r, j, k );

    AtomIVariable x = new AtomIVariable( "x" ), y = new AtomIVariable( "y" );
    AtomDVariable z = new AtomDVariable( "z" );
View Full Code Here


   
    kb.addEquivalentClass( t1, t1eq );
    kb.addSame( i1, i21 );
    kb.addSame( i21, i1 );
   
    kb.addPropertyValue( p, test, i21 );
    kb.addPropertyValue( p, test, i22 );
   
    Set<ATermAppl> t1inds = kb.retrieve( t1eq, kb.getIndividuals() );
    assertEquals( "Individual test should be of type T1. ", Collections.singleton( test ), t1inds);
   
View Full Code Here

    kb.addEquivalentClass( t1, t1eq );
    kb.addSame( i1, i21 );
    kb.addSame( i21, i1 );
   
    kb.addPropertyValue( p, test, i21 );
    kb.addPropertyValue( p, test, i22 );
   
    Set<ATermAppl> t1inds = kb.retrieve( t1eq, kb.getIndividuals() );
    assertEquals( "Individual test should be of type T1. ", Collections.singleton( test ), t1inds);
   
  }
View Full Code Here

    kb.addIndividual( b );
    kb.addIndividual( c );
    kb.addIndividual( d );
    kb.addIndividual( e );
   
    kb.addPropertyValue( r, a, b );
    kb.addPropertyValue( r, b, c );
    kb.addPropertyValue( r, b, d );
    kb.addPropertyValue( s, a, c );
    kb.addPropertyValue( s, c, b );
    kb.addPropertyValue( s, c, e );
View Full Code Here

    kb.addIndividual( c );
    kb.addIndividual( d );
    kb.addIndividual( e );
   
    kb.addPropertyValue( r, a, b );
    kb.addPropertyValue( r, b, c );
    kb.addPropertyValue( r, b, d );
    kb.addPropertyValue( s, a, c );
    kb.addPropertyValue( s, c, b );
    kb.addPropertyValue( s, c, e );
View Full Code Here

    kb.addIndividual( d );
    kb.addIndividual( e );
   
    kb.addPropertyValue( r, a, b );
    kb.addPropertyValue( r, b, c );
    kb.addPropertyValue( r, b, d );
    kb.addPropertyValue( s, a, c );
    kb.addPropertyValue( s, c, b );
    kb.addPropertyValue( s, c, e );

    assertTrue( kb.hasPropertyValue( a, p, b ) );
View Full Code Here

    kb.addIndividual( e );
   
    kb.addPropertyValue( r, a, b );
    kb.addPropertyValue( r, b, c );
    kb.addPropertyValue( r, b, d );
    kb.addPropertyValue( s, a, c );
    kb.addPropertyValue( s, c, b );
    kb.addPropertyValue( s, c, e );

    assertTrue( kb.hasPropertyValue( a, p, b ) );
    assertTrue( kb.hasPropertyValue( a, p, c ) );
View Full Code Here

   
    kb.addPropertyValue( r, a, b );
    kb.addPropertyValue( r, b, c );
    kb.addPropertyValue( r, b, d );
    kb.addPropertyValue( s, a, c );
    kb.addPropertyValue( s, c, b );
    kb.addPropertyValue( s, c, e );

    assertTrue( kb.hasPropertyValue( a, p, b ) );
    assertTrue( kb.hasPropertyValue( a, p, c ) );
    assertTrue( kb.hasPropertyValue( a, p, d ) );
View Full Code Here

    kb.addPropertyValue( r, a, b );
    kb.addPropertyValue( r, b, c );
    kb.addPropertyValue( r, b, d );
    kb.addPropertyValue( s, a, c );
    kb.addPropertyValue( s, c, b );
    kb.addPropertyValue( s, c, e );

    assertTrue( kb.hasPropertyValue( a, p, b ) );
    assertTrue( kb.hasPropertyValue( a, p, c ) );
    assertTrue( kb.hasPropertyValue( a, p, d ) );
    assertTrue( kb.hasPropertyValue( a, p, e ) );
View Full Code Here

    kb.addType( a, some( p, XSDInteger.getInstance().getName() ) );
    // bogus axiom to force full datatype reasoning
    kb.addType( a, max( p, 2, TOP_LIT ) );
   
    // b has an asserted p value which is a string
    kb.addPropertyValue( p, b, literal( "b" ) );

    // check consistency whihc
    assertTrue( kb.isConsistent() );

    // this query will force a and b to be merged which will cause
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.