Package ca.spatial.reportwriter
Class CopyFileReport
java.lang.Object
ca.spatial.reportwriter.Report
ca.spatial.reportwriter.CopyFileReport
- All Implemented Interfaces:
Selectable<Report>
,Comparable<Report>
This report will copy a file from your file system into the
namespace of the internal Patchworks web server. When you save
the scenario the file will also be saved out in to the scenario
folder.
You can use this report to include data, css, image or other files that you would like to refer to from the HTML sections of other reports.
If you do not want this file to show up in the index listings then
add it to the report writer using the ReportWriter.addHiddenReport(ca.spatial.reportwriter.Report)
method.
The Report Writer already creates a folder named 'html' to store images, javascript sources and css. This is a good location to use to store other miscellaneous files. For example:
r = new CopyFileReport("html/logo.png", "My logo", "C:/logos/mylogo.png"); reportWriter.addHiddenReport(r);This will make the logo file that is stored in your local file system available within the report writer.
-
Nested Class Summary
Nested classes/interfaces inherited from class ca.spatial.reportwriter.Report
Report.GetNodesAt
-
Field Summary
FieldsFields inherited from class ca.spatial.reportwriter.Report
AREA, LINE, PIE, SIDE_BY_SIDE_BARS, STACKED_BARS
-
Constructor Summary
ConstructorsConstructorDescriptionCopyFileReport(String filename, String title, String file)
Create a CopyFileReport object -
Method Summary
Modifier and TypeMethodDescriptionca.spatial.reportwriter.Report.DataCache
doReport(String filename, PrintStream out, Map<String,Object> param, ca.spatial.reportwriter.Report.DataCache cache)
The method used by the report writer to format the requested report.Return the name of the file that is being copied.long
String[]
getTypes()
An accessor function to retrieve the list of report types supported by this report.Methods inherited from class ca.spatial.reportwriter.Report
addDefaultParam, chartImg, compareTo, csvLink, doesAnyTypes, doesCSV, doesGIF, doesHTML, doesPNG, doesType, encodeFileURL, encodeURL, endMainContent, escapeRegexChars, footer, formatColumnHeadings, formatColumnHeadings, getAdditionalFiles, getAttributeStore, getBasepart, getBasepart, getDefaultFilename, getDisplayFormat, getExtension, getExtension, getFilename, getFolderpart, getFolderpart, getLength, getNamepart, getNamepart, getPathToRoot, getReportFor, getTitle, header, htmlText, indexLink, interpolateParams, isDhandler, isIndexed, isSelected, parentIndex, patternToRegex, setAttributeStore, setDefaultParams, setDisplayFormat, setIndexed, setSelected, setTitle, toString, uniqueLabels
-
Field Details
-
TYPES
-
-
Constructor Details
-
CopyFileReport
Create a CopyFileReport object- Parameters:
filename
- The name to be given to the report within the ReportWritertitle
- The title of the reportfile
- The filename of the existing file to be copied
-
-
Method Details
-
getCopyFile
Return the name of the file that is being copied. -
getLength
-
doReport
public ca.spatial.reportwriter.Report.DataCache doReport(String filename, PrintStream out, Map<String,Object> param, ca.spatial.reportwriter.Report.DataCache cache)Description copied from class:Report
The method used by the report writer to format the requested report. This method is implemented in every custom report. Application programs generally do not need to call this method, but instead use the report writer methods to obtain reports. -
getTypes
Description copied from class:Report
An accessor function to retrieve the list of report types supported by this report. See the documentation for the TYPES variable for the list of sub-types.
-