Package org.mindswap.pellet

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


    ATermAppl o = ATermUtils.makeTermAppl( "o" );

    kb.addIndividual( s );
    kb.addAnnotationProperty( p );

    assertTrue( kb.addAnnotation( s, p, o ) );

    Set<ATermAppl> actual = kb.getIndividualsWithAnnotation( p, o );
    Set<ATermAppl> expected = new HashSet<ATermAppl>();
    expected.add( s );
View Full Code Here


    ATermAppl o = ATermUtils.makeTermAppl( "o" );

    kb.addIndividual( s );
    kb.addAnnotationProperty( p );

    assertTrue( kb.addAnnotation( s, p, o ) );

    assertEquals( Collections.singleton( o ), kb.getAnnotations( s, p ) );
   
    assertEquals( Collections.singleton( o ), kb.copy().getAnnotations( s, p ) );
  }
View Full Code Here

    ATermAppl o = ATermUtils.makePlainLiteral( "o" );

    kb.addIndividual( s );
    kb.addAnnotationProperty( p );

    assertTrue( kb.addAnnotation( s, p, o ) );
    assertTrue( kb.isIndividual( s ) );
    assertTrue( kb.isAnnotationProperty( p ) );
    assertFalse( kb.isIndividual( o ) );
  }
View Full Code Here

    kb.addIndividual( s );
    kb.addIndividual( o );
    kb.addAnnotationProperty( p );

    assertTrue( kb.addAnnotation( s, p, o ) );
    assertTrue( kb.isIndividual( s ) );
    assertTrue( kb.isAnnotationProperty( p ) );
    assertTrue( kb.isIndividual( o ) );
  }
View Full Code Here

    ATermAppl o = ATermUtils.makeBnode( "b" );

    kb.addIndividual( s );
    kb.addAnnotationProperty( p );

    assertTrue( kb.addAnnotation( s, p, o ) );
    assertTrue( kb.isIndividual( s ) );
    assertTrue( kb.isAnnotationProperty( p ) );
    assertFalse( kb.isIndividual( o ) );
  }
View Full Code Here

    ATermAppl o2 = ATermUtils.makePlainLiteral( "o2" );

    kb.addIndividual( s );
    kb.addAnnotationProperty( p );

    assertTrue( kb.addAnnotation( s, p, o1 ) );
    assertTrue( kb.addAnnotation( s, p, o2 ) );
    assertTrue( kb.isIndividual( s ) );
    assertTrue( kb.isAnnotationProperty( p ) );
    assertFalse( kb.isIndividual( o1 ) );
    assertFalse( kb.isIndividual( o2 ) );
View Full Code Here

    kb.addIndividual( s );
    kb.addAnnotationProperty( p );

    assertTrue( kb.addAnnotation( s, p, o1 ) );
    assertTrue( kb.addAnnotation( s, p, o2 ) );
    assertTrue( kb.isIndividual( s ) );
    assertTrue( kb.isAnnotationProperty( p ) );
    assertFalse( kb.isIndividual( o1 ) );
    assertFalse( kb.isIndividual( o2 ) );
  }
View Full Code Here

    ATermAppl o = ATermUtils.makeTermAppl( "j" );

    kb.addIndividual( s );
    kb.addAnnotationProperty( p );

    assertTrue( kb.addAnnotation( s, p, o ) );

    Set<ATermAppl> actual = kb.getAnnotations( s, p );
    Set<ATermAppl> expected = new HashSet<ATermAppl>();
    expected.add( o );
    assertEquals( expected, actual );
View Full Code Here

    ATermAppl o2 = ATermUtils.makeTermAppl( "j2" );

    kb.addIndividual( s );
    kb.addAnnotationProperty( p );

    assertTrue( kb.addAnnotation( s, p, o1 ) );
    assertTrue( kb.addAnnotation( s, p, o2 ) );

    Set<ATermAppl> actual = kb.getAnnotations( s, p );
    Set<ATermAppl> expected = new HashSet<ATermAppl>();
    expected.add( o1 );
View Full Code Here

    kb.addIndividual( s );
    kb.addAnnotationProperty( p );

    assertTrue( kb.addAnnotation( s, p, o1 ) );
    assertTrue( kb.addAnnotation( s, p, o2 ) );

    Set<ATermAppl> actual = kb.getAnnotations( s, p );
    Set<ATermAppl> expected = new HashSet<ATermAppl>();
    expected.add( o1 );
    expected.add( o2 );
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.