dochelper.FileRecordSet Class Reference

The class FileRecordSet implements the RecordSet interface to create a set of Records to be processed. More...

Inheritance diagram for dochelper.FileRecordSet:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

void setParam (String paramName, Object value) throws IllegalParamterTypeException
 Add an initialization parameter to the Record Set.
void checkParams () throws InvalidValueException, MissingArgumentException, ResourceUnavailableException
 Checks that the parameters are correct for this File Record Set.
void init () throws InitializationException, ResourceUnavailableException
 Initialize the Record Set.
ResultNode execute (ResultNode doc) throws ResourceUnavailableException
 Main method of FileRecordSet.
ArrayList< RecordgetRsfiles ()
 Record Files (rsfiles) Accessors + Modifiers.
void setRsfiles (ArrayList< Record > rsfiles)
ArrayList< DocPatterngetPatterns ()
 Pattern Accessors + Modifiers.
void setPatterns (ArrayList< DocPattern > patterns)
String getName ()
 Name Accessors + Modifiers.
void setName (String name)
 Set the name of this Record Set.
void addPattern (DocPattern pattern)
 Add a single pattern to be applied to this record set.
void clearPatterns ()
 Empty pattern list.
String toString ()

Protected Member Functions

void _listDirectory (ArrayList stack, ArrayList files, String directory, String glob, boolean recursive) throws IOException

Protected Attributes

HashMap< String, Object > params = new HashMap<String, Object>()
 Paramters for this configurable.
ArrayList< Recordrsfiles
 The files that are represented by this Path and Filter.

Static Protected Attributes

static final String PATH = "path"
 Param keys, path, glob and recursive.
static final String RECUR = "recursive"
 Param key: recursive.
static final String GLOB = "glob"
 Param key: glob.

Private Attributes

String name
 Reference Name for this instance.
ArrayList< DocPatternpatterns


Detailed Description

The class FileRecordSet implements the RecordSet interface to create a set of Records to be processed.

This class is used to drive the DocHelper process by invoking the render function on each Record within the RecordSet passing in the DocPattern defined for this records set.

See also:
Record, DocumentSection
Author:
Guillermo Christen

Definition at line 35 of file FileRecordSet.java.


Member Function Documentation

void dochelper.FileRecordSet.setParam ( String  paramName,
Object  value 
) throws IllegalParamterTypeException

Add an initialization parameter to the Record Set.

These parameters are used during the call to init to Establish - Initialize the RecordSet. Eg. These paramters set the path, glob, recursive. It is the responsibility of this method to check correct types for params used. For the FileRecordSet only string parameters are used

Parameters:
paramName String Name of the paramter to be stored
value String value of the named param
Exceptions:
IllegalParamterTypeException 

Implements dochelper.Configurable.

Definition at line 83 of file FileRecordSet.java.

void dochelper.FileRecordSet.checkParams (  )  throws InvalidValueException, MissingArgumentException, ResourceUnavailableException

Checks that the parameters are correct for this File Record Set.

Validate required parameters and semantic and format rules.

This method will not return a boolean indicating success, rather, it will fire an Exception indicating error type

Exceptions:
InvalidValueException 
MissingArgumentException 
ResourceUnavailableException 

Implements dochelper.Configurable.

Definition at line 102 of file FileRecordSet.java.

void dochelper.FileRecordSet.init (  )  throws InitializationException, ResourceUnavailableException

Initialize the Record Set.

This method builds the list of files represented by the parameter set. Given the path, glob and recursive params a list is built recursivley.

Exceptions:
ResourceUnavailableException 

Implements dochelper.Configurable.

Definition at line 126 of file FileRecordSet.java.

Here is the call graph for this function:

ResultNode dochelper.FileRecordSet.execute ( ResultNode  doc  )  throws ResourceUnavailableException

Main method of FileRecordSet.

This appends to the document tree the output generated by interpreting this FileRecordSet.

The results are obtained by matching each pattern (n number of times ) within the value returned by Record getValue(). This call returns the contects of the file itself.

Parameters:
doc The document ResultNode onto which the results of running this record set should be added to.
Returns:
The ResultNode node with the results of the matches and rendering appended to it.
Exceptions:
ResourceUnavailableException 
Exception 

Implements dochelper.RecordSet.

Definition at line 168 of file FileRecordSet.java.

Here is the call graph for this function:

void dochelper.FileRecordSet._listDirectory ( ArrayList  stack,
ArrayList  files,
String  directory,
String  glob,
boolean  recursive 
) throws IOException [protected]

Parameters:
stack 
files 
directory 
glob 
recursive 
Exceptions:
java.io.IOException 

Reimplemented in dochelper.xins.XINSFunctionRecordSet.

Definition at line 195 of file FileRecordSet.java.

Here is the call graph for this function:

Here is the caller graph for this function:

ArrayList<Record> dochelper.FileRecordSet.getRsfiles (  ) 

Record Files (rsfiles) Accessors + Modifiers.

Returns:

Definition at line 239 of file FileRecordSet.java.

void dochelper.FileRecordSet.setRsfiles ( ArrayList< Record rsfiles  ) 

Parameters:
rsfiles 

Definition at line 247 of file FileRecordSet.java.

Here is the caller graph for this function:

ArrayList<DocPattern> dochelper.FileRecordSet.getPatterns (  ) 

Pattern Accessors + Modifiers.

Returns:

Definition at line 256 of file FileRecordSet.java.

void dochelper.FileRecordSet.setPatterns ( ArrayList< DocPattern patterns  ) 

Parameters:
patterns 

Definition at line 264 of file FileRecordSet.java.

String dochelper.FileRecordSet.getName (  ) 

Name Accessors + Modifiers.

Returns:

Definition at line 273 of file FileRecordSet.java.

Here is the caller graph for this function:

void dochelper.FileRecordSet.setName ( String  name  ) 

Set the name of this Record Set.

The name of the Record Set is used in conjunction with items that use the name to fetch the appropriate part of the result tree. This includes renderers.

Parameters:
name 

Implements dochelper.RecordSet.

Definition at line 277 of file FileRecordSet.java.

void dochelper.FileRecordSet.addPattern ( DocPattern  pattern  ) 

Add a single pattern to be applied to this record set.

Parameters:
pattern DocPettern to add to this Record Set.

Implements dochelper.RecordSet.

Definition at line 287 of file FileRecordSet.java.

void dochelper.FileRecordSet.clearPatterns (  ) 

Empty pattern list.

Implements dochelper.RecordSet.

Definition at line 299 of file FileRecordSet.java.

String dochelper.FileRecordSet.toString (  ) 

Definition at line 303 of file FileRecordSet.java.

Here is the call graph for this function:


Member Data Documentation

final String dochelper.FileRecordSet.PATH = "path" [static, protected]

Param keys, path, glob and recursive.

Definition at line 40 of file FileRecordSet.java.

final String dochelper.FileRecordSet.RECUR = "recursive" [static, protected]

Param key: recursive.

Definition at line 45 of file FileRecordSet.java.

final String dochelper.FileRecordSet.GLOB = "glob" [static, protected]

Param key: glob.

Definition at line 50 of file FileRecordSet.java.

String dochelper.FileRecordSet.name [private]

Reference Name for this instance.

Used to fetch info when rendering or processing.

Definition at line 55 of file FileRecordSet.java.

HashMap<String, Object> dochelper.FileRecordSet.params = new HashMap<String, Object>() [protected]

Paramters for this configurable.

Definition at line 60 of file FileRecordSet.java.

ArrayList<Record> dochelper.FileRecordSet.rsfiles [protected]

The files that are represented by this Path and Filter.

This is equivalent to the records in this record set

Definition at line 65 of file FileRecordSet.java.

Definition at line 68 of file FileRecordSet.java.


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

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