Add: IMetabaseObjectDescriptor;
The Add method adds the object description to the collection.
In the following implementation this method is available only for the manipulation of the collection of objects that are copied with the time series database.
Executing the example requires that the repository contains a time series database with the FC identifier.
Sub Main;
Var
mb: IMetabase;
RubUpdateEx: ICubeMetaUpdateEx;
Rub: IRubricator;
Progress: IMetabaseUpdateProgress;
CrInfo: IMetabaseObjectCreateInfo;
s: string;
ObjectsF: IMetabaseObjectDescriptors;
ObjF: IMetabaseObjectDescriptor;
i: Integer;
Begin
mb := MetabaseClass.Active;
RubUpdateEx := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;
Rub := mb.ItemById("FC").Bind As IRubricator;
RubUpdateEx.Rubricator := Rub;
RubUpdateEx.Metabase := Mb;
CrInfo := RubUpdateEx.CreateInfo;
CrInfo.Parent := mb.Root;
s := Mb.GenerateId("FC_COPY");
CrInfo.Id := s;
CrInfo.Name := s;
RubUpdateEx.CopyExtraObjects := True;
ObjectsF := RubUpdateEx.ObjectsFilter;
ObjF := Rub.Container(RubricatorContainerType.Data);
ObjectsF.Add(ObjF);
For i := 0 To ObjF.Children.Count - 1 Do
ObjectsF.Add(ObjF.Children.Item(i));
End For;
RubUpdateEx.RdsDatabase := Rub.Database;
RubUpdateEx.Apply(Progress);
End Sub Main;
After executing the example, the FC time series database is copied to the repository root folder. Identifier of the copy - FC_COPY. Only the nested objects, the description of which is contained in the ObjectsF collection.
See also: