Package org.mindswap.pellet

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


    // peform ABox addition which results in an inconsistent KB
    ATermAppl role = ATermUtils.makeTermAppl( foaf + "mbox" );
    individual = ATermUtils.makeTermAppl( mindswappers + "Christian.Halaschek" );
    ATermAppl mbox = ATermUtils.makeTermAppl( "mailto:kolovski@cs.umd.edu" );
    kb.addPropertyValue( role, individual, mbox );

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


    kb.addObjectProperty( q );
    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 );
View Full Code Here

    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

    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

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

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.