Class SparkDataPoint
- java.lang.Object
-
- java.util.AbstractMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
-
- it.bancaditalia.oss.vtl.impl.environment.spark.SparkDataPoint
-
- All Implemented Interfaces:
DataPoint
,Serializable
,Map<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
public class SparkDataPoint extends AbstractMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>> implements DataPoint, Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description SparkDataPoint(Lineage lineage, Map<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>> values)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DataPoint
combine(Transformation transformation, DataPoint other)
Create a new datapoint combining this and another datapoint.boolean
containsKey(Object key)
boolean
containsValue(Object value)
DataPoint
dropComponents(Collection<? extends DataStructureComponent<? extends ComponentRole.NonIdentifier,?,?>> components)
Creates a new datapoint dropping all provided non-id componentsSet<Map.Entry<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>>
entrySet()
ScalarValue<?,?,?,?>
get(Object key)
Lineage
getLineage()
Get the source transformation of this DataPoint<R extends ComponentRole>
Map<DataStructureComponent<R,?,?>,ScalarValue<?,?,?,?>>getValues(Class<R> role)
Query all values for components having the specified role.boolean
isEmpty()
DataPoint
keep(Collection<? extends DataStructureComponent<? extends ComponentRole.NonIdentifier,?,?>> components)
Creates a new datapoint keeping all the identifiers and only the provided non-id componentsstatic SparkDataPoint
of(DataPoint other)
DataPoint
renameComponent(DataStructureComponent<?,?,?> oldComponent, DataStructureComponent<?,?,?> newComponent)
Creates a new datapoint renaming the provided component to another one with the same role.-
Methods inherited from class java.util.AbstractMap
clear, clone, equals, hashCode, keySet, put, putAll, remove, size, toString, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface it.bancaditalia.oss.vtl.model.data.DataPoint
getValue, getValues, getValues, getValues, matches
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Constructor Detail
-
SparkDataPoint
public SparkDataPoint(Lineage lineage, Map<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>> values)
-
-
Method Detail
-
of
public static SparkDataPoint of(DataPoint other)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
- Overrides:
isEmpty
in classAbstractMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
- Overrides:
containsKey
in classAbstractMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
- Overrides:
containsValue
in classAbstractMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
-
get
public ScalarValue<?,?,?,?> get(Object key)
- Specified by:
get
in interfaceMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
- Overrides:
get
in classAbstractMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
-
entrySet
public Set<Map.Entry<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>> entrySet()
- Specified by:
entrySet
in interfaceMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
- Specified by:
entrySet
in classAbstractMap<DataStructureComponent<?,?,?>,ScalarValue<?,?,?,?>>
-
getLineage
public Lineage getLineage()
Description copied from interface:DataPoint
Get the source transformation of this DataPoint- Specified by:
getLineage
in interfaceDataPoint
- Returns:
- the transformation from where the datapoint originated
-
dropComponents
public DataPoint dropComponents(Collection<? extends DataStructureComponent<? extends ComponentRole.NonIdentifier,?,?>> components)
Description copied from interface:DataPoint
Creates a new datapoint dropping all provided non-id components- Specified by:
dropComponents
in interfaceDataPoint
- Parameters:
components
- the components to drop- Returns:
- a new datapoint without the provided components.
-
keep
public DataPoint keep(Collection<? extends DataStructureComponent<? extends ComponentRole.NonIdentifier,?,?>> components)
Description copied from interface:DataPoint
Creates a new datapoint keeping all the identifiers and only the provided non-id components
-
renameComponent
public DataPoint renameComponent(DataStructureComponent<?,?,?> oldComponent, DataStructureComponent<?,?,?> newComponent)
Description copied from interface:DataPoint
Creates a new datapoint renaming the provided component to another one with the same role.- Specified by:
renameComponent
in interfaceDataPoint
- Parameters:
oldComponent
- the component to be renamednewComponent
- the already renamed component- Returns:
- a new datapoint with the old component renamed.
-
combine
public DataPoint combine(Transformation transformation, DataPoint other)
Description copied from interface:DataPoint
Create a new datapoint combining this and another datapoint. All existing components keep their values in this datapoint and aren't updated with new values.
-
getValues
public <R extends ComponentRole> Map<DataStructureComponent<R,?,?>,ScalarValue<?,?,?,?>> getValues(Class<R> role)
Description copied from interface:DataPoint
Query all values for components having the specified role.
-
-