Qore DataProvider Module Reference 2.7.5
Loading...
Searching...
No Matches
DataProvider::AbstractDataProviderFactory Class Referenceabstract

Data provider factory class. More...

#include <AbstractDataProviderFactory.qc.dox.h>

Inheritance diagram for DataProvider::AbstractDataProviderFactory:
[legend]

Public Member Methods

AbstractDataProvider create (*hash< auto > options)
 Creates an object from the given constructor options.
 
AbstractDataProvider createWithTemplate (*hash< auto > template_options, *hash< auto > options)
 Creates an object from the given constructor options.
 
Class getClass ()
 Returns the class for the data provider object.
 
list< hash< auto > > getExampleProviderRecordOutput (data example, *hash< auto > constructor_options)
 Returns information about a data provider constructor given the example data as an argument. More...
 
list< hash< auto > > getExampleProviderRecordOutput (InputStream example, *hash< auto > constructor_options)
 Returns information about a data provider constructor given the example data as an argument. More...
 
hash< DataProviderFactoryInfogetInfo ()
 Returns static factory information. More...
 
hash< auto > getInfoAsData (*bool with_type_info)
 Returns static provider information as data; no objects are returned. More...
 
string getName ()
 Returns the name of the data provider factory.
 
AbstractDataProvider getProviderFromExample (data example, *hash< auto > constructor_options)
 Returns a data provider given the example data and constructor options as arguments. More...
 
AbstractDataProvider getProviderFromExample (InputStream example, *hash< auto > constructor_options)
 Returns a data provider given the example data and constructor options as arguments. More...
 
hash< DataProviderInfogetProviderInfo ()
 Returns static provider information. More...
 

Private Member Methods

 error (string err, string fmt)
 thrown an exception
 
abstract Class getClassImpl ()
 Returns the class for the data provider object.
 
list< hash< auto > > getExampleProviderRecordOutputImpl (InputStream example, *hash< auto > constructor_options)
 Returns information about a data provider constructor given the example data as an argument. More...
 
abstract hash< DataProviderFactoryInfogetInfoImpl ()
 Returns static factory information without provider_info. More...
 
string getNameImpl ()
 Returns the name of the data provider factory.
 
AbstractDataProvider getProviderFromExampleImpl (InputStream example, *hash< auto > constructor_options)
 Returns a data provider given the example data and constructor options as arguments. More...
 
abstract hash< DataProviderInfogetProviderInfoImpl ()
 Returns static provider information. More...
 

Detailed Description

Data provider factory class.

Member Function Documentation

◆ getExampleProviderRecordOutput() [1/2]

list< hash< auto > > DataProvider::AbstractDataProviderFactory::getExampleProviderRecordOutput ( data  example,
*hash< auto >  constructor_options 
)

Returns information about a data provider constructor given the example data as an argument.

Parameters
exampleexample data to process
constructor_optionsconstructor options for the data provider
Returns
example record data parsed from the given options
Exceptions
DATA-PROVIDER-ERRORinvalid construtor options, API not supported
Since
DataProvider 2.1

◆ getExampleProviderRecordOutput() [2/2]

list< hash< auto > > DataProvider::AbstractDataProviderFactory::getExampleProviderRecordOutput ( InputStream  example,
*hash< auto >  constructor_options 
)

Returns information about a data provider constructor given the example data as an argument.

Parameters
exampleexample data to process
constructor_optionsconstructor options for the data provider
Returns
example record data parsed from the given options
Exceptions
DATA-PROVIDER-ERRORinvalid construtor options, API not supported
Since
DataProvider 2.1

◆ getExampleProviderRecordOutputImpl()

list< hash< auto > > DataProvider::AbstractDataProviderFactory::getExampleProviderRecordOutputImpl ( InputStream  example,
*hash< auto >  constructor_options 
)
private

Returns information about a data provider constructor given the example data as an argument.

Parameters
exampleexample data to process
constructor_optionsconstructor options for the data provider
Returns
example record data parsed from the given options
Exceptions
DATA-PROVIDER-ERRORinvalid construtor options, API not supported
Note
This base class method throws a DATA-PROVIDER-ERROR exception by default; override in subclasses to implement this method properly
Since
DataProvider 2.1

◆ getInfo()

hash< DataProviderFactoryInfo > DataProvider::AbstractDataProviderFactory::getInfo ( )

Returns static factory information.

Note
The name and children attributes in provider_info are not returned as they are dynamic attributes

◆ getInfoAsData()

hash< auto > DataProvider::AbstractDataProviderFactory::getInfoAsData ( *bool  with_type_info)

Returns static provider information as data; no objects are returned.

Parameters
with_type_infothe raw info with objects describing the types
Note
The name and children attributes in provider_info are not returned as they are dynamic attributes

◆ getInfoImpl()

abstract hash< DataProviderFactoryInfo > DataProvider::AbstractDataProviderFactory::getInfoImpl ( )
privatepure virtual

Returns static factory information without provider_info.

Returns
static factory information without provider_info which is provided by getProviderInfo()

Implemented in DataProvider::NullDataProviderFactory.

◆ getProviderFromExample() [1/2]

AbstractDataProvider DataProvider::AbstractDataProviderFactory::getProviderFromExample ( data  example,
*hash< auto >  constructor_options 
)

Returns a data provider given the example data and constructor options as arguments.

Parameters
exampleexample data to process
constructor_optionsconstructor options for the data provider
Returns
a data provider created from the given options
Exceptions
DATA-PROVIDER-ERRORinvalid construtor options, API not supported
Note
if constructor options provide actual input data, then this overrides the example data, in this way this API can be used for the example and also with real data
Since
DataProvider 2.1

◆ getProviderFromExample() [2/2]

AbstractDataProvider DataProvider::AbstractDataProviderFactory::getProviderFromExample ( InputStream  example,
*hash< auto >  constructor_options 
)

Returns a data provider given the example data and constructor options as arguments.

Parameters
exampleexample data to process
constructor_optionsconstructor options for the data provider
Returns
a data provider created from the given options
Exceptions
DATA-PROVIDER-ERRORinvalid construtor options, API not supported
Note
if constructor options provide actual input data, then this overrides the example data, in this way this API can be used for the example and also with real data
Since
DataProvider 2.1

◆ getProviderFromExampleImpl()

AbstractDataProvider DataProvider::AbstractDataProviderFactory::getProviderFromExampleImpl ( InputStream  example,
*hash< auto >  constructor_options 
)
private

Returns a data provider given the example data and constructor options as arguments.

Parameters
exampleexample data to process
constructor_optionsconstructor options for the data provider
Returns
a data provider created from the given options
Exceptions
DATA-PROVIDER-ERRORinvalid construtor options, API not supported
Note
  • If constructor options provide actual input data, then this overrides the example data, in this way this API can be used for the example and also with real data
  • This base class method throws a DATA-PROVIDER-ERROR exception by default; override in subclasses to implement this method properly
Since
DataProvider 2.1

◆ getProviderInfo()

hash< DataProviderInfo > DataProvider::AbstractDataProviderFactory::getProviderInfo ( )

Returns static provider information.

Note
The name and children attributes are not returned as they are dynamic attributes

◆ getProviderInfoImpl()

abstract hash< DataProviderInfo > DataProvider::AbstractDataProviderFactory::getProviderInfoImpl ( )
privatepure virtual

Returns static provider information.

Note
The name and children attributes are not returned as they are dynamic attributes

Implemented in DataProvider::NullDataProviderFactory.