Class ParamScope
- java.lang.Object
-
- it.bancaditalia.oss.vtl.impl.transform.scope.ParamScope
-
- All Implemented Interfaces:
TransformationScheme
public class ParamScope extends Object implements TransformationScheme
-
-
Constructor Summary
Constructors Constructor Description ParamScope(TransformationScheme parent, Map<String,Transformation> params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(String alias)
Determine if an alias is defined in this TransformationScheme.VTLValueMetadata
getMetadata(String alias)
Searches and retrieves metadata for value, referred by an alias defined in this TransformationScheme.TransformationScheme
getParent()
Checks if this transformation scheme is nested inside another one and return it.MetadataRepository
getRepository()
Statement
getRule(String node)
Returns astructure
a rule referred by an alias defined in this TransformationScheme.Optional<Lineage>
linkLineage(String alias)
Tries to resolve a lineage link specified by a given alias for a VTL rule defined in this scheme.VTLValue
resolve(String node)
Searches and retrieves a value, referred by an alias defined in this TransformationScheme.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.bancaditalia.oss.vtl.model.transform.TransformationScheme
eval, resolve
-
-
-
-
Constructor Detail
-
ParamScope
public ParamScope(TransformationScheme parent, Map<String,Transformation> params)
-
-
Method Detail
-
resolve
public VTLValue resolve(String node)
Description copied from interface:TransformationScheme
Searches and retrieves a value, referred by an alias defined in this TransformationScheme.- Specified by:
resolve
in interfaceTransformationScheme
- Parameters:
node
- The alias whose value is to be retrieved.- Returns:
- The
VTLValue
if the alias is found.
-
getMetadata
public VTLValueMetadata getMetadata(String alias)
Description copied from interface:TransformationScheme
Searches and retrieves metadata for value, referred by an alias defined in this TransformationScheme.- Specified by:
getMetadata
in interfaceTransformationScheme
- Parameters:
alias
- the alias whose value is to be retrieved.- Returns:
- the
metadata
of the value if the alias is found.
-
getRule
public Statement getRule(String node)
Description copied from interface:TransformationScheme
Returns astructure
a rule referred by an alias defined in this TransformationScheme.- Specified by:
getRule
in interfaceTransformationScheme
- Parameters:
node
- the alias of the rule whose structure is to be retrieved.- Returns:
- a
Statement
instance describing the rule if found.
-
getRepository
public MetadataRepository getRepository()
- Specified by:
getRepository
in interfaceTransformationScheme
- Returns:
- The
MetadataRepository
instance used by this TransformationScheme.
-
getParent
public TransformationScheme getParent()
Description copied from interface:TransformationScheme
Checks if this transformation scheme is nested inside another one and return it.- Specified by:
getParent
in interfaceTransformationScheme
- Returns:
- The TransformationScheme encompassing this one, if any.
-
contains
public boolean contains(String alias)
Description copied from interface:TransformationScheme
Determine if an alias is defined in this TransformationScheme.- Specified by:
contains
in interfaceTransformationScheme
- Parameters:
alias
- the alias whose value is to be retrieved.- Returns:
- whether the alias is defined or not.
-
linkLineage
public Optional<Lineage> linkLineage(String alias)
Description copied from interface:TransformationScheme
Tries to resolve a lineage link specified by a given alias for a VTL rule defined in this scheme.- Specified by:
linkLineage
in interfaceTransformationScheme
- Parameters:
alias
- The alias referring to a rule- Returns:
- The lineage link
-
-