Factor: IRubricatorFactor;
Factor: Prognoz.Platform.Interop.Cubes.IRubricatorFactor;
The Factor property returns a factor.
Using the Factor property factor data can be obtained.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier that contains the VALID_FILTER validation rule (compares deviations between the output series and source series, on which the output series is based).
It is also necessary to add links to the Metabase, Ms, Cubes system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
RubrDescr: IMetabaseObjectDescriptor;
Valid: IValidationFilter;
Date: DateTime;
SerArr: Array Of Variant;
i: Integer;
ValComponent: IValidationComponent;
Factor: IRubricatorFactor;
Begin
Mb := MetabaseClass.Active;
RubrDescr := Mb.ItemById("OBJ_RUBRICATOR");
Valid := Mb.ItemByIdNamespace("VALID_FILTER", RubrDescr.Key).Bind As IValidationFilter;
Date := DateTime.ComposeDay(2000, 1, 1);
SerArr := Valid.GetComponentsByFactor(10024, Date, True);
If Not isNull(SerArr) And (SerArr.Length > 0) Then
For i := 0 To SerArr.Length - 1 Do
ValComponent := (SerArr[i] As IValidationComponent);
Factor := ValComponent.Factor;
Debug.WriteLine("Component " + i.ToString + " " + Factor.Factor.ToString + " rev=" + ValComponent.RevisionKey.ToString);
End For;
Else
Debug.WriteLine("No components");
End If;
End Sub UserProc;
After executing the example the console window displays component series, for which the validation calculation for the time series with the 10024 key was performed.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier that contains the VALID_FILTER validation rule (compares deviations between the output series and source series, on which the output series is based).
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Ms;
…
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
RubrDescr: IMetabaseObjectDescriptor;
Valid: IValidationFilter;
Date: DateTime;
SerArr: System.Array;
i: Integer;
ValComponent: IValidationComponent;
Factor: IRubricatorFactor;
Begin
Mb := Params.Metabase;
RubrDescr := Mb.ItemById["OBJ_RUBRICATOR"];
Valid := Mb.ItemByIdNamespace["VALID_FILTER", RubrDescr.Key].Bind() As IValidationFilter;
Date := DateTime.Parse("01.01.2000");
SerArr := Valid.GetComponentsByFactor(10024, Date, True);
If Not (SerArr <> Null) And (SerArr.Length > 0) Then
For i := 0 To SerArr.Length - 1 Do
ValComponent := (SerArr[i] As IValidationComponent);
Factor := ValComponent.Factor;
System.Diagnostics.Debug.WriteLine("Component " + i.ToString() + " " + Factor.Factor.ToString() + " rev=" + ValComponent.RevisionKey.ToString());
End For;
Else
System.Diagnostics.Debug.WriteLine("No components");
End If;
End Sub;
After executing the example the console window displays component series, for which the validation calculation for the time series with the 10024 key was performed.
See also: