Exemplo n.º 1
0
        public static void PopulateSynchronousMachineProperties(DERMS.SynchronousMachine cimSynchronousMachine, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimSynchronousMachine != null) && (rd != null))
            {
                DERMSConveter.PopulateRotatingMachineProperties(cimSynchronousMachine, rd, importHelper, report);

                if (cimSynchronousMachine.BaseQHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCMACHINE_BASEQ, cimSynchronousMachine.BaseQ));
                }
                if (cimSynchronousMachine.MinQHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCMACHINE_MINQ, cimSynchronousMachine.MinQ));
                }
                if (cimSynchronousMachine.MaxQHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCMACHINE_MAXQ, cimSynchronousMachine.MaxQ));
                }
                if (cimSynchronousMachine.MinPHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCMACHINE_MINP, cimSynchronousMachine.MinP));
                }
                if (cimSynchronousMachine.MaxPHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCMACHINE_MAXP, cimSynchronousMachine.MaxP));
                }
            }
        }
Exemplo n.º 2
0
        public static void PopulateSubstationProperties(DERMS.Substation cimSubstation, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimSubstation != null) && (rd != null))
            {
                DERMSConveter.PopulateEquipmentContainerProperties(cimSubstation, rd, importHelper, report);

                if (cimSubstation.LatitudeHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SUBSTATION_LATITUDE, cimSubstation.Latitude));
                }
                if (cimSubstation.LongitudeHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SUBSTATION_LONGITUDE, cimSubstation.Longitude));
                }

                if (cimSubstation.RegionHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimSubstation.Region.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert ").Append(cimSubstation.GetType().ToString()).Append(" rdfID = \"").Append(cimSubstation.ID);
                        report.Report.Append("\" - Failed to set reference to Equipment: rdfID \"").Append(cimSubstation.Region.ID).AppendLine(" \" is not mapped to GID!");
                    }
                    rd.AddProperty(new Property(ModelCode.SUBSTATION_SUBREGION, gid));
                }
            }
        }
Exemplo n.º 3
0
        public static void PopulateRotatingMachineProperties(DERMS.RotatingMachine cimRotatingMachine, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimRotatingMachine != null) && (rd != null))
            {
                DERMSConveter.PopulateRegulatingConductingEqProperties(cimRotatingMachine, rd, importHelper, report);

                if (cimRotatingMachine.FuelTypeHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ROTATINGMACHINE_FUELTYPE, (short)GetDMSFuelType(cimRotatingMachine.FuelType)));
                }
                if (cimRotatingMachine.RatedSHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ROTATINGMACHINE_RATEDS, cimRotatingMachine.RatedS));
                }
                if (cimRotatingMachine.NominalPHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ROTATINGMACHINE_NOMINALP, cimRotatingMachine.NominalP));
                }
                if (cimRotatingMachine.NominalQHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ROTATINGMACHINE_NOMINALQ, cimRotatingMachine.NominalQ));
                }
                if (cimRotatingMachine.DERFlexibilityPHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ROTATINGMACHINE_DERFLEXIBILITYP, cimRotatingMachine.DERFlexibilityP));
                }
                if (cimRotatingMachine.DERFlexibilityQHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.ROTATINGMACHINE_DERFLEXIBILITYQ, cimRotatingMachine.DERFlexibilityQ));
                }
            }
        }
Exemplo n.º 4
0
 public static void PopulateAORAgAggregatorProperties(DERMS.AOR_AGAggregator cimAORAgAggregator, ResourceDescription rd)
 {
     if ((cimAORAgAggregator != null) && (rd != null))
     {
         DERMSConveter.PopulateIdentifiedObjectProperties(cimAORAgAggregator, rd);
     }
 }
Exemplo n.º 5
0
 public static void PopulateGeographicalRegionProperties(DERMS.GeographicalRegion cimGeographicalRegion, ResourceDescription rd)
 {
     if ((cimGeographicalRegion != null) && (rd != null))
     {
         DERMSConveter.PopulateIdentifiedObjectProperties(cimGeographicalRegion, rd);
     }
 }
Exemplo n.º 6
0
 public static void PopulatePowerSystemResourceProperties(DERMS.PowerSystemResource cimPowerSystemResource, ResourceDescription rd)
 {
     if ((cimPowerSystemResource != null) && (rd != null))
     {
         DERMSConveter.PopulateIdentifiedObjectProperties(cimPowerSystemResource, rd);
     }
 }
Exemplo n.º 7
0
 public static void PopulateEquipmentContainerProperties(DERMS.EquipmentContainer cimEquipmentContainer, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cimEquipmentContainer != null) && (rd != null))
     {
         DERMSConveter.PopulateConnectivityNodeContainerProperties(cimEquipmentContainer, rd, importHelper, report);
     }
 }
Exemplo n.º 8
0
        public static void PopulateMeasurementValueProperties(DERMS.MeasurementValue cimWMeasurementValue, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimWMeasurementValue != null) && (rd != null))
            {
                DERMSConveter.PopulateIdentifiedObjectProperties(cimWMeasurementValue, rd);

                if (cimWMeasurementValue.TimeStampHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.MEASUREMENTVALUE_TIMESTAMP, cimWMeasurementValue.TimeStamp.Ticks));
                }

                if (cimWMeasurementValue.PowerTypeHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.MEASUREMENTVALUE_POWERTYPE, (short)cimWMeasurementValue.PowerType));
                }

                if (cimWMeasurementValue.AddressHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.MEASUREMENTVALUE_ADDRESS, cimWMeasurementValue.Address));
                }

                if (cimWMeasurementValue.SynchronousMachineHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimWMeasurementValue.SynchronousMachine.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert ").Append(cimWMeasurementValue.GetType().ToString()).Append(" rdfID = \"").Append(cimWMeasurementValue.ID);
                        report.Report.Append("\" - Failed to set reference to MeasurementValue: rdfID \"").Append(cimWMeasurementValue.SynchronousMachine.ID).AppendLine(" \" is not mapped to GID!");
                    }
                    rd.AddProperty(new Property(ModelCode.MEASUREMENTVALUE_SYNCMACHINE, gid));
                }
            }
        }
Exemplo n.º 9
0
 public static void PopulateRegulatingConductingEqProperties(DERMS.RegulatingCondEq cimRegulatingConductingEq, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cimRegulatingConductingEq != null) && (rd != null))
     {
         DERMSConveter.PopulateConductingEquipmentProperties(cimRegulatingConductingEq, rd, importHelper, report);
     }
 }
Exemplo n.º 10
0
        public static void PopulateDiscreteValueProperties(DERMS.DiscreteValue cimDiscreteValue, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimDiscreteValue != null) && (rd != null))
            {
                DERMSConveter.PopulateMeasurementValueProperties(cimDiscreteValue, rd, importHelper, report);

                if (cimDiscreteValue.ValueHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.DISCRETEVALUE_VALUE, cimDiscreteValue.Value));
                }
            }
        }
Exemplo n.º 11
0
        private ResourceDescription CreateSynchronousMachineResourceDescription(DERMS.SynchronousMachine cimSynchronousMachine)
        {
            ResourceDescription rd = null;

            if (cimSynchronousMachine != null)
            {
                long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.SYNCMACHINE, importHelper.CheckOutIndexForDMSType(DMSType.SYNCMACHINE));
                rd = new ResourceDescription(gid);
                importHelper.DefineIDMapping(cimSynchronousMachine.ID, gid);

                ////populate ResourceDescription
                DERMSConveter.PopulateSynchronousMachineProperties(cimSynchronousMachine, rd, importHelper, report);
            }
            return(rd);
        }
Exemplo n.º 12
0
        private ResourceDescription CreateAORAgAggregatorResourceDescription(DERMS.AOR_AGAggregator cimAOR_AGAggregator)
        {
            ResourceDescription rd = null;

            if (cimAOR_AGAggregator != null)
            {
                long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.AOR_AGAGGREGATOR, importHelper.CheckOutIndexForDMSType(DMSType.AOR_AGAGGREGATOR));
                rd = new ResourceDescription(gid);
                importHelper.DefineIDMapping(cimAOR_AGAggregator.ID, gid);

                ////populate ResourceDescription
                DERMSConveter.PopulateAORAgAggregatorProperties(cimAOR_AGAggregator, rd);
            }
            return(rd);
        }
Exemplo n.º 13
0
        private ResourceDescription CreateAnalogValueResourceDescription(DERMS.AORUser cimAORUser)
        {
            ResourceDescription rd = null;

            if (cimAORUser != null)
            {
                long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.AOR_USER, importHelper.CheckOutIndexForDMSType(DMSType.AOR_USER));
                rd = new ResourceDescription(gid);
                importHelper.DefineIDMapping(cimAORUser.ID, gid);

                ////populate ResourceDescription
                DERMSConveter.PopulateAORUserProperties(cimAORUser, rd, importHelper, report);
            }
            return(rd);
        }
Exemplo n.º 14
0
        private ResourceDescription CreateAORGroupsDescription(DERMS.AORGroup cimAORGroup)
        {
            ResourceDescription rd = null;

            if (cimAORGroup != null)
            {
                long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.AOR_GROUP, importHelper.CheckOutIndexForDMSType(DMSType.AOR_GROUP));
                rd = new ResourceDescription(gid);
                importHelper.DefineIDMapping(cimAORGroup.ID, gid);

                ////populate ResourceDescription
                DERMSConveter.PopulateAORGroupProperties(cimAORGroup, rd, importHelper, report);
            }
            return(rd);
        }
Exemplo n.º 15
0
        private ResourceDescription CreateDiscreteValueResourceDescription(DERMS.DiscreteValue cimDiscretValue)
        {
            ResourceDescription rd = null;

            if (cimDiscretValue != null)
            {
                long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.DISCRETEVALUE, importHelper.CheckOutIndexForDMSType(DMSType.DISCRETEVALUE));
                rd = new ResourceDescription(gid);
                importHelper.DefineIDMapping(cimDiscretValue.ID, gid);

                ////populate ResourceDescription
                DERMSConveter.PopulateDiscreteValueProperties(cimDiscretValue, rd, importHelper, report);
            }
            return(rd);
        }
Exemplo n.º 16
0
        private ResourceDescription CreateSubstationResourceDescription(DERMS.Substation cimSubstation)
        {
            ResourceDescription rd = null;

            if (cimSubstation != null)
            {
                long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.SUBSTATION, importHelper.CheckOutIndexForDMSType(DMSType.SUBSTATION));
                rd = new ResourceDescription(gid);
                importHelper.DefineIDMapping(cimSubstation.ID, gid);

                ////populate ResourceDescription
                DERMSConveter.PopulateSubstationProperties(cimSubstation, rd, importHelper, report);
            }
            return(rd);
        }
Exemplo n.º 17
0
        public static void PopulateAORUserProperties(DERMS.AORUser cimAORUser, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimAORUser != null) && (rd != null))
            {
                DERMSConveter.PopulateIdentifiedObjectProperties(cimAORUser, rd);

                if (cimAORUser.ViewAreasHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.AOR_USER_VIEWAREAS, cimAORUser.ViewAreas));
                }
                if (cimAORUser.ControlAreasHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.AOR_USER_CONTROLAREAS, cimAORUser.ControlAreas));
                }
            }
        }
Exemplo n.º 18
0
        public static void PopulateEquipmentProperties(DERMS.Equipment cimEquipment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimEquipment != null) && (rd != null))
            {
                DERMSConveter.PopulatePowerSystemResourceProperties(cimEquipment, rd);

                if (cimEquipment.EquipmentContainerHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimEquipment.EquipmentContainer.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert ").Append(cimEquipment.GetType().ToString()).Append(" rdfID = \"").Append(cimEquipment.ID);
                        report.Report.Append("\" - Failed to set reference to Equipment: rdfID \"").Append(cimEquipment.EquipmentContainer.ID).AppendLine(" \" is not mapped to GID!");
                    }
                    rd.AddProperty(new Property(ModelCode.EQUIPMENT_EQCONTAINER, gid));
                }
            }
        }
Exemplo n.º 19
0
        public static void PopulateSubGeographicalRegionProperties(DERMS.SubGeographicalRegion cimSubGeographicalRegion, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimSubGeographicalRegion != null) && (rd != null))
            {
                DERMSConveter.PopulateIdentifiedObjectProperties(cimSubGeographicalRegion, rd);

                if (cimSubGeographicalRegion.RegionHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimSubGeographicalRegion.Region.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert ").Append(cimSubGeographicalRegion.GetType().ToString()).Append(" rdfID = \"").Append(cimSubGeographicalRegion.ID);
                        report.Report.Append("\" - Failed to set reference to SubGeographicalRegion: rdfID \"").Append(cimSubGeographicalRegion.Region.ID).AppendLine(" \" is not mapped to GID!");
                    }
                    rd.AddProperty(new Property(ModelCode.SUBREGION_REGION, gid));
                }
            }
        }
Exemplo n.º 20
0
        public static void PopulateAORAreaProperties(DERMS.AORArea cimAORArea, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimAORArea != null) && (rd != null))
            {
                DERMSConveter.PopulateIdentifiedObjectProperties(cimAORArea, rd);

                if (cimAORArea.IsControlableHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.AOR_AREA_CONTROLLABLE, cimAORArea.IsControlable));
                }
                if (cimAORArea.IsViewableHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.AOR_AREA_VIEWABLE, cimAORArea.IsViewable));
                }
                if (cimAORArea.CoveredByHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.AOR_AREA_COVEREDBY, cimAORArea.CoveredBy));
                }

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

                if (cimAORArea.AOR_AGAggregatorHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimAORArea.AOR_AGAggregator.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert ").Append(cimAORArea.GetType().ToString()).Append(" rdfID = \"").Append(cimAORArea.ID);
                        report.Report.Append("\" - Failed to set reference to AORArea: rdfID \"").Append(cimAORArea.AOR_AGAggregator.ID).AppendLine(" \" is not mapped to GID!");
                    }
                    rd.AddProperty(new Property(ModelCode.AOR_AREA_AGGREGATOR, gid));
                }
            }
        }
Exemplo n.º 21
0
        public static void PopulateSynchronousMachineProperties(DERMS.SynchronousMachine cimSynchronousMachine, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimSynchronousMachine != null) && (rd != null))
            {
                DERMSConveter.PopulateRotatingMachineProperties(cimSynchronousMachine, rd, importHelper, report);

                if (cimSynchronousMachine.BaseQHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCMACHINE_BASEQ, cimSynchronousMachine.BaseQ));
                }
                if (cimSynchronousMachine.MinQHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCMACHINE_MINQ, cimSynchronousMachine.MinQ));
                }
                if (cimSynchronousMachine.MaxQHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCMACHINE_MAXQ, cimSynchronousMachine.MaxQ));
                }
                if (cimSynchronousMachine.MinPHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCMACHINE_MINP, cimSynchronousMachine.MinP));
                }
                if (cimSynchronousMachine.MaxPHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.SYNCMACHINE_MAXP, cimSynchronousMachine.MaxP));
                }
                if (cimSynchronousMachine.AORGroupHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimSynchronousMachine.AORGroup.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert ").Append(cimSynchronousMachine.GetType().ToString()).Append(" rdfID = \"").Append(cimSynchronousMachine.ID);
                        report.Report.Append("\" - Failed to set reference to SynchronousMachine: rdfID \"").Append(cimSynchronousMachine.AORGroup.ID).AppendLine(" \" is not mapped to GID!");
                    }
                    rd.AddProperty(new Property(ModelCode.SYNCMACHINE_AORGROUP, gid));
                }
            }
        }
Exemplo n.º 22
0
        public static void PopulateAORGroupProperties(DERMS.AORGroup cimAORGroup, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimAORGroup != null) && (rd != null))
            {
                DERMSConveter.PopulateIdentifiedObjectProperties(cimAORGroup, rd);

                if (cimAORGroup.IsCoveredHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.AOR_GROUP_COVERED, cimAORGroup.IsCovered));
                }

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