Example #1
0
 public static void PopulateEnergySourceProperties(Outage.EnergySource cimEnergySource, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cimEnergySource != null) && (rd != null))
     {
         OutageConverter.PopulateConductingEquipmentProperties(cimEnergySource, rd, importHelper, report);
     }
 }
Example #2
0
        public static void PopulateEnergyConsumerProperties(Outage.EnergyConsumer cimEnergyConsumer, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimEnergyConsumer != null) && (rd != null))
            {
                OutageConverter.PopulateConductingEquipmentProperties(cimEnergyConsumer, rd, importHelper, report);
            }

            if (cimEnergyConsumer.LastNameHasValue)
            {
                rd.AddProperty(new Property(ModelCode.ENERGYCONSUMER_LASTNAME, cimEnergyConsumer.LastName));
            }

            if (cimEnergyConsumer.FirstNameHasValue)
            {
                rd.AddProperty(new Property(ModelCode.ENERGYCONSUMER_FIRSTNAME, cimEnergyConsumer.FirstName));
            }

            if (cimEnergyConsumer.TypeHasValue)
            {
                rd.AddProperty(new Property(ModelCode.ENERGYCONSUMER_TYPE, (short)GetEnergyConsumerType(cimEnergyConsumer.Type)));
            }
        }
Example #3
0
        public static void PopulateSynchronousMachineProperties(Outage.SynchronousMachine cimSynchronousMachine, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimSynchronousMachine != null) && (rd != null))
            {
                OutageConverter.PopulateConductingEquipmentProperties(cimSynchronousMachine, rd, importHelper, report);

                if (cimSynchronousMachine.CapacityHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCHRONOUSMACHINE_CAPACITY, cimSynchronousMachine.Capacity));
                }

                if (cimSynchronousMachine.CurrentRegimeHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCHRONOUSMACHINE_CURRENTREGIME, cimSynchronousMachine.CurrentRegime));
                }
            }
        }
Example #4
0
        public static void PopulateConductingEquipmentProperties(Outage.ConductingEquipment cimConductingEquipment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimConductingEquipment != null) && (rd != null))
            {
                OutageConverter.PopulateEquipmentProperties(cimConductingEquipment, rd);

                if (cimConductingEquipment.BaseVoltageHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimConductingEquipment.BaseVoltage.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert").Append(cimConductingEquipment.GetType().ToString()).Append(" rdfID: \"").Append(cimConductingEquipment.ID);
                        report.Report.Append("\" - Failed to set reference to BaseVoltage: rdfID\"").Append(cimConductingEquipment.BaseVoltage.ID).AppendLine(" \" is not mapped to GID!");
                    }
                    rd.AddProperty(new Property(ModelCode.CONDUCTINGEQUIPMENT_BASEVOLTAGE, gid));
                }

                if (cimConductingEquipment.IsRemoteHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.CONDUCTINGEQUIPMENT_ISREMOTE, cimConductingEquipment.IsRemote));
                }
            }
        }
Example #5
0
        public static void PopulateDiscreteProperties(Outage.Discrete cimDiscrete, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimDiscrete != null) && (rd != null))
            {
                OutageConverter.PopulateMeasurementProperties(cimDiscrete, rd, importHelper, report);

                if (cimDiscrete.CurrentOpenHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.DISCRETE_CURRENTOPEN, cimDiscrete.CurrentOpen));
                }

                if (cimDiscrete.MaxValueHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.DISCRETE_MAXVALUE, cimDiscrete.MaxValue));
                }

                if (cimDiscrete.MeasurementTypeHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.DISCRETE_MEASUREMENTTYPE, (short)GetDiscreteMeasuremetType(cimDiscrete.MeasurementType)));
                }

                if (cimDiscrete.MinValueHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.DISCRETE_MINVALUE, cimDiscrete.MinValue));
                }

                if (cimDiscrete.NormalValueHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.DISCRETE_NORMALVALUE, cimDiscrete.NormalValue));
                }
            }
        }
Example #6
0
        public static void PopulateAnalogProperties(Outage.Analog cimAnalog, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimAnalog != null) && (rd != null))
            {
                OutageConverter.PopulateMeasurementProperties(cimAnalog, rd, importHelper, report);

                if (cimAnalog.CurrentValueHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ANALOG_CURRENTVALUE, cimAnalog.CurrentValue));
                }

                if (cimAnalog.MaxValueHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ANALOG_MAXVALUE, cimAnalog.MaxValue));
                }

                if (cimAnalog.MeasurementTypeHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ANALOG_SIGNALTYPE, (short)GetAnalogMeasurementType(cimAnalog.MeasurementType)));
                }

                if (cimAnalog.MinValueHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ANALOG_MINVALUE, cimAnalog.MinValue));
                }

                if (cimAnalog.NormalValueHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ANALOG_NORMALVALUE, cimAnalog.NormalValue));
                }

                if (cimAnalog.DeviationHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ANALOG_DEVIATION, cimAnalog.Deviation));
                }

                if (cimAnalog.ScalingFactorHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ANALOG_SCALINGFACTOR, cimAnalog.ScalingFactor));
                }
            }
        }
Example #7
0
        public static void PopulateTerminalProperties(Outage.Terminal cimTerminal, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimTerminal != null) && (rd != null))
            {
                OutageConverter.PopulateIdentifiedObjectProperties(cimTerminal, rd);

                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 ConductingEquipment: rdfID\"").Append(cimTerminal.ConductingEquipment.ID).AppendLine(" \" is not mapped to GID!");
                    }
                    rd.AddProperty(new Property(ModelCode.TERMINAL_CONDUCTINGEQUIPMENT, 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));
                }
            }
        }
Example #8
0
        public static void PopulateMeasurementProperties(Outage.Measurement cimMeasurement, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimMeasurement != null) && (rd != null))
            {
                OutageConverter.PopulateIdentifiedObjectProperties(cimMeasurement, rd);

                if (cimMeasurement.AddressHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.MEASUREMENT_ADDRESS, cimMeasurement.Address));
                }

                if (cimMeasurement.IsInputHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.MEASUREMENT_ISINPUT, cimMeasurement.IsInput));
                }

                if (cimMeasurement.TerminalHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimMeasurement.Terminal.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert ").Append(cimMeasurement.GetType().ToString()).Append(" rdfID: \"").Append(cimMeasurement.ID);
                        report.Report.Append("\" - Failed to set reference to Terminal: rdfID \"").Append(cimMeasurement.Terminal.ID).AppendLine(" \" is not mapped to GID!");
                    }

                    rd.AddProperty(new Property(ModelCode.MEASUREMENT_TERMINAL, gid));
                }
            }
        }
Example #9
0
        public static void PopulateBreakerProperties(Outage.Breaker cimBreaker, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimBreaker != null) && (rd != null))
            {
                OutageConverter.PopulateProtectedSwitchProperties(cimBreaker, rd, importHelper, report);

                if (cimBreaker.NoReclosingHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.BREAKER_NORECLOSING, cimBreaker.NoReclosing));
                }
            }
        }
Example #10
0
 public static void PopulateLoadBreakSwitchProperties(Outage.LoadBreakSwitch cimLoadBreakSwitch, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cimLoadBreakSwitch != null) && (rd != null))
     {
         OutageConverter.PopulateProtectedSwitchProperties(cimLoadBreakSwitch, rd, importHelper, report);
     }
 }
Example #11
0
 public static void PopulateACLineSegmentProperties(Outage.ACLineSegment cimACLineSegment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cimACLineSegment != null) && (rd != null))
     {
         OutageConverter.PopulateConductorProperties(cimACLineSegment, rd, importHelper, report);
     }
 }
Example #12
0
 public static void PopulateDisconnectorProperties(Outage.Disconnector cimDisconnector, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cimDisconnector != null) && (rd != null))
     {
         OutageConverter.PopulateSwitchProperties(cimDisconnector, rd, importHelper, report);
     }
 }
Example #13
0
 public static void PopulateFuseProperties(Outage.Fuse cimFuse, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cimFuse != null) && (rd != null))
     {
         OutageConverter.PopulateSwitchProperties(cimFuse, rd, importHelper, report);
     }
 }
Example #14
0
 public static void PopulateSwitchProperties(Outage.Switch cimSwitch, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cimSwitch != null) && (rd != null))
     {
         OutageConverter.PopulateConductingEquipmentProperties(cimSwitch, rd, importHelper, report);
     }
 }
Example #15
0
        public static void PopulateTransformerWindingProperties(Outage.TransformerWinding cimTransformerWinding, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimTransformerWinding != null) && (rd != null))
            {
                OutageConverter.PopulateConductingEquipmentProperties(cimTransformerWinding, rd, importHelper, report);

                if (cimTransformerWinding.PowerTransformerHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimTransformerWinding.PowerTransformer.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert").Append(cimTransformerWinding.GetType().ToString()).Append(" rdfID: \"").Append(cimTransformerWinding.ID);
                        report.Report.Append("\" - Failed to set reference to PowerTransformer: rdfID\"").Append(cimTransformerWinding.PowerTransformer.ID).AppendLine(" \" is not mapped to GID!");
                    }
                    rd.AddProperty(new Property(ModelCode.TRANSFORMERWINDING_POWERTRANSFORMER, gid));
                }
            }
        }