Gephi Toolkit Javadoc

org.gephi.io.importer.api
Class Report

java.lang.Object
  extended by org.gephi.io.importer.api.Report

public final class Report
extends java.lang.Object

Report is a log and issue container. Filled with information, details, minor or major issues, it is stored in an issue list and can be retrieved to present issues to end-users. Behavior is the same as a simple logging library.

Author:
Mathieu Bastian

Constructor Summary
Report()
           
 
Method Summary
 void append(Report report)
           
 Issue.Level getExceptionLevel()
          Get the current exception level for the report.
 java.lang.String getHtml()
          Returns the report logs and issues, presented as HTML code.
 java.util.List<Issue> getIssues()
          Returns all issues written in the report.
 java.lang.String getText()
          Returns the report logs and issues, presented as basic multi-line text.
 void log(java.lang.String message)
          Log an information message in the report.
 void logIssue(Issue issue)
          Log an issue in the report.
 void pruneReport(int limit)
           
 void setExceptionLevel(Issue.Level exceptionLevel)
          Set the level of exception for the report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Report

public Report()
Method Detail

log

public void log(java.lang.String message)
Log an information message in the report.

Parameters:
message - the message to write in the report
Throws:
java.lang.NullPointerException - if message is null

append

public void append(Report report)

logIssue

public void logIssue(Issue issue)
Log an issue in the report.

Parameters:
issue - the issue to write in the report
Throws:
java.lang.NullPointerException - if issue is null

getIssues

public java.util.List<Issue> getIssues()
Returns all issues written in the report.

Returns:
a collection of all issues written in the report

getHtml

public java.lang.String getHtml()
Returns the report logs and issues, presented as HTML code.

Returns:
a string of HTML code where all messages and issues are written

getText

public java.lang.String getText()
Returns the report logs and issues, presented as basic multi-line text.

Returns:
a string of all messages and issues written in the report, one per line

getExceptionLevel

public Issue.Level getExceptionLevel()
Get the current exception level for the report. Default is Level.CRITICAL.

Returns:
the current exception level

setExceptionLevel

public void setExceptionLevel(Issue.Level exceptionLevel)
Set the level of exception for the report. If a reported issue has his level greater or equal as exceptionLevel, an exception is thrown. Default is Level.CRITICAL

Parameters:
exceptionLevel - the exception level where exceptions are to be thrown

pruneReport

public void pruneReport(int limit)

Gephi Toolkit Javadoc