Package org.mindswap.pellet.output

Examples of org.mindswap.pellet.output.TableData


        count++;
    }

    output( "Query Results (" + count + " answers): " );

    TableData table = new TableData( data, resultVars );
    StringWriter tableSW = new StringWriter();
    table.print( tableSW );
    output( tableSW.toString() );
  }
View Full Code Here


  public void doAllTBoxTests( String dirName, FileFilter filter ) throws Exception {
    File dir = new File(dirName);
    File[] files = dir.listFiles( filter );
    Arrays.sort(files, AlphaNumericComparator.CASE_INSENSITIVE);
   
    TableData table = new TableData(Arrays.asList(new String[] { "Name", "Size", "Time"} ));
    for(int i = 0; i < files.length; i++) {
      System.out.print((i+1) + ") ");

      List data = new ArrayList()
      data.add( files[i] );
      try {
        doTBoxTest(files[i].toString());
        data.add(Integer.valueOf(kb.getClasses().size()));
        data.add(kb.timers.getTimer("test").getTotal() + "");
      } catch(TimeoutException e) {
        System.out.println(" ** Timeout: " + e.getMessage() + " ** ");
      } catch(Exception e) {
        e.printStackTrace(System.err);       
        System.out.println();
      } catch(OutOfMemoryError e) {
        System.out.println(" ** Out of Memory ** ");
      } catch(StackOverflowError e) {
        System.out.println(" ** Stack Overflow ** ");     
      } catch(Error e) {
        e.printStackTrace(System.err);       
      }
      table.add(data);
    }   
   
    System.out.print( table );
  }
View Full Code Here

        });   
        }
   
        NumberFormat nf = new DecimalFormat("0.00");
     
    TableData table = new TableData( Arrays.asList( colNames ) );
        table.setAlignment( alignment );
    for( Timer timer : list ) {
//      if(timer.getCount() == 0)
//          continue;
      List<Object> row = new ArrayList<Object>();
      row.add(timer.getName());
      if(!shortForm) {
        row.add(String.valueOf(timer.getCount()));
        row.add(nf.format(timer.getAverage()));
      }
      if( timer.isStarted() )
        row.add(String.valueOf(timer.getElapsed()));
      else
        row.add(String.valueOf(timer.getTotal()));
      table.add(row);
    }
   
    table.print( pw );
  }
View Full Code Here

  public void doAllTBoxTests( String dirName, FileFilter filter ) throws Exception {
    File dir = new File(dirName);
    File[] files = dir.listFiles( filter );
    Arrays.sort(files, AlphaNumericComparator.CASE_INSENSITIVE);
   
    TableData table = new TableData(Arrays.asList(new String[] { "Name", "Size", "Time"} ));
    for(int i = 0; i < files.length; i++) {
      System.out.print((i+1) + ") ");

      List data = new ArrayList()
      data.add( files[i] );
      try {
        doTBoxTest(files[i].toString());
        data.add(Integer.valueOf(kb.getClasses().size()));
        data.add(kb.timers.getTimer("test").getTotal() + "");
      } catch(TimeoutException e) {
        System.out.println(" ** Timeout: " + e.getMessage() + " ** ");
      } catch(Exception e) {
        e.printStackTrace(System.err);       
        System.out.println();
      } catch(OutOfMemoryError e) {
        System.out.println(" ** Out of Memory ** ");
      } catch(StackOverflowError e) {
        System.out.println(" ** Stack Overflow ** ");     
      } catch(Error e) {
        e.printStackTrace(System.err);       
      }
      table.add(data);
    }   
   
    System.out.print( table );
  }
View Full Code Here

TOP

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

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.