Class XmlElements
java.lang.Object
org.apache.rat.report.xml.XmlElements
Creates the elements in the XML report.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe attributes of elements in the report.static enumThe elements in the report. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCreates a document element with attributes.static voiddocumentType(XmlWriter writer, String name, int count) Creates a document type element.static voidCreates a license element.static voidlicenseCategory(XmlWriter writer, String name, int count) Creates a statistic element.static voidlicenseName(XmlWriter writer, String name, int count) Creates a statistic element.static voidCreate the RAT report element.static voidCreates a statistic element.static voidstatistics(XmlWriter writer, ClaimStatistic statistic, ClaimValidator validator) Creates a statistics element.static voidCreates the version element with all version attributes populated.
-
Method Details
-
ratReport
Create the RAT report element. Includes the timestamp and the version element. Does not close the report.- Throws:
RatException- on error
-
version
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-trueif the license is approved.- Throws:
RatException- on error.
-
document
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- iftruethe count is within limits.- Throws:
RatException- on error.
-
licenseCategory
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
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
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.
-