ISourceDataImportDestinationInfo.Destination

Fore Syntax

Destination: ICubeModelDestination;

Fore.NET Syntax

Destination: Prognoz.Platform.Interop.Cubes.ICubeModelDestination;

Description

The Destination property returns the display version, for which indexing settings are determined.

Comments

The property is returned by the display version, which was sent to the ISourceDataImportDestinationInfos.Add method.

Fore Example

Executing the example requires that the repository contains a scheduled tasks container with the TASK_CONTAINER identifier. One search index refresh task is created in the container. The task is set up to refresh search index for several sources. Add links to the BiSearch, Cubes, Fore, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Container: IScheduledTasksContainer;
    Task: ISearchEngineImportScheduledTask;
    EngineSchema: ISolrSearchEngineSchema;
    ImportContext: ISourceDataImportContext;
    SourceInfos: ISourceDataImportInfos;
    SourceInfo: ISourceDataImportInfo;
    DestinationInfos: ISourceDataImportDestinationInfos;
    CubeDest: ICubeModelDestination;
    i, j: Integer;
Begin
    MB := MetabaseClass.Active;
    //Get task
    Container := MB.ItemById("TASK_CONTAINER").Bind As IScheduledTasksContainer;
    Task := Container.Tasks.Item(0).Bind As ISearchEngineImportScheduledTask;
    //Context to index objects
    EngineSchema := Task.Engine.SearchEngineSchema As ISolrSearchEngineSchema;
    ImportContext := Task.ImportContext(SearchEngineTargetType.SourceData) As ISourceDataImportContext;
    //Get indexed objects
    SourceInfos := ImportContext.SourceInfos;
    //View information
    For i := 0 To SourceInfos.Count - 1 Do
        SourceInfo := SourceInfos.Item(i);
        Debug.WriteLine("Source: " + MB.Item(SourceInfo.Key).Name + "(Key: " + SourceInfo.Key.ToString + ')');
        Debug.WriteLine("Indexed display versions:");
        Debug.Indent;
        DestinationInfos := SourceInfo.DestinationInfos;
        For j := 0 To DestinationInfos.Count - 1 Do
            CubeDest := DestinationInfos.Item(j).Destination;
            Debug.WriteLine(CubeDest.Name + '(' + CubeDest.Id + ')');
        End For;
        Debug.Unindent;
    End For;
End Sub UserProc;

On executing the example the development environment console displays information about sources and its display versions, which will be used on search index refresh.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.BISearch;
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.KeFore;
Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Container: IScheduledTasksContainer;
    Task: ISearchEngineImportScheduledTask;
    EngineSchema: ISolrSearchEngineSchema;
    ImportContext: ISourceDataImportContext;
    SourceInfos: ISourceDataImportInfos;
    SourceInfo: ISourceDataImportInfo;
    DestinationInfos: ISourceDataImportDestinationInfos;
    CubeDest: ICubeModelDestination;
    i, j: Integer;
Begin
    MB := Params.Metabase;
    //Get task
    Container := MB.ItemById["TASK_CONTAINER"].Bind() As IScheduledTasksContainer;
    Task := Container.Tasks.Item[0].Bind() As ISearchEngineImportScheduledTask;
    //Context to index objects
    EngineSchema := Task.Engine.SearchEngineSchema As ISolrSearchEngineSchema;
    ImportContext := Task.ImportContext[SearchEngineTargetType.settSourceData] As ISourceDataImportContext;
    //Get indexed objects
    SourceInfos := ImportContext.SourceInfos;
    //View information
    For i := 0 To SourceInfos.Count - 1 Do
        SourceInfo := SourceInfos.Item[i];
        System.Diagnostics.Debug.WriteLine("Source: " + MB.Item[SourceInfo.Key].Name + "(Key: " + SourceInfo.Key.ToString() + ')');
        System.Diagnostics.Debug.WriteLine("Indexed display options:");
        System.Diagnostics.Debug.Indent();
        DestinationInfos := SourceInfo.DestinationInfos;
        For j := 0 To DestinationInfos.Count - 1 Do
            CubeDest := DestinationInfos.Item[j].Destination;
            System.Diagnostics.Debug.WriteLine(CubeDest.Name + '(' + CubeDest.Id + ')');
        End For;
        System.Diagnostics.Debug.Unindent();
    End For;
End Sub;

See also:

ISourceDataImportDestinationInfo