ExtendedFormula

ExtendedFormula

Special. This generator is aware of lists. If subgenerators contain lists of values (constraint: all lists must be of equal length), then this generator also returns a list as result and executes the user specified formula for each list item. In java pseudocode the logic would look like this: if (generator[0] instanceOf List){ operand[0]=((List)generator[0]).get(i) } else {operand[0]=generator[0]}. Besides that, it behaves the same as the default Formula

Attributes
Name Description Required Min Max Allowed Values
name (Class)Name of this element. Used to identify plugin Class. Full name is required. Example: com.en.myPluginPackage.myPuginClass no 0 1
id Identification String of this element. May be used to uniquely identify a field within the children of an Element. no 0 1
listName Content type: String
Name of the generated list. List will be of type bankmark.pdgf.util.io.generator.collection.NamedList and has a getName() method which you can use in your custom output to get easy access to this specific list.
Default: <not set>
no 0 1
ignoreInvalidValues Content type: Boolean
Tells this generator to ignore invalid values from other generators. Instead of throwing an exception, the invalid value for generator[] is set to: Double.NaN.
Default: false
no 0 1
  • true
  • false
  • 0
  • 1
Nodes
Name Description Required Min Max Allowed Values
format Content type: String
A format string describing how to format the number. Supported are class java.text.DecimalFormat (e.g. '#.000') and class java.util.Formatter (printf() sytle e.g.: '%.3d') syntax. If the format string contains a '%' symbol: first try to interpret format as Formatter style, with fall back to DecimalFormat. Else interpret format as DecimalFormat style with fall back to Formatter. Example: '%.3d' to format the number with 3 decimal places
Default: Unset (do not apply any special formatting to the number)
no 0 1
staticValue Content type: Java code
Here you can specify static values to be available to use. Especially useful if "heavy initalization" should be avoided for every generated dataset.
Example: <staticValue>new int{1,2,3,4,5}</staticValue>.
Default: <not set>
no 0 1
formula Content type: Java code
The formula to evaluate. Example: (300 * ( generator[1] + 4 ))/ generator[0]. Any number of sub-generator nodes may be specified within the Formula which can be accessed in the formula. If the formula contains characters of the xml structure (like '<', '>', ...), the formula has to be wrapped into '<![CDATA[ ... ]]'.
yes 1 1
locale Content type: String
Locale to use. A locale defines the formatting rules for numbers, e.g what symbol to use as the decimal point and the thousand separator.
Examples: 'en-US', 'en-GB'. 'de-DE'
'Default is: 'us'
no 0 1
  • ar
  • ar-AE
  • ar-BH
  • ar-DZ
  • ar-EG
  • ar-IQ
  • ar-JO
  • ar-KW
  • ar-LB
  • ar-LY
  • ar-MA
  • ar-OM
  • ar-QA
  • ar-SA
  • ar-SD
  • ar-SY
  • ar-TN
  • ar-YE
  • be
  • be-BY
  • bg
  • bg-BG
  • ca
  • ca-ES
  • cs
  • cs-CZ
  • da
  • da-DK
  • de
  • de-AT
  • de-CH
  • de-DE
  • de-GR
  • de-LU
  • el
  • el-CY
  • el-GR
  • en
  • en-AU
  • en-CA
  • en-GB
  • en-IE
  • en-IN
  • en-MT
  • en-NZ
  • en-PH
  • en-SG
  • en-US
  • en-ZA
  • es
  • es-AR
  • es-BO
  • es-CL
  • es-CO
  • es-CR
  • es-CU
  • es-DO
  • es-EC
  • es-ES
  • es-GT
  • es-HN
  • es-MX
  • es-NI
  • es-PA
  • es-PE
  • es-PR
  • es-PY
  • es-SV
  • es-US
  • es-UY
  • es-VE
  • et
  • et-EE
  • fi
  • fi-FI
  • fr
  • fr-BE
  • fr-CA
  • fr-CH
  • fr-FR
  • fr-LU
  • ga
  • ga-IE
  • he
  • he-IL
  • hi
  • hi-IN
  • hr
  • hr-HR
  • hu
  • hu-HU
  • id
  • id-ID
  • is
  • is-IS
  • it
  • it-CH
  • it-IT
  • ja
  • ja-JP
  • ja-JP-u-ca-japanese-x-lvariant-JP
  • ko
  • ko-KR
  • lt
  • lt-LT
  • lv
  • lv-LV
  • mk
  • mk-MK
  • ms
  • ms-MY
  • mt
  • mt-MT
  • nl
  • nl-BE
  • nl-NL
  • nn-NO
  • no
  • no-NO
  • pl
  • pl-PL
  • pt
  • pt-BR
  • pt-PT
  • ro
  • ro-RO
  • ru
  • ru-RU
  • sk
  • sk-SK
  • sl
  • sl-SI
  • sq
  • sq-AL
  • sr
  • sr-BA
  • sr-CS
  • sr-Latn
  • sr-Latn-BA
  • sr-Latn-ME
  • sr-Latn-RS
  • sr-ME
  • sr-RS
  • sv
  • sv-SE
  • th
  • th-TH
  • th-TH-u-nu-thai-x-lvariant-TH
  • tr
  • tr-TR
  • uk
  • uk-UA
  • und
  • vi
  • vi-VN
  • zh
  • zh-CN
  • zh-HK
  • zh-SG
  • zh-TW
decimalPlaces Content type: Integer
Used to specify the precision of the calculation result.
Example: calculation raw result 3.644345345;
decimalPlaces<0: result -> 3.644345345 //unmodified (default)
decimalPlaces=2: result -> 3.64
decimalPlaces=3: result -> 3.642
decimalPlaces=36 <-max precision
Default: -1
no 0 1
gen Value Generator for this field no 0
Sub-Attributes
Parent Name Description Required Min Max Allowed Values
staticValue unlockFullAccess Content type: Boolean
Omits complexity restriction. This allows to enter ';' into the formula and staticValue elements to be able to enter multiple commands into one line.
Default: true
no 0 1
  • true
  • false
  • 0
  • 1
decimalPlaces roundingMode Content type: String
Sets the rounding mode used to round numbers.
Default: HALF_EVEN
Possible values: [UP, DOWN, CEILING, FLOOR, HALF_UP, HALF_DOWN, HALF_EVEN, UNNECESSARY]
no 0 1
  • UP
  • DOWN
  • CEILING
  • FLOOR
  • HALF_UP
  • HALF_DOWN
  • HALF_EVEN
  • UNNECESSARY
decimalPlaces roundPlainValue Content type: Boolean
Round generated raw value to specified 'decimalPlaces'
If true : other generators will work with the rounded value.
If false: still round the value during 'toString()' but retain full precision for other generators using this generator's output, e.g., by reference or another computational generator.
Only available if 'decimalPlaces' parameter is >=0.
Default: true
no 0 1
  • true
  • false
  • 0
  • 1
formula unlockFullAccess Content type: Boolean
Omits complexity restriction. This allows to enter ';' into the formula and staticValue elements to be able to enter multiple commands into one line.
Default: true
no 0 1
  • true
  • false
  • 0
  • 1
2.7-83fb0 | 2020-04-22