Package com.tibco.patterns.qbp
Class QBPJaxbUtils
- java.lang.Object
-
- com.tibco.patterns.qbp.QBPJaxbUtils
-
public class QBPJaxbUtils extends java.lang.ObjectProvide static methods for reading and writing Query Builder Platform configuration files.
-
-
Constructor Summary
Constructors Constructor Description QBPJaxbUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.tibco.patterns.qbp.jaxb.AndBuilderConfigreadAndBuilderConfig(java.lang.String config_name, java.io.InputStream config_stream, AQBPLogger logger)Read in an AND compound builder configuration.static com.tibco.patterns.qbp.jaxb.GeneralBuilderConfigreadGeneralBuilderConfig(java.lang.String config_name, java.io.InputStream config_stream, AQBPLogger logger)Read in a general query builder configuration.static com.tibco.patterns.qbp.jaxb.MatchCaseBuilderConfigreadMatchCaseBuilderConfig(java.lang.String config_name, java.io.InputStream config_stream, AQBPLogger logger)Read in a Match Case compound builder configuration.static com.tibco.patterns.qbp.jaxb.RecordMatchingQueryDefreadRecordMatchingQueryDef(java.lang.String config_name, java.io.InputStream config_stream, AQBPLogger logger)Read in a complete record matching query definition.static com.tibco.patterns.qbp.jaxb.RlinkBuilderConfigreadRlinkBuilderConfig(java.lang.String config_name, java.io.InputStream config_stream, AQBPLogger logger)Read in a RLink compound builder configuration.static com.tibco.patterns.qbp.jaxb.RunQueryreadRunQueryConfiguration(java.io.File config_file, AQBPLogger logger)Read in a query run configuration.static voidwriteConfigObject(java.lang.Object config, java.io.File config_file, AQBPLogger logger)Write a Query Builder Platform configuration object to a file in XML format.
-
-
-
Method Detail
-
readRecordMatchingQueryDef
public static com.tibco.patterns.qbp.jaxb.RecordMatchingQueryDef readRecordMatchingQueryDef(java.lang.String config_name, java.io.InputStream config_stream, AQBPLogger logger) throws AQBPLogger.QBPException, AQBPLogger.QBPConfigException, java.lang.IllegalArgumentExceptionRead in a complete record matching query definition. This reads the complete RecordMatchingQueryDef object from an XML file.- Parameters:
config_name- a name used to identify the configuration in error messages.config_stream- stream for reading configuration. This is required.logger- a logger for reporting all errors. This is required.- Returns:
- the parsed configuration file.
- Throws:
AQBPLogger.QBPConfigException- on syntax error in the configuration file.AQBPLogger.QBPException- on JAXB initialization errors, other errors.java.lang.IllegalArgumentException- if logger is null.
-
readGeneralBuilderConfig
public static com.tibco.patterns.qbp.jaxb.GeneralBuilderConfig readGeneralBuilderConfig(java.lang.String config_name, java.io.InputStream config_stream, AQBPLogger logger) throws AQBPLogger.QBPException, AQBPLogger.QBPConfigException, java.lang.IllegalArgumentExceptionRead in a general query builder configuration. This reads the configuration for the GeneralQueryBuilder.- Parameters:
config_name- a name used to identify the configuration in error messages.config_stream- stream for reading configuration. This is required.logger- a logger for reporting all errors. This is required.- Returns:
- the parsed configuration file.
- Throws:
AQBPLogger.QBPConfigException- on syntax error in the configuration file.AQBPLogger.QBPException- on JAXB initialization errors, other errors.java.lang.IllegalArgumentException- if logger is null.
-
readAndBuilderConfig
public static com.tibco.patterns.qbp.jaxb.AndBuilderConfig readAndBuilderConfig(java.lang.String config_name, java.io.InputStream config_stream, AQBPLogger logger) throws AQBPLogger.QBPException, AQBPLogger.QBPConfigException, java.lang.IllegalArgumentExceptionRead in an AND compound builder configuration. This reads the configuration for the AndCompoundQueryBuilder.- Parameters:
config_name- a name used to identify the configuration in error messages.config_stream- stream for reading configuration. This is required.logger- a logger for reporting all errors. This is required.- Returns:
- the parsed configuration.
- Throws:
AQBPLogger.QBPConfigException- on syntax error in the configuration file.AQBPLogger.QBPException- on JAXB initialization errors, other errors.java.lang.IllegalArgumentException- if logger is null.
-
readRlinkBuilderConfig
public static com.tibco.patterns.qbp.jaxb.RlinkBuilderConfig readRlinkBuilderConfig(java.lang.String config_name, java.io.InputStream config_stream, AQBPLogger logger) throws AQBPLogger.QBPException, AQBPLogger.QBPConfigException, java.lang.IllegalArgumentExceptionRead in a RLink compound builder configuration. This reads the configuration for the RlinkCompoundQueryBuilder.- Parameters:
config_name- a name used to identify the configuration in error messages.config_stream- stream for reading configuration. This is required.logger- a logger for reporting all errors. This is required.- Returns:
- the parsed configuration.
- Throws:
AQBPLogger.QBPConfigException- on syntax error in the configuration file.AQBPLogger.QBPException- on JAXB initialization errors, other errors.java.lang.IllegalArgumentException- if logger is null.
-
readMatchCaseBuilderConfig
public static com.tibco.patterns.qbp.jaxb.MatchCaseBuilderConfig readMatchCaseBuilderConfig(java.lang.String config_name, java.io.InputStream config_stream, AQBPLogger logger) throws AQBPLogger.QBPException, AQBPLogger.QBPConfigException, java.lang.IllegalArgumentExceptionRead in a Match Case compound builder configuration. This reads the configuration for the MatchCaseCompoundQueryBuilder.- Parameters:
config_name- a name used to identify the configuration in error messages.config_stream- stream for reading configuration. This is required.logger- a logger for reporting all errors. This is required.- Returns:
- the parsed configuration.
- Throws:
AQBPLogger.QBPConfigException- on syntax error in the configuration file.AQBPLogger.QBPException- on JAXB initialization errors, other errors.java.lang.IllegalArgumentException- if logger is null.
-
writeConfigObject
public static void writeConfigObject(java.lang.Object config, java.io.File config_file, AQBPLogger logger) throws AQBPLogger.QBPException, AQBPLogger.QBPConfigExceptionWrite a Query Builder Platform configuration object to a file in XML format. This writes out one of the JAXB generated class objects as an XML document. The object types currently supported are:- RecordMatchingQueryDef The complete matching query configuration.
- GeneralBuilderConfig The configuration for the GeneralQueryBuilder class.
- AndBuilderConfig The run time configuration for the AND based compound matcher.
- RlinkBuilderConfig The run time configuration for the RLink based compound matcher.
- MatcCaseBuilderConfig The run time configuration for the Match Case based compound matcher.
- Parameters:
config- the configuration to be written out. This is required.config_file- where the output file is to be placed. This is required.logger- logger for reporting all errors.- Throws:
java.lang.IllegalArgumentException- if the logger is null.AQBPLogger.QBPConfigException- if the content of the object is not valid.AQBPLogger.QBPException- if config is not one of the supported configuration object types, and on all other errors.
-
readRunQueryConfiguration
public static com.tibco.patterns.qbp.jaxb.RunQuery readRunQueryConfiguration(java.io.File config_file, AQBPLogger logger) throws AQBPLogger.QBPException, AQBPLogger.QBPConfigException, java.lang.IllegalArgumentExceptionRead in a query run configuration. This reads a complete query run configuration.- Parameters:
config_file- identifies where the file is. This is required.logger- a logger for reporting all errors. This is required.- Returns:
- the parsed configuration file.
- Throws:
AQBPLogger.QBPConfigException- on syntax error in the configuration file.AQBPLogger.QBPException- on JAXB initialization errors, other errors.java.lang.IllegalArgumentException- if logger is null.
-
-