CustomDataTransformation Class

Spotfire 14.3 API Reference
Base class for custom data transformations. To create a custom transformation you need to extend this class and CustomDataRowReader, register the transformation class in your AddIn by using the overriddenRegisterDataTransformations(AddInDataTransformationRegistrar). If necessary create a UI and register in the overridden RegisterViews(AddInViewRegistrar) together with your transformation.
Inheritance Hierarchy

SystemObject
  Spotfire.Dxp.DataDataTransformation
    Spotfire.Dxp.Application.ExtensionCustomDataTransformation

Namespace:  Spotfire.Dxp.Application.Extension
Assembly:  Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 65.0.19510.3242 (65.0.19510.3242)
Syntax

C#
[SerializableAttribute]
[PersistenceVersionAttribute(1, 0)]
public abstract class CustomDataTransformation : DataTransformation

The CustomDataTransformation type exposes the following members.

Constructors

  NameDescription
Protected methodCustomDataTransformation
Initializes a new instance of the CustomDataTransformation class.
Protected methodCustomDataTransformation(SerializationInfo, StreamingContext)
Implements ISerializable.
Top
Properties

  NameDescription
Public propertyLoadReport
Gets the PartialDataLoadReport that can be used to report errors during connection.
(Inherited from DataTransformation.)
Public propertyName
Gets the display name of the transformation.
(Inherited from DataTransformation.)
Public propertyTypeId
Gets the type identifier for the data source.
(Inherited from DataTransformation.)
Top
Methods

  NameDescription
Public methodConnect
Connects to the input reader. A DataRowReader can then be retrieved from the DataTransformationConnection.
(Inherited from DataTransformation.)
Protected methodConnectCore
Connects to the input reader. A DataRowReader can then be retrieved from the DataTransformationConnection.
(Inherited from DataTransformation.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGenerateDataHistoryCore
Creates detail information for the DataTransformation. See DataHistoryBuilder for more information on how to add detailed information to the data history.
(Inherited from DataTransformation.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Protected methodGetObjectData
Implements ISerializable.
(Inherited from DataTransformation.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Explicit Interface Implementations

  NameDescription
Explicit interface implementationPrivate methodISerializableGetObjectData
Implements ISerializable.
(Inherited from DataTransformation.)
Top
Examples

C#
For the reader implementation see the example in CustomDataRowReader
[Serializable] 
public class EveryNColumnsTransformation : CustomDataTransformation
{
    private int n;

    public EveryNColumnsTransformation()
    {
        n = 2;
    }

    public int N
    {
        get { return n; }
        set { n = value; }
    }

    protected override DataTransformationConnection ConnectCore(ImportContext importContext, DataRowReader input)
    {
        PromptService promptService = importContext.PromptService;
        List<object> promptModels = new List<object>();
        if (promptService.IsPromptingAllowed)
        {
            promptModels.Add(this);
        }

        //prompt for a value of N that the dialog sets directly on the promptmodel

        return
            DataTransformationConnection.CreateConnection(
            delegate { return new EveryNColumnsTransformationReader(input, N); },
            promptModels);
    }

    public EveryNColumnsTransformation(SerializationInfo info, StreamingContext context)
        : base(info, context)
    {
        n = info.GetInt32("n");
    }

    protected override void GetObjectData(SerializationInfo info, StreamingContext context)
    {
        base.GetObjectData(info, context);
        info.AddValue("n", n);
    }   
}
Version Information

Supported in: 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also

Reference