User Defined Operator Scheme¶
A User Defined Operator Scheme is a VTL scheme holding User Defined Operators: operators defined in VTL with
define operator, which Transformation Schemes can call. Documents start
ref: "UserDefinedOperatorScheme=AGENCY:ID(1.0)".
Simple form¶
The smallest complete User Defined Operator Scheme has a VTL version and one operator. An operator is never written in
the ID: "name" short form, every operator is written as an object.
format: "fusion-yaml(1.0.0)"
ref: "UserDefinedOperatorScheme=SDMX:OPERATORS(1.0)"
name: "OPERATORS Name"
vtlVersion: "1.0"
items:
- OP1:
name: "N1"
operatorDefinition: "operator1"
The document starts with the common header. The body fields are:
vtlVersion– the version of VTL the scheme is written in. Required for every VTL scheme that is not a stub.items– the User Defined Operators, in scheme order, each keyed by its id (see items).name– the localised name of the operator.operatorDefinition– the VTL operator definition. Required.
Complex form¶
The scheme can reference the VTL Mapping Scheme and the Ruleset Schemes its operators use.
format: "fusion-yaml(1.0.0)"
ref: "UserDefinedOperatorScheme=SDMX:OPERATORS(1.0)"
name: "OPERATORS Name"
vtlmappingscheme: "SDMX:VMS(1.0.0)"
rulesetSchemes:
- "SDMX:RS1(1.0.0)"
- "SDMX:RS2(2.0.0)"
vtlVersion: "1.0"
items:
- OP1:
name: "N1"
operatorDefinition: "operator1"
- OP2:
name: "N2"
operatorDefinition: "operator2"
vtlmappingschemeis a single reference, keyed by the lower case class of the referenced structure with a short URN value.-
The Ruleset Schemes can be many, so they are written under the fixed field name
rulesetSchemes. The values are short URNs with no class prefix, as the class is implied by the field. One reference is written as a scalar, several as an array (see value or array): -
An operator may also carry a description, a URI, annotations and links, written in the positions given in the field reference below.
Field reference¶
Scheme fields, written after the common header:
| Field | Value | Written when |
|---|---|---|
partial |
true |
The scheme is a partial item scheme |
vtlmappingscheme |
Short URN of a VTL Mapping Scheme | The scheme references a VTL Mapping Scheme |
rulesetSchemes |
Short URN, or array of short URNs, of Ruleset Schemes | The scheme references at least one Ruleset Scheme |
vtlVersion |
String | The VTL version is set (always, unless a stub) |
items |
Array of User Defined Operators | The scheme has at least one operator |
User Defined Operator fields (items[].<ID>):
| Field | Value | Written when |
|---|---|---|
name, name-<lang> |
String | Always (en as name, other locales as name-<lang>) |
description, description-<lang> |
String | The operator has a description |
uri |
String | The operator has a URI |
operatorDefinition |
String | Always (required) |
annotations |
Array, see annotations | The operator has annotations |
links |
Array, see links | The operator has links |
Operators never use the - ID: "name" simple item form, as the User Defined Operator bean
reports itself as never simple.