Package com.clarkparsia.owlapi.explanation.io

Examples of com.clarkparsia.owlapi.explanation.io.ConciseExplanationRenderer


    // ExplanationTestSuite that calls this class. We don't set this value here to
    // avoid repeating the clean up code that sets it bakc to the old value
    assertTrue( !useGlassBox || PelletOptions.USE_TRACING );
   
    converter = new SatisfiabilityConverter(OWL.factory);
    renderer = new ConciseExplanationRenderer();
   
    OWLOntology ontology = OWL.Ontology( ontologyAxioms );     

    PelletReasonerFactory reasonerFactory = PelletReasonerFactory.getInstance();
    reasoner = reasonerFactory.createReasoner( ontology );
View Full Code Here


        unexpectedExplanations.add( explanation );
    }

    if( !notFoundExplanations.isEmpty() || !unexpectedExplanations.isEmpty() ) {
      StringWriter sw = new StringWriter();
      ConciseExplanationRenderer renderer = new ConciseExplanationRenderer();
      renderer.startRendering( sw );
      sw.getBuffer().append( "\nExpected:\n" );
      renderer.render( axiom, expectedExplanations );
      if( !notFoundExplanations.isEmpty() ) {
        sw.getBuffer().append( "Not Found:\n" );
        renderer.render( axiom, notFoundExplanations );
      }
      if( !unexpectedExplanations.isEmpty() ) {
        sw.getBuffer().append( "Unexpected:\n" );
        renderer.render( axiom, unexpectedExplanations );
      }
      renderer.endRendering();
     
      log.severe( "Error in explanation: " + sw );
     
      org.junit.Assert.fail( "Error in explanation, see the log file for details" );
    }
View Full Code Here

  public ExplanationTester(ExplanationGenerator expGen) {
    this.expGen = expGen;

    converter = new SatisfiabilityConverter(OntologyUtils.getOWLOntologyManager().getOWLDataFactory());
    renderer = new ConciseExplanationRenderer();
  }
View Full Code Here

        unexpectedExplanations.add( explanation );
    }

    if( !notFoundExplanations.isEmpty() || !unexpectedExplanations.isEmpty() ) {
      StringWriter sw = new StringWriter();
      ConciseExplanationRenderer renderer = new ConciseExplanationRenderer();
      renderer.startRendering( sw );
      sw.getBuffer().append( "\nExpected:\n" );
      renderer.render( axiom, expectedExplanations );
      if( !notFoundExplanations.isEmpty() ) {
        sw.getBuffer().append( "Not Found:\n" );
        renderer.render( axiom, notFoundExplanations );
      }
      if( !unexpectedExplanations.isEmpty() ) {
        sw.getBuffer().append( "Unexpected:\n" );
        renderer.render( axiom, unexpectedExplanations );
      }
      renderer.endRendering();
     
      log.severe( "Error in explanation: " + sw );
     
      org.junit.Assert.fail( "Error in explanation, see the log file for details" );
    }
View Full Code Here

    // ExplanationTestSuite that calls this class. We don't set this value here to
    // avoid repeating the clean up code that sets it bakc to the old value
    assertTrue( !useGlassBox || PelletOptions.USE_TRACING );
   
    converter = new SatisfiabilityConverter(OWL.factory);
    renderer = new ConciseExplanationRenderer();
   
    OWLOntology ontology = OWL.Ontology( ontologyAxioms );     

    PelletReasonerFactory reasonerFactory = PelletReasonerFactory.getInstance();
    reasoner = reasonerFactory.createReasoner( ontology );
View Full Code Here

        unexpectedExplanations.add( explanation );
    }

    if( !notFoundExplanations.isEmpty() || !unexpectedExplanations.isEmpty() ) {
      StringWriter sw = new StringWriter();
      ConciseExplanationRenderer renderer = new ConciseExplanationRenderer();
      renderer.startRendering( sw );
      sw.getBuffer().append( "\nExpected:\n" );
      renderer.render( axiom, expectedExplanations );
      if( !notFoundExplanations.isEmpty() ) {
        sw.getBuffer().append( "Not Found:\n" );
        renderer.render( axiom, notFoundExplanations );
      }
      if( !unexpectedExplanations.isEmpty() ) {
        sw.getBuffer().append( "Unexpected:\n" );
        renderer.render( axiom, unexpectedExplanations );
      }
      renderer.endRendering();
     
      System.out.println( "Error in explanation: " + sw );
     
      org.junit.Assert.fail( "Error in explanation, see the log file for details" );
    }
View Full Code Here

TOP

Related Classes of com.clarkparsia.owlapi.explanation.io.ConciseExplanationRenderer

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.