Package org.mindswap.pellet

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


    kb.addIndividual( s1 );
    kb.addIndividual( s2 );
    kb.addAnnotationProperty( p1 );
    kb.addAnnotationProperty( p2 );

    assertTrue( kb.addAnnotation( s1, p1, o1 ) );
    assertTrue( kb.addAnnotation( s1, p2, o2 ) );
    assertTrue( kb.addAnnotation( s2, p2, o3 ) );

    Set<ATermAppl> actual = kb.getAnnotations( s1, p1 );
    Set<ATermAppl> expected = new HashSet<ATermAppl>();
View Full Code Here


    kb.addIndividual( s2 );
    kb.addAnnotationProperty( p1 );
    kb.addAnnotationProperty( p2 );

    assertTrue( kb.addAnnotation( s1, p1, o1 ) );
    assertTrue( kb.addAnnotation( s1, p2, o2 ) );
    assertTrue( kb.addAnnotation( s2, p2, o3 ) );

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

    kb.addAnnotationProperty( p1 );
    kb.addAnnotationProperty( p2 );

    assertTrue( kb.addAnnotation( s1, p1, o1 ) );
    assertTrue( kb.addAnnotation( s1, p2, o2 ) );
    assertTrue( kb.addAnnotation( s2, p2, o3 ) );

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

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

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

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

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

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

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

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

    Set<ATermAppl> actual = kb.getProperties();
    Set<ATermAppl> expected = new HashSet<ATermAppl>();
    expected.add( p );
    expected.add( ATermUtils.TOP_OBJECT_PROPERTY );
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.