Package org.mindswap.pellet

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


    kb.addDatatypeProperty( p );
    kb.addFunctionalProperty( p );

    // a has a p-successor which is an integer
    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" ) );
View Full Code Here


    kb.addFunctionalProperty( p );

    // a has a p-successor which is an integer
    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
View Full Code Here

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

    assertTrue( kb.isConsistent() );

    assertTrue( kb.isType( b, C ) );
    assertFalse( kb.isType( a, C ) );
View Full Code Here

    kb.addIndividual( a );

    kb.addSubClass( A, some( p, Datatypes.NON_POSITIVE_INTEGER ) );
    kb.addSubClass( A, all( p, Datatypes.NON_NEGATIVE_INTEGER ) );

    kb.addType( a, A );

    assertTrue( kb.isConsistent() );

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

    kb.addDatatypeProperty( p );
    kb.addDatatypeProperty( q );

    kb.addIndividual( a );

    kb.addType( a, A );

    kb.addSubClass( A, min( p, 1, TOP_LIT ) );
    kb.addRange( p, oneOf( lit1 ) );

    kb.addSubClass( A, some( q, TOP_LIT ) );
View Full Code Here

    kb.addSubClass( C, card( p, COUNT + 1, ATermUtils.TOP_LIT ) );
    kb.addSubClass( D, card( p, COUNT, ATermUtils.TOP_LIT ) );
    kb.addSubClass( E, card( p, COUNT - 1, ATermUtils.TOP_LIT ) );

    kb.addIndividual( x );
    kb.addType( x, D );

    kb.addIndividual( y );
    kb.addType( y, E );

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

    kb.addIndividual( x );
    kb.addType( x, D );

    kb.addIndividual( y );
    kb.addType( y, E );

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

    kb.addSubClass( term( "D2" ), ATermUtils.makeSomeValues( term( "q" ), term( "E2" ) ) );
    kb.addSubClass( term( "D3" ), ATermUtils.makeSomeValues( term( "q" ), term( "E3" ) ) );
    kb.addSubClass( term( "D4" ), ATermUtils.makeSomeValues( term( "q" ), term( "E4" ) ) );

    kb.addIndividual( term( "x" ) );
    kb.addType( term( "x" ), term( "C" ) );
    kb.addIndividual( term( "x1" ) );
    kb.addType( term( "x1" ), term( "D1" ) );
    kb.addIndividual( term( "x2" ) );
    kb.addType( term( "x2" ), term( "D2" ) );
    kb.addIndividual( term( "x3" ) );
View Full Code Here

    kb.addSubClass( term( "D4" ), ATermUtils.makeSomeValues( term( "q" ), term( "E4" ) ) );

    kb.addIndividual( term( "x" ) );
    kb.addType( term( "x" ), term( "C" ) );
    kb.addIndividual( term( "x1" ) );
    kb.addType( term( "x1" ), term( "D1" ) );
    kb.addIndividual( term( "x2" ) );
    kb.addType( term( "x2" ), term( "D2" ) );
    kb.addIndividual( term( "x3" ) );
    kb.addType( term( "x3" ), term( "D3" ) );
    kb.addIndividual( term( "x4" ) );
View Full Code Here

    kb.addIndividual( term( "x" ) );
    kb.addType( term( "x" ), term( "C" ) );
    kb.addIndividual( term( "x1" ) );
    kb.addType( term( "x1" ), term( "D1" ) );
    kb.addIndividual( term( "x2" ) );
    kb.addType( term( "x2" ), term( "D2" ) );
    kb.addIndividual( term( "x3" ) );
    kb.addType( term( "x3" ), term( "D3" ) );
    kb.addIndividual( term( "x4" ) );
    kb.addType( term( "x4" ), term( "D4" ) );
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.