Package org.mindswap.pellet

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


    kb.addObjectProperty( p );

    kb.addIndividual( a );
    kb.addIndividual( b );

    kb.addType( a, all( p, C ) );
    kb.addType( b, C );

    kb.addPropertyValue( p, a, b );

    kb.removeType( b, C );
View Full Code Here


    kb.addIndividual( a );
    kb.addIndividual( b );

    kb.addType( a, all( p, C ) );
    kb.addType( b, C );

    kb.addPropertyValue( p, a, b );

    kb.removeType( b, C );
View Full Code Here

      kb.addClass( C );
      kb.addIndividual( x );

      kb.addSubClass( C, A );

      kb.addType( x, C );
      kb.addType( x, B );

      Set<Set<ATermAppl>> expectedTypes = new HashSet<Set<ATermAppl>>();
      expectedTypes.add( Collections.singleton( ATermUtils.TOP ) );
      expectedTypes.add( Collections.singleton( A ) );
View Full Code Here

      kb.addIndividual( x );

      kb.addSubClass( C, A );

      kb.addType( x, C );
      kb.addType( x, B );

      Set<Set<ATermAppl>> expectedTypes = new HashSet<Set<ATermAppl>>();
      expectedTypes.add( Collections.singleton( ATermUtils.TOP ) );
      expectedTypes.add( Collections.singleton( A ) );
      expectedTypes.add( Collections.singleton( B ) );
View Full Code Here

    // peform ABox addition which results in a consistent KB
    ATermAppl concept = ATermUtils.makeTermAppl( mindswap + "GraduateStudent" );
    ATermAppl individual = ATermUtils.makeTermAppl( mindswappers + "JohnDoe" );
    kb.addIndividual( individual );
    kb.addType( individual, concept );

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

    ATermAppl p = term( "p" );
    ATermAppl q = term( "q" );

    kb.addIndividual( a );

    kb.addType( a, min( p, 3, TOP ) );
    kb.addType( a, max( q, 2, TOP ) );
    kb.addType( a, min( q, 1, TOP ) );
    kb.addType( a, min( q, 1, TOP ) );

    kb.addObjectProperty( p );
View Full Code Here

    ATermAppl q = term( "q" );

    kb.addIndividual( a );

    kb.addType( a, min( p, 3, TOP ) );
    kb.addType( a, max( q, 2, TOP ) );
    kb.addType( a, min( q, 1, TOP ) );
    kb.addType( a, min( q, 1, TOP ) );

    kb.addObjectProperty( p );
    kb.addObjectProperty( q );
View Full Code Here

    kb.addIndividual( a );

    kb.addType( a, min( p, 3, TOP ) );
    kb.addType( a, max( q, 2, TOP ) );
    kb.addType( a, min( q, 1, TOP ) );
    kb.addType( a, min( q, 1, TOP ) );

    kb.addObjectProperty( p );
    kb.addObjectProperty( q );
View Full Code Here

    kb.addIndividual( a );

    kb.addType( a, min( p, 3, TOP ) );
    kb.addType( a, max( q, 2, TOP ) );
    kb.addType( a, min( q, 1, TOP ) );
    kb.addType( a, min( q, 1, TOP ) );

    kb.addObjectProperty( p );
    kb.addObjectProperty( q );

    assertTrue( kb.isConsistent() );
View Full Code Here

    kb.addClass( C );
    kb.addClass( D );

    kb.addIndividual( a );
    kb.addType( a, C );
    kb.addType( a, D );

    kb.removeType( a, D );

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