Package org.mindswap.pellet.output

Examples of org.mindswap.pellet.output.ATermRenderer


  }

  @Test
  public void testOr() {
    StringWriter s = new StringWriter();
    ATermRenderer r = new ATermManchesterSyntaxRenderer();
    r.setWriter( new PrintWriter( s ) );

    ATermAppl C = term( "C" );
    ATermAppl D = term( "D" );
    ATermAppl E = term( "E" );

    r.visit( or( C, D, E ) );

    String expected = "(C or D or E)";
    String actual = s.toString();

    assertEquals( expected, actual );
View Full Code Here


  }

  @Test
  public void testSelf() {
    StringWriter s = new StringWriter();
    ATermRenderer r = new ATermManchesterSyntaxRenderer();
    r.setWriter( new PrintWriter( s ) );

    ATermAppl p = term( "p" );

    r.visit( self( p ) );

    String expected = "(p Self)";
    String actual = s.toString();

    assertEquals( expected, actual );
View Full Code Here

  }

  @Test
  public void testSome() {
    StringWriter s = new StringWriter();
    ATermRenderer r = new ATermManchesterSyntaxRenderer();
    r.setWriter( new PrintWriter( s ) );

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

    r.visit( some( p, C ) );

    String expected = "(p some C)";
    String actual = s.toString();

    assertEquals( expected, actual );
View Full Code Here

  }

  @Test
  public void test1() {
    StringWriter s = new StringWriter();
    ATermRenderer r = new ATermManchesterSyntaxRenderer();
    r.setWriter( new PrintWriter( s ) );

    ATermAppl C = term( "C" );
    ATermAppl D = term( "D" );
    ATermAppl p = term( "p" );

    r.visit( and( C, some( p, D ) ));

    String expected = "(C and (p some D))";
    String actual = s.toString();

    assertEquals( expected, actual );
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.output.ATermRenderer

Copyright © 2018 www.massapicom. 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.