Example #1
0
        public FactALInterface(BTInterface ifa, ALModel alModel)
        {
            this.joinIdx                 = 0;
            this.BTInterface             = ifa;
            this.Model                   = alModel;
            this.HistoryAttribute        = null;
            this.FactInterfaceReferences = new List <FactInterfaceReference>();

            PrepareAttributes();
        }
Example #2
0
 private string CalculateAlias(ALModel model, BT.RefBTAttribute refAttr)
 {
     if (string.IsNullOrEmpty(refAttr?.refBLAttribute?.Core?.Alias))
     {
         return("");
     }
     else
     {
         return($"{refAttr.refBLAttribute.Core.Alias}_");
     }
 }
Example #3
0
 public DimensionALInterface(ALModel model, RefBTAttribute refAttr)
 {
     this.Model         = model;
     this.BTInterface   = refAttr.ReferencedBTInterface;
     this.Core          = refAttr.ReferencedBTInterface.coreInterface;
     this.Depth         = 1;
     this.RootDimension = this;
     this.Alias         = CalculateAlias(model, refAttr);
     this.ShortName     = CalculateShortName(model, refAttr);
     this.Name          = CalculateName(model, refAttr);
     PrepareAttributes();
 }
Example #4
0
        private string CalculateName(ALModel model, BT.RefBTAttribute refAttr)
        {
            string name = "";

            if (string.IsNullOrEmpty(model.Config.Prefix))
            {
                name = $"D_";
            }
            else
            {
                name = $"{model.Config.Prefix}_D_";
            }
            name += $"{RootDimension.ShortName}_{Depth}_{this.ShortName}";
            return(name);
        }
Example #5
0
 internal DimensionALInterface(ALModel model, BT.RefBTAttribute refAttr, DimensionALInterface rootDimension, int depth)
 {
     if (rootDimension == null)
     {
         rootDimension = this;
     }
     this.Model         = model;
     this.BTInterface   = refAttr.ReferencedBTInterface;
     this.Core          = refAttr.ReferencedBTInterface.coreInterface;
     this.Depth         = depth;
     this.RootDimension = rootDimension;
     this.Alias         = CalculateAlias(model, refAttr);
     this.ShortName     = CalculateShortName(model, refAttr);
     this.Name          = CalculateName(model, refAttr);
     PrepareAttributes();
 }
Example #6
0
 private string CalculateShortName(ALModel model, BT.RefBTAttribute refAttr)
 {
     if (string.IsNullOrEmpty(refAttr?.refBLAttribute?.Core?.Alias) && refAttr.ReferencedBTInterface.IsHistoryTable)
     {
         return($"{refAttr.ReferencedBTInterface.ShortName}_VERSION");
     }
     else if (string.IsNullOrEmpty(refAttr?.refBLAttribute?.Core?.Alias))
     {
         return(refAttr.ReferencedBTInterface.ShortName);
     }
     else if (refAttr.ReferencedBTInterface.IsHistoryTable)
     {
         return($"{refAttr.refBLAttribute.Core.Alias}_{refAttr.ReferencedBTInterface.ShortName}_VERSION");
     }
     else
     {
         return($"{refAttr.refBLAttribute.Core.Alias}_{refAttr.ReferencedBTInterface.ShortName}");
     }
 }