Four Js Genero Report Writer
FourJs.Report.Runtime.FourRpProcessor Class Reference

Class for conversion of a XML data stream to a PXML document via a ".4rp" template. The template is expected to match the XML data stream. To ensure that, the template is edited against the XML schema (".xsd") of the data stream using the report designer. The schema of the data stream can be conveniently created by the JAXB schema generator schemagen (see Java Architecture for XML Binding (JAXB)) The data stream can be conveniently created using the JAXB marshaller (see javax.xml.bind.JAXB). More...

Inheritance diagram for FourJs.Report.Runtime.FourRpProcessor:
FourJs.Report.Runtime.PXMLProducer FourJs.Report.Runtime.DataConsumer

Public Member Functions

 FourRpProcessor (String reportFileName, PXMLConsumer consumer)
 Creates a FourRpProcessor object for the specified template file that outputs to the given handler object. If the file name is a relative path then the environment variable (or system property) FGLRESOURCEPATH will be used to search for files (The variable is expected to follow CLASSPATH syntax). More...
 
void runFromXML (String fileName)
 Streams the specified file thru the rendering pipe. More...
 
void runFromSerializable (Object data)
 Streams the data thru the rendering pipe. More...
 
XmlWriter createXmlWriter ()
 Creates an XmlWriter into which the input document can be streamed thru the rendering pipe. The XmlWriter can be used for one stream only.
 
- Public Member Functions inherited from FourJs.Report.Runtime.PXMLProducer
 PXMLProducer (PXMLConsumer consumer)
 Creates a PXMLProducer object that outputs to the given consumer object. More...
 

Static Public Member Functions

static void checkDebugLevel (int?value)
 

Static Public Attributes

static String legalCopyright = Version.CLASS_COPYRIGHT
 
- Static Public Attributes inherited from FourJs.Report.Runtime.PXMLProducer
static String legalCopyright = Version.CLASS_COPYRIGHT
 

Properties

int debugLevel [get, set]
 Sets the debug level as determined by the level. Only Messages with a message level lower or equal to level will be displayed and logged. There following six message levels are defined: More...
 
String recordingFileName [get, set]
 Specifies input recording for the purpose of play back or debugging. In parallel to the regular processing the input is written in XML format to the file specified by recordingFileName. In the case of a RemoteConnection remote connection the file is created on the remote server. More...
 
String fglLocalizationCharset [get, set]
 Specified the charset in which the ".42s" localization files are encoded. By default the system encoding is assumed. More...
 
String[] fglLocalizationResourcePath [get, set]
 Specifies the search path for localization (".42s") files. More...
 
String fglLocalizationNumberFormat [get, set]
 Specifies the format pattern to be used for number formatting. The format is compatible with the format of the 4GL DBFORMAT environment variable. More...
 
String reportFileName [get, set]
 Specifies the template file that is used for the transformation of the input. If the file name is a relative path then the environment variable (or system property) FGLRESOURCEPATH will be used to search for files (The variable is expected to follow CLASSPATH syntax). More...
 
Dictionary< string, string > environment [get, set]
 Specifies variable values in the private environment of the report Can be used to specify the value of environment variables like GREOUTPUTDIR or user defined variables for the purpose of using the values in calls to the RTL function Runtime.getEnvironmentVariable(). More...
 
Dictionary< string, string > renderingHints [get, set]
 Specifies rendering hints to be used during the rendering process Can be used to specify the value of rendering hints. More...
 
- Properties inherited from FourJs.Report.Runtime.PXMLProducer
PXMLConsumer consumer [get]
 Sets the output consumer. More...
 
- Properties inherited from FourJs.Report.Runtime.DataConsumer
int debugLevel [get, set]
 Sets the debug level as determined by the More...
 

Detailed Description

Class for conversion of a XML data stream to a PXML document via a ".4rp" template. The template is expected to match the XML data stream. To ensure that, the template is edited against the XML schema (".xsd") of the data stream using the report designer. The schema of the data stream can be conveniently created by the JAXB schema generator schemagen (see Java Architecture for XML Binding (JAXB)) The data stream can be conveniently created using the JAXB marshaller (see javax.xml.bind.JAXB).

Processing large documents

The delay between input and output varies but is seldom more than a few elements of the input stream and the memory consumption is nearly constant. Exceptions are lookahead variables in RTL expressions. Any reference to a variable that is defined in a location where it requires lookahead over one or more repeating elements (maxOcurrs>0) delays output until the variable is read in the input. As an example consider a list of invoice items preceded by the string "The total of item is x". Assuming that the value of "x" is shipped after the list of items, the output will be delayed until that point. The report designer displays a warning in the message window in such cases.

Constructor & Destructor Documentation

FourJs.Report.Runtime.FourRpProcessor.FourRpProcessor ( String  reportFileName,
PXMLConsumer  consumer 
)

Creates a FourRpProcessor object for the specified template file that outputs to the given handler object. If the file name is a relative path then the environment variable (or system property) FGLRESOURCEPATH will be used to search for files (The variable is expected to follow CLASSPATH syntax).

Parameters
reportFileNameA '.4rp' file
consumerA FormatHandler

see cref="reportFileName"/>

Member Function Documentation

void FourJs.Report.Runtime.FourRpProcessor.runFromSerializable ( Object  data)

Streams the data thru the rendering pipe.

Implements FourJs.Report.Runtime.DataConsumer.

void FourJs.Report.Runtime.FourRpProcessor.runFromXML ( String  fileName)

Streams the specified file thru the rendering pipe.

Parameters
fileNameThe XML input document

Implements FourJs.Report.Runtime.DataConsumer.

Property Documentation

int FourJs.Report.Runtime.FourRpProcessor.debugLevel
getset

Sets the debug level as determined by the level. Only Messages with a message level lower or equal to level will be displayed and logged. There following six message levels are defined:

  • 1: Fatal
  • 2: Error
  • 3: Warning
  • 4: Info
  • 5: Debug
  • 6: Trace

A level of 0 suppresses all messages. The default value is 3. The value applies to the local GRE only and not to a remote RemoteConnection server.

Exceptions
ArgumentOutOfRangeExceptionif the level<c> is not in the range 0..9
Dictionary<string, string> FourJs.Report.Runtime.FourRpProcessor.environment
getset

Specifies variable values in the private environment of the report Can be used to specify the value of environment variables like GREOUTPUTDIR or user defined variables for the purpose of using the values in calls to the RTL function Runtime.getEnvironmentVariable().

String FourJs.Report.Runtime.FourRpProcessor.fglLocalizationCharset
getset

Specified the charset in which the ".42s" localization files are encoded. By default the system encoding is assumed.

String FourJs.Report.Runtime.FourRpProcessor.fglLocalizationNumberFormat
getset

Specifies the format pattern to be used for number formatting. The format is compatible with the format of the 4GL DBFORMAT environment variable.

String [] FourJs.Report.Runtime.FourRpProcessor.fglLocalizationResourcePath
getset

Specifies the search path for localization (".42s") files.

String FourJs.Report.Runtime.FourRpProcessor.recordingFileName
getset

Specifies input recording for the purpose of play back or debugging. In parallel to the regular processing the input is written in XML format to the file specified by recordingFileName. In the case of a RemoteConnection remote connection the file is created on the remote server.

Dictionary<string, string> FourJs.Report.Runtime.FourRpProcessor.renderingHints
getset

Specifies rendering hints to be used during the rendering process Can be used to specify the value of rendering hints.

String FourJs.Report.Runtime.FourRpProcessor.reportFileName
getset

Specifies the template file that is used for the transformation of the input. If the file name is a relative path then the environment variable (or system property) FGLRESOURCEPATH will be used to search for files (The variable is expected to follow CLASSPATH syntax).

FourRpProcessor(String,PXMLConsumer)