Package org.mindswap.pellet

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


    assertTrue( copyKB.getABox().isComplete() );

    assertTrue( copyKB.isKnownType( a, C ).isTrue() );
   
    // change the copy KB's ABox
    copyKB.addType( b, E );

    // copy should NOT be in ConsistencyDone state anymore
    // but original KB is still in ConsistencyDone state
    assertFalse( copyKB.isConsistencyDone() );
    assertTrue( kb.isConsistencyDone() );
View Full Code Here


    kb.addObjectProperty( p );
    kb.addDatatypeProperty( q );
   
    kb.addPropertyValue( p, a, b );
    kb.addType( a, some( q, value( lit ) ) );
   
    kb.ensureConsistency();
   
    assertTrue( kb.getABox().getLiteral( lit ).hasType( Datatypes.LITERAL ) );
   
View Full Code Here

    KnowledgeBase kb = new KnowledgeBase();
    kb.addClass( c );
    kb.addClass( d );
    kb.addIndividual( i );
    kb.addType( i, c );

    kb.addRule( new Rule( Arrays.asList( new RuleAtom[] { new ClassAtom( d, new AtomIConstant(
        i ) ) } ), Arrays
        .asList( new RuleAtom[] { new ClassAtom( c, new AtomIConstant( i ) ) } ) ) );
View Full Code Here

    kb.addPropertyValue( hasParent, c11, p1a );
    kb.addPropertyValue( hasSibling, c11, c12 );
    kb.addPropertyValue( hasParent, c12, p1a );
    kb.addPropertyValue( hasSibling, c12, c11 );
    kb.addPropertyValue( hasSibling, p1a, p2a );
    kb.addType( p2a, male );

    AtomIVariable x = new AtomIVariable( "x" ), y = new AtomIVariable( "y" ), z = new AtomIVariable(
        "z" );

    kb.addRule( new Rule( Arrays.asList( new RuleAtom[] { new IndividualPropertyAtom( hasUncle,
View Full Code Here

    kb.addClass( B );
    kb.addClass( C );
    kb.addClass( G );
    kb.addClass( H );

    kb.addType( a, A );
    kb.addType( b, B );
    kb.addType( c, C );
    kb.addType( x, or( G, all( q, not( H ) ) ) );
    kb.addType( x, max( p, 2, TOP ) );
    kb.addType( y, H );
View Full Code Here

    kb.addClass( C );
    kb.addClass( G );
    kb.addClass( H );

    kb.addType( a, A );
    kb.addType( b, B );
    kb.addType( c, C );
    kb.addType( x, or( G, all( q, not( H ) ) ) );
    kb.addType( x, max( p, 2, TOP ) );
    kb.addType( y, H );
    kb.addPropertyValue( p, x, a );
View Full Code Here

    kb.addClass( G );
    kb.addClass( H );

    kb.addType( a, A );
    kb.addType( b, B );
    kb.addType( c, C );
    kb.addType( x, or( G, all( q, not( H ) ) ) );
    kb.addType( x, max( p, 2, TOP ) );
    kb.addType( y, H );
    kb.addPropertyValue( p, x, a );
    kb.addPropertyValue( p, x, b );
View Full Code Here

    kb.addClass( H );

    kb.addType( a, A );
    kb.addType( b, B );
    kb.addType( c, C );
    kb.addType( x, or( G, all( q, not( H ) ) ) );
    kb.addType( x, max( p, 2, TOP ) );
    kb.addType( y, H );
    kb.addPropertyValue( p, x, a );
    kb.addPropertyValue( p, x, b );
    kb.addPropertyValue( p, x, c );
View Full Code Here

    kb.addType( a, A );
    kb.addType( b, B );
    kb.addType( c, C );
    kb.addType( x, or( G, all( q, not( H ) ) ) );
    kb.addType( x, max( p, 2, TOP ) );
    kb.addType( y, H );
    kb.addPropertyValue( p, x, a );
    kb.addPropertyValue( p, x, b );
    kb.addPropertyValue( p, x, c );
View Full Code Here

    kb.addType( a, A );
    kb.addType( b, B );
    kb.addType( c, C );
    kb.addType( x, or( G, all( q, not( H ) ) ) );
    kb.addType( x, max( p, 2, TOP ) );
    kb.addType( y, H );
    kb.addPropertyValue( p, x, a );
    kb.addPropertyValue( p, x, b );
    kb.addPropertyValue( p, x, c );

    {
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.