Qorus Integration Engine® Enterprise Edition 6.0.16_prod
Loading...
Searching...
No Matches
OMQ::MapperType Class Reference

system mapper class for prividing Mapper::Mapper objects at runtime More...

Inheritance diagram for OMQ::MapperType:
[legend]
Collaboration diagram for OMQ::MapperType:
[legend]

Public Member Methods

string getName ()
 returns "Mapper", the name of the primary mapper class (must be unique in the mapper type list)
 
bool requiresInput ()
 mapper definition must include the input record description
 
bool requiresOutput ()
 mapper definition must include the output record description
 
*hash< auto > getRuntimeMapperOptions ()
 returns a hash of valid runtime mapper options; the keys are the option names and the values are string descriptions for the options
 
hash< auto > getMapperOptions ()
 returns a hash of valid mapper options; the keys are the option names and the values are string descriptions for the options
 
hash< string, hash< MapperOptionInfo > > getMapperUserOptions ()
 returns user options
 
*list< string > getRequiredRecordOptions ()
 returns a list of mapper options that must be given to create the input or output records for the mapper for mappers that can create either input records (ie requiresInput() is False) and/or output records (ie requiresOutput() is False); these options must also be present in the getMapperOptions() output
 
Mapper::Mapper get (hash< auto > mapv, *hash< auto > opts)
 returns a Mapper::Mapper object
 
- Public Member Methods inherited from OMQ::AbstractMapperType
abstract string getName ()
 returns the name of the primary mapper class (must be unique in the mapper type list)
 
abstract hash< auto > getMapperOptions ()
 returns a hash of valid mapper options; the keys are the option names and the values are string descriptions for the options
 
abstract *list< string > getRequiredRecordOptions ()
 returns a list of mapper options that must be given to create the input or output records for the mapper for mappers that can create either input records (ie requiresInput() is False) and/or output records (ie requiresOutput() is False); these options must also be present in the getMapperOptions() output
 
abstract Mapper::Mapper get (hash< auto > mapv, *hash< auto > opts)
 must return the Mapper object
 
abstract bool requiresInput ()
 mapper definition must include the input record description; if this method returns True, then the getInput() method must also be implemented for the subclass
 
abstract bool requiresOutput ()
 mapper definition must include the output record description; if this method returns True, then the getOutput() method must also be implemented for the subclass
 
*hash< auto > getRuntimeMapperOptions ()
 returns a hash of valid runtime mapper options; the keys are the option names and the values are string descriptions for the options
 
hash< string, hash< MapperOptionInfo > > getMapperUserOptions ()
 returns user options; must be overridden in child classe to return a valid response
 
Qore::AbstractIterator getIterator (Qore::AbstractIterator input, hash< auto > mapv, *hash< auto > opts)
 must return a iterator object given the input iterator that maps the input data to output in the iterator using the current Mapper
 
*list< string > getRequiredOptions ()
 returns a list of mapper options that must be given to create the mapper (these options must also be present in the getMapperOptions() output); by default this method returns getRequiredRecordOptions() + "input" (if requiresInput() returns False) + "output" (if requiresOutput() returns False)
 
hash< auto > getConfigInfo ()
 returns a hash of configuration info for the mapper type
 
hash< auto > getInput (string mname, hash< auto > opth)
 called for mapper providers that automatically define the input record
 
hash< auto > getOutput (string mname, hash< auto > opth)
 called for mapper providers that automatically define the output record
 
bool isValid ()
 whether the mapper is valid, i.e. eligible for parsing and other "regular" actions
 

Public Attributes

const MapperRuntimeOptionList
 List of runtime options for generic mappers.
 
const MapperRuntimeOptions = map {$1.key: $1.value.desc}
 Runtime options for generic mappers.
 

Detailed Description

system mapper class for prividing Mapper::Mapper objects at runtime

This mapper type does not require any special options, but also does not provide default values for any options, therefore the input and mapper-options-output "output" options must be explicitly defined (requiresInput() and requiresOutput() both return True)

Example:

# name: my-example-mapper
# version: 1.0
# desc: Example mapper for documentation
# type: Mapper
# author: Joesephine Programmer (Qore Technologies, s.r.o.)
# functions: my-mapper-lib
# parse-options: PO_NEW_STYLE
# define-group: Example: Example interface objects
# groups: Example
OPTION: input: (
"order_id": "unique order ID",
#...
)
OPTION: output: (
"order_number": (
"type": "number",
"desc": "the unique order number for the order",
),
# ...
)

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