public class FourRpProcessor extends PXMLProducer implements DataConsumer, java.io.Serializable
JAXB
).
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
legalCopyright |
Modifier | Constructor and Description |
---|---|
protected |
FourRpProcessor()
Creates a FourRpProcessor object.
|
|
FourRpProcessor(java.lang.String reportFileName,
PXMLConsumer consumer)
Creates a FourRpProcessor object for the specified template file
that outputs to the given handler object.
|
Modifier and Type | Method and Description |
---|---|
GreContentHandler |
createContentHandler()
/**
Creates a content handler into which the input document can be
streamed thru the rendering pipe.
|
java.lang.Integer |
getDebugLevel()
Returns the debug level.
|
java.lang.String |
getFGLLocalizationCharset() |
java.lang.String |
getFGLLocalizationNumberFormat() |
java.lang.String[] |
getFGLLocalizationResourcePath() |
java.io.File |
getInputLogFile() |
void |
logInputToFile(java.io.File logFile,
boolean logOnly)
Specifies to log the input to an XML file.
|
boolean |
logOnly() |
void |
runFromJAXBObject(java.lang.Object data)
Uses
JAXB to stream the object
data thru the rendering pipe. |
void |
runFromXML(java.lang.String fileName)
Streams the specified file thru the rendering pipe.
|
void |
setDebugLevel(java.lang.Integer level)
Sets the debug level as determined by the
level . |
void |
setEnvironment(org.xml.sax.Attributes values)
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().
|
void |
setFGLLocalizationCharset(java.lang.String fglLocalizationCharset)
Specified the
charset in which the
".42s" localization files are encoded. |
void |
setFGLLocalizationNumberFormat(java.lang.String fglLocalizationNumberFormat)
Specifies the format pattern to be used for number formatting.
|
void |
setFGLLocalizationResourcePath(java.lang.String[] fglLocalizationResourcePath)
Specifies the search path for localization (".42s") files.
|
void |
setRecordingFileName(java.lang.String recordingFileName)
Specifies input recording for the purpose of play back or debugging.
|
void |
setRenderingHints(org.xml.sax.Attributes values)
Specifies rendering hints to be used during the rendering process
Can be used to specify the value of rendering hints.
|
void |
setReportFileName(java.lang.String reportFileName)
Specifies the template file that is used for the transformation of
the input.
|
setConsumer
public static final java.lang.String legalCopyright
protected FourRpProcessor()
public FourRpProcessor(java.lang.String reportFileName, PXMLConsumer consumer)
reportFileName
- A '.4rp' fileconsumer
- A FormatHandlersetReportFileName(java.lang.String)
public java.lang.Integer getDebugLevel()
getDebugLevel
in interface DataConsumer
setDebugLevel(java.lang.Integer)
public void setDebugLevel(java.lang.Integer level)
level
.
Only Messages with a message level lower or equal to level
will be displayed and logged.
There following six message levels are defined:
server
.setDebugLevel
in interface DataConsumer
level
- Messages with a level higher than this value will not be displayed or logged.java.lang.IllegalArgumentException
- if the level
is not in the range 0..9public void setRecordingFileName(java.lang.String recordingFileName)
recordingFileName
.
In the case of a remote
connection the file is
created on the remote server.recordingFileName
- Name of the XML file in which the input is to be written.public void setReportFileName(java.lang.String reportFileName)
reportFileName
- A '.4rp' filepublic void setEnvironment(org.xml.sax.Attributes values)
values
- An attribute set defining the environmentpublic void setRenderingHints(org.xml.sax.Attributes values)
values
- An attribute set defining the valuespublic GreContentHandler createContentHandler() throws org.xml.sax.SAXException
createContentHandler
in interface DataConsumer
org.xml.sax.SAXException
- if the handler can't be obtained due to an errorpublic void runFromJAXBObject(java.lang.Object data) throws javax.xml.bind.JAXBException, org.xml.sax.SAXException
JAXB
to stream the object
data
thru the rendering pipe.runFromJAXBObject
in interface DataConsumer
data
- A Java object annotated for JAXP processingjavax.xml.bind.JAXBException
- if the serialization of the object failsorg.xml.sax.SAXException
- if processing the object's data failspublic void runFromXML(java.lang.String fileName) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException
runFromXML
in interface DataConsumer
fileName
- The XML input documentjava.io.IOException
- if reading the data failsorg.xml.sax.SAXException
- if processing data failsjavax.xml.parsers.ParserConfigurationException
- if parsing the data failspublic java.lang.String getFGLLocalizationCharset()
public void setFGLLocalizationCharset(java.lang.String fglLocalizationCharset)
charset
in which the
".42s" localization files are encoded. By default the system
encoding is assumed.fglLocalizationCharset
- An encoding name supported by the JVM (see Charset.availableCharsets()
)public java.lang.String[] getFGLLocalizationResourcePath()
public void setFGLLocalizationResourcePath(java.lang.String[] fglLocalizationResourcePath)
fglLocalizationResourcePath
- Array of directories to searchpublic java.lang.String getFGLLocalizationNumberFormat()
public void setFGLLocalizationNumberFormat(java.lang.String fglLocalizationNumberFormat)
fglLocalizationNumberFormat
- A FGL compatible format patternpublic void logInputToFile(java.io.File logFile, boolean logOnly)
logInputToFile
in interface DataConsumer
logFile
- The location of the output filelogOnly
- Specifies to suppress any further processing of the inputpublic java.io.File getInputLogFile()
getInputLogFile
in interface DataConsumer
public boolean logOnly()
logOnly
in interface DataConsumer