Examples of addSubClass()


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

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

    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() );
View Full Code Here

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

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

    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() );
View Full Code Here

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

    kb.addClass( A );
    kb.addDatatypeProperty( p );
    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() );
View Full Code Here

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

    kb.addClass( A );
    kb.addDatatypeProperty( p );
    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() );
View Full Code Here

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

    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 ) );
    kb.addRange( q, oneOf( lit2 ) );
View Full Code Here

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

    kb.addType( a, A );

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

    kb.addSubClass( A, some( q, TOP_LIT ) );
    kb.addRange( q, oneOf( lit2 ) );

    assertTrue( kb.isConsistent() );

View Full Code Here

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

    // B is completely defined except this equivalence
    kb.addEquivalentClass( A, B );
    // A is not primitive because of the domain axiom
    kb.addDomain( p, A );
    // C should be inferred to be a subclass of A and B
    kb.addSubClass( C, some(p, TOP_LIT ) );

    kb.classify();

    assertSubClass( kb, C, A );
    assertSubClass( kb, C, B );
View Full Code Here

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

    ATermAppl c = term( "c" );
    ATermAppl r = term( "r" );

    kb.addIndividual( a );
    kb.addClass( c );
    kb.addSubClass( c, all( r, BOTTOM ) );
    kb.addSubClass( c, oneOf( a ) );

    kb.addObjectProperty( r );
    kb.addReflexiveProperty( r );
View Full Code Here

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

    ATermAppl r = term( "r" );

    kb.addIndividual( a );
    kb.addClass( c );
    kb.addSubClass( c, all( r, BOTTOM ) );
    kb.addSubClass( c, oneOf( a ) );

    kb.addObjectProperty( r );
    kb.addReflexiveProperty( r );

    assertSatisfiable( kb, c, false );
View Full Code Here

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

    kb.addRange( p, ATermUtils.makeRestrictedDatatype( XSDInteger.getInstance().getName(), new ATermAppl[] {
      ATermUtils.makeFacetRestriction( Facet.XSD.MIN_INCLUSIVE.getName(), ATermUtils.makeTypedLiteral( Byte.toString( MIN ), XSDByte.getInstance().getName() ) ),
      ATermUtils.makeFacetRestriction( Facet.XSD.MAX_INCLUSIVE.getName(), ATermUtils.makeTypedLiteral( Byte.toString( MAX ), XSDByte.getInstance().getName() ) )
    }) );

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