dochelper.FileRecord Class Reference

The class FileRecord implements Record to represent a single file in a set of files to be processed by DocHelper. More...

Inheritance diagram for dochelper.FileRecord:

Inheritance graph
[legend]
Collaboration diagram for dochelper.FileRecord:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FileRecord (File file, String name)
 Creates a New Instance of a File Record.
String getValue ()
 Get the value of a File Record.
ResultNode execute (ArrayList< DocPattern > patterns)
 Renders a record using the specified Pattern list.
File getFile ()
 Return the file reference.
String toString ()

Protected Attributes

HashMap< String, String > params
 The parameters associated to this fileRecord.

Private Attributes

File file
 The file this File Record represents.
String name
 Reference Name for this instance.


Detailed Description

The class FileRecord implements Record to represent a single file in a set of files to be processed by DocHelper.

It is responsible for returning file contents when needed and converting the file into output document content through the execution of the render function.

This class implements the DocumentSection interface in order to provide encapsulation of the output generated.

See also:
Record, DocumentSection
Author:
Guillermo Christen

Definition at line 31 of file FileRecord.java.


Constructor & Destructor Documentation

dochelper.FileRecord.FileRecord ( File  file,
String  name 
)

Creates a New Instance of a File Record.

Set paramters relevant for this Record

Parameters:
file 
name 

Definition at line 49 of file FileRecord.java.

Here is the call graph for this function:


Member Function Documentation

String dochelper.FileRecord.getValue (  ) 

Get the value of a File Record.

For this implementation this is the actual contents of the file.

TODO: Change so that once the file is read it is not reloaded unless content has changed.

Returns:
String contents of the file.

Implements dochelper.Record.

Definition at line 74 of file FileRecord.java.

Here is the call graph for this function:

Here is the caller graph for this function:

ResultNode dochelper.FileRecord.execute ( ArrayList< DocPattern patterns  ) 

Renders a record using the specified Pattern list.

This method will iterate through all patterns passed in if any, and execute the pattern passing the contents of the file. This means the pattern will search for the RegExp within the file contents.

Returns:
ResultNode containing the result of pattern execution.

Implements dochelper.Record.

Definition at line 100 of file FileRecord.java.

Here is the call graph for this function:

File dochelper.FileRecord.getFile (  ) 

Return the file reference.

Returns:

Definition at line 121 of file FileRecord.java.

Here is the caller graph for this function:

String dochelper.FileRecord.toString (  ) 

Definition at line 125 of file FileRecord.java.


Member Data Documentation

File dochelper.FileRecord.file [private]

The file this File Record represents.

Definition at line 34 of file FileRecord.java.

HashMap<String, String> dochelper.FileRecord.params [protected]

The parameters associated to this fileRecord.

Definition at line 37 of file FileRecord.java.

String dochelper.FileRecord.name [private]

Reference Name for this instance.

Used to fetch info when rendering or processing.

Definition at line 40 of file FileRecord.java.


The documentation for this class was generated from the following file:

Generated on Wed Jun 17 14:22:03 2009 for DocHelper by  doxygen 1.5.6