public static void PopulateTerminalProperties(FTN.Terminal cimTerminal, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cimTerminal != null) && (rd != null))
     {
         LoadFlowConverter.PopulateIdentifiedObjectProperties(cimTerminal, rd);
         if (cimTerminal.PhasesHasValue)
         {
             rd.AddProperty(new Property(ModelCode.TERMINAL_PHASES, (short)GetDMSPhaseCode(cimTerminal.Phases)));
         }
         if (cimTerminal.ConductingEquipmentHasValue)
         {
             long gid = importHelper.GetMappedGID(cimTerminal.ConductingEquipment.ID);
             if (gid < 0)
             {
                 report.Report.Append("WARNING: Convert ").Append(cimTerminal.GetType().ToString()).Append(" rdfID = \"").Append(cimTerminal.ID);
                 report.Report.Append("\" - Failed to set reference to CondunctingEquipment: rdfID \"").Append(cimTerminal.ConductingEquipment.ID).AppendLine(" \" is not mapped to GID!");
             }
             rd.AddProperty(new Property(ModelCode.TERMINAL_CONDEQ, gid));
         }
         if (cimTerminal.ConnectivityNodeHasValue)
         {
             long gid = importHelper.GetMappedGID(cimTerminal.ConnectivityNode.ID);
             if (gid < 0)
             {
                 report.Report.Append("WARNING: Convert ").Append(cimTerminal.GetType().ToString()).Append(" rdfID = \"").Append(cimTerminal.ID);
                 report.Report.Append("\" - Failed to set reference to ConnectivityNode: rdfID \"").Append(cimTerminal.ConnectivityNode.ID).AppendLine(" \" is not mapped to GID!");
             }
             rd.AddProperty(new Property(ModelCode.TERMINAL_CONNECTIVITYNODE, gid));
         }
     }
 }
 public static void PopulatePowerSystemResourceProperties(FTN.PowerSystemResource cimPowerSystemResource, ResourceDescription rd)
 {
     if ((cimPowerSystemResource != null) && (rd != null))
     {
         LoadFlowConverter.PopulateIdentifiedObjectProperties(cimPowerSystemResource, rd);
     }
 }
 public static void PopulateConnectivityNodeProperties(FTN.ConnectivityNode cimConnectivityNode, ResourceDescription rd)
 {
     if ((cimConnectivityNode != null) && (rd != null))
     {
         LoadFlowConverter.PopulateIdentifiedObjectProperties(cimConnectivityNode, rd);
     }
 }
        public static void PopulateBaseVoltageProperties(FTN.BaseVoltage cimBaseVoltage, ResourceDescription rd)
        {
            if ((cimBaseVoltage != null) && (rd != null))
            {
                LoadFlowConverter.PopulateIdentifiedObjectProperties(cimBaseVoltage, rd);

                if (cimBaseVoltage.NameHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.BASEVOLTAGE_NOMINALVOLTAGE, cimBaseVoltage.NominalVoltage));
                }
            }
        }
        public static void PopulatePowerTransformerEndProperties(FTN.PowerTransformerEnd cimPowerTransformerEnd, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimPowerTransformerEnd != null) && (rd != null))
            {
                LoadFlowConverter.PopulateIdentifiedObjectProperties(cimPowerTransformerEnd, rd);

                if (cimPowerTransformerEnd.ConnectionKindHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_CONNKIND, (short)GetDMSWindingConnection(cimPowerTransformerEnd.ConnectionKind)));
                }
                if (cimPowerTransformerEnd.BHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_B, cimPowerTransformerEnd.B));
                }
                if (cimPowerTransformerEnd.B0HasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_B0, cimPowerTransformerEnd.B0));
                }
                if (cimPowerTransformerEnd.GHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_G, cimPowerTransformerEnd.G));
                }
                if (cimPowerTransformerEnd.G0HasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_G0, cimPowerTransformerEnd.G));
                }
                if (cimPowerTransformerEnd.RHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_R, cimPowerTransformerEnd.R));
                }
                if (cimPowerTransformerEnd.R0HasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_R0, cimPowerTransformerEnd.R0));
                }
                if (cimPowerTransformerEnd.XHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_X, cimPowerTransformerEnd.X));
                }
                if (cimPowerTransformerEnd.X0HasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_X0, cimPowerTransformerEnd.X0));
                }
                if (cimPowerTransformerEnd.RatedSHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_RATEDS, cimPowerTransformerEnd.RatedS));
                }
                if (cimPowerTransformerEnd.RatedUHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_RATEDU, cimPowerTransformerEnd.RatedU));
                }
                if (cimPowerTransformerEnd.EndNumberHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_ENDNUMBER, cimPowerTransformerEnd.EndNumber));
                }
                if (cimPowerTransformerEnd.PowerTransformerHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimPowerTransformerEnd.PowerTransformer.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert ").Append(cimPowerTransformerEnd.GetType().ToString()).Append(" rdfID = \"").Append(cimPowerTransformerEnd.ID);
                        report.Report.Append("\" - Failed to set reference to PowerTransformer: rdfID \"").Append(cimPowerTransformerEnd.PowerTransformer.ID).AppendLine(" \" is not mapped to GID!");
                    }
                    rd.AddProperty(new Property(ModelCode.PTRANSFORMEREND_POWERTRANSFORMER, gid));
                }
            }
        }