Class XmlElements

java.lang.Object
org.apache.rat.report.xml.XmlElements

public final class XmlElements extends Object
Creates the elements in the XML report.
  • Method Details

    • ratReport

      public static void ratReport(XmlWriter writer) throws RatException
      Create the RAT report element. Includes the timestamp and the version element. Does not close the report.
      Throws:
      RatException - on error
    • version

      public static void version(XmlWriter writer) throws RatException
      Creates the version element with all version attributes populated. Closes the version element.
      Throws:
      RatException - on error
    • license

      public static void license(XmlWriter writer, ILicense license, boolean approved) throws RatException
      Creates a license element. Closes the element before exit.
      Parameters:
      license - the license for the element.
      approved - true if the license is approved.
      Throws:
      RatException - on error.
    • document

      public static void document(XmlWriter writer, Document document) throws RatException
      Creates a document element with attributes. Does NOT close the document element.
      Parameters:
      document - the document to write.
      Throws:
      RatException - on error.
    • statistics

      public static void statistics(XmlWriter writer, ClaimStatistic statistic, ClaimValidator validator) throws RatException
      Creates a statistics element.
      Throws:
      RatException - on error.
    • statistic

      public static void statistic(XmlWriter writer, String name, int count, String description, boolean isOk) throws RatException
      Creates a statistic element. Closes the element before returning.
      Parameters:
      name - the name of the statistics element.
      count - the count for the element.
      description - description of this statistic.
      isOk - if true the count is within limits.
      Throws:
      RatException - on error.
    • licenseCategory

      public static void licenseCategory(XmlWriter writer, String name, int count) throws RatException
      Creates a statistic element. Closes the element before returning.
      Parameters:
      name - the name of the statistics element.
      count - the count for the element.
      Throws:
      RatException - on error.
    • licenseName

      public static void licenseName(XmlWriter writer, String name, int count) throws RatException
      Creates a statistic element. Closes the element before returning.
      Parameters:
      name - the name of the statistics element.
      count - the count for the element.
      Throws:
      RatException - on error.
    • documentType

      public static void documentType(XmlWriter writer, String name, int count) throws RatException
      Creates a document type element. Closes the element before returning.
      Parameters:
      name - the name of the document type element.
      count - the count for the element.
      Throws:
      RatException - on error.