Examples of addDatatypeProperty()


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

      KnowledgeBase kb = new KnowledgeBase();

      ATermAppl p = term( "p" );
      ATermAppl c = and( all( p, value( literal( "s" ) ) ), min( p, 2, value( literal( "l" ) ) ) );

      kb.addDatatypeProperty( p );

      assertFalse( kb.isSatisfiable( c ) );
    }
    finally {
      PelletOptions.setOptions( savedOptions );
View Full Code Here

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

    kb.addIndividual( term( "x" ) );

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

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

    kb.addSubClass( term( "C" ), ATermUtils.makeSomeValues( term( "p" ), ATermUtils
        .makeValue( ATermUtils.makePlainLiteral( "0" ) ) ) );
    kb.addSubClass( term( "D" ), ATermUtils.makeSomeValues( term( "p" ), ATermUtils
View Full Code Here

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

    ATermAppl sub = Datatypes.SHORT;
    ATermAppl sup = Datatypes.INTEGER;

    kb.addDatatype(sub);
    kb.addDatatype(sup);
    kb.addDatatypeProperty( p );
    kb.addDatatypeProperty( f );
    kb.addFunctionalProperty( f );

    assertSatisfiable( kb, and( min( p, 2, and( c, d ) ), max( p, 2, c ), some( p, or( and( c,
        not( d ) ), c ) ) ) );
View Full Code Here

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

    ATermAppl sup = Datatypes.INTEGER;

    kb.addDatatype(sub);
    kb.addDatatype(sup);
    kb.addDatatypeProperty( p );
    kb.addDatatypeProperty( f );
    kb.addFunctionalProperty( f );

    assertSatisfiable( kb, and( min( p, 2, and( c, d ) ), max( p, 2, c ), some( p, or( and( c,
        not( d ) ), c ) ) ) );
    assertSubClass( kb, min( p, 4, TOP_LIT ), min( p, 2, TOP_LIT ) );
View Full Code Here

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

    ATermAppl ni = Datatypes.NEGATIVE_INTEGER;
    ATermAppl pi = Datatypes.POSITIVE_INTEGER;
    ATermAppl f = Datatypes.FLOAT;

    ATermAppl s = term( "s" );
    kb.addDatatypeProperty( s );

    assertSatisfiable( kb, some( s, pi ) );
    assertSatisfiable( kb, some( s, not ( pi ) ) );
    assertUnsatisfiable( kb, some( s, and( pi, ni ) ) );
    assertUnsatisfiable( kb, some( s, and( f, or( pi, ni ) ) ) );
View Full Code Here

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

    ATermAppl p = term( "p" );

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

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

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

    for( ATermAppl rangeP : ranges ) {
      for( ATermAppl rangeQ : ranges ) {
        kb.clear();

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

        if( rangeP != null ) {
          kb.addRange( p, rangeP );
        }
View Full Code Here

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

    for( ATermAppl rangeP : ranges ) {
      for( ATermAppl rangeQ : ranges ) {
        kb.clear();

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

        if( rangeP != null ) {
          kb.addRange( p, rangeP );
        }
        if( rangeQ != null ) {
View Full Code Here

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

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

    kb.addClass( C );

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

    kb.addDomain( p, C );

    kb.addRange( q, XSDInteger.getInstance().getName() );
View Full Code Here

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

    ATermAppl q = term( "q" );

    kb.addClass( C );

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

    kb.addDomain( p, C );

    kb.addRange( q, XSDInteger.getInstance().getName() );
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.