public class ReportBuilder
extends java.lang.Object
| Constructor and Description |
|---|
ReportBuilder(java.io.File pDestination)
Create a new
ReportBuilder. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the builder's underlying destination.
|
void |
copy(java.io.File pFile)
Copy the contents of a file to this builder's destination.
|
void |
copy(java.lang.String pResource)
Copy the contents of a classpath resource to this builder's destination.
|
java.io.File |
getDestination()
Get the file this builder is creating.
|
void |
transform(java.io.File pXmlFile,
java.io.File pXslFile,
java.util.Map<java.lang.String,java.lang.Object> pParameters)
Transform an XML file by applying the style sheet from an XSL file and write the result to
this builder's destination.
|
void |
transform(java.io.File pXmlFile,
java.lang.String pXslResource,
java.util.Map<java.lang.String,java.lang.Object> pParameters)
Transform an XML file by applying the style sheet from an XSL resource and write the result
to this builder's destination.
|
void |
transform(java.lang.String pXml,
java.lang.String pXslResource,
java.util.Map<java.lang.String,java.lang.Object> pParameters)
Transform an XML string by applying the style sheet from an XSL resource and write the result
to this builder's destination.
|
void |
write(java.lang.String pString)
Write a string to this builder's destination.
|
void |
write(java.lang.String pString,
java.nio.charset.Charset pCharset)
Write a string to this builder's destination.
|
public ReportBuilder(java.io.File pDestination)
throws java.io.FileNotFoundException
ReportBuilder.pDestination - The file to write the report to.java.io.FileNotFoundException - if pDestination cannot be created or opened.java.lang.NullPointerException - if pDestination is null.public java.io.File getDestination()
public void close()
public void write(java.lang.String pString)
pString - The string to write.public void write(java.lang.String pString,
java.nio.charset.Charset pCharset)
pString - The string to write.pCharset - The charset to encode the string with.public void copy(java.io.File pFile)
pFile - The file to copy.public void copy(java.lang.String pResource)
pResource - The name of the resource to copy.public void transform(java.io.File pXmlFile,
java.io.File pXslFile,
java.util.Map<java.lang.String,java.lang.Object> pParameters)
pXmlFile - The XML file to transform.pXslFile - The XSL file with the style sheet to apply.pParameters - Any XSL parameters to pass to the transformation.public void transform(java.io.File pXmlFile,
java.lang.String pXslResource,
java.util.Map<java.lang.String,java.lang.Object> pParameters)
pXmlFile - The XML file to transform.pXslResource - The XSL resource with the style sheet to apply.pParameters - Any XSL parameters to pass to the transformation.public void transform(java.lang.String pXml,
java.lang.String pXslResource,
java.util.Map<java.lang.String,java.lang.Object> pParameters)
pXml - The XML string to transform.pXslResource - The XSL resource with the style sheet to apply.pParameters - Any XSL parameters to pass to the transformation.