Interface DataPoint

    • Method Detail

      • keep

        DataPoint keep​(Collection<? extends DataStructureComponent<? extends ComponentRole.NonIdentifier,​?,​?>> components)
        Creates a new datapoint keeping all the identifiers and only the provided non-id components
        Parameters:
        components - the components to drop
        Returns:
        a new datapoint with all existing ids and the provided components.
      • renameComponent

        DataPoint renameComponent​(DataStructureComponent<?,​?,​?> oldComponent,
                                  DataStructureComponent<?,​?,​?> newComponent)
        Creates a new datapoint renaming the provided component to another one with the same role.
        Parameters:
        oldComponent - the component to be renamed
        newComponent - the already renamed component
        Returns:
        a new datapoint with the old component renamed.
      • combine

        DataPoint combine​(Transformation transformation,
                          DataPoint other)
        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.
        Parameters:
        transformation - The transformation that originated the combine operation
        other - the datapoint to combine with this datapoint
        Returns:
        a new datapoint that is the combination of this and another datapoint.
      • getValue

        default <S extends ValueDomainSubset<S,​D>,​D extends ValueDomainScalarValue<?,​?,​S,​D> getValue​(DataStructureComponent<?,​S,​D> component)
        If the component exists, retrieves the value for it in this datapoint, performing a cast of the result.
        Type Parameters:
        S - the domain subset type of the component
        D - the domain type of the component
        Parameters:
        component - the component to query
        Returns:
        the casted value for the component if exists.
        Throws:
        NullPointerException - if the component is not found
      • matches

        default boolean matches​(Map<? extends DataStructureComponent<? extends ComponentRole.Identifier,​?,​?>,​? extends ScalarValue<?,​?,​?,​?>> identifierValues)
        Checks if this datapoint identifiers' values match all the provided ones.
        Parameters:
        identifierValues - the id values to check
        Returns:
        true if this datapoint matches the provided identifiers' values.
      • getValues

        <R extends ComponentRoleMap<DataStructureComponent<R,​?,​?>,​ScalarValue<?,​?,​?,​?>> getValues​(Class<R> role)
        Query all values for components having the specified role.
        Type Parameters:
        R - the component role type
        Parameters:
        role - role of the components
        Returns:
        a map with values for each component of the specified role.
      • getValues

        default Map<DataStructureComponent<?,​?,​?>,​ScalarValue<?,​?,​?,​?>> getValues​(Collection<? extends DataStructureComponent<?,​?,​?>> components)
        Returns the values for multiple components.
        Parameters:
        components - the collection of components to query
        Returns:
        a map with the values for the specified components.
      • getValues

        default <R extends ComponentRoleMap<DataStructureComponent<R,​?,​?>,​ScalarValue<?,​?,​?,​?>> getValues​(Class<R> role,
                                                                                                                                                Collection<String> names)
        Returns the values for multiple components having a specified role and matching one of the specified names.
        Type Parameters:
        R - the component role type
        Parameters:
        role - role of the components
        names - collection of names
        Returns:
        a map with the values for all the components having the specified role and matching one of the specified names.
      • getValues

        default <R extends ComponentRoleMap<DataStructureComponent<R,​?,​?>,​ScalarValue<?,​?,​?,​?>> getValues​(Collection<? extends DataStructureComponent<R,​?,​?>> components,
                                                                                                                                                Class<R> role)
        Returns the values for the chosen components having a specified role.
        Type Parameters:
        R - the component role type
        Parameters:
        role - role of the components
        components - collection of components to query
        Returns:
        a map with the values for chosen the components having the specified role.
      • getLineage

        Lineage getLineage()
        Get the source transformation of this DataPoint
        Returns:
        the transformation from where the datapoint originated