示例#1
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));
                }
            }
        }
示例#2
0
 public static void PopulateGeographicalRegionProperties(DERMS.GeographicalRegion cimGeographicalRegion, ResourceDescription rd)
 {
     if ((cimGeographicalRegion != null) && (rd != null))
     {
         DERMSConveter.PopulateIdentifiedObjectProperties(cimGeographicalRegion, rd);
     }
 }
示例#3
0
 public static void PopulatePowerSystemResourceProperties(DERMS.PowerSystemResource cimPowerSystemResource, ResourceDescription rd)
 {
     if ((cimPowerSystemResource != null) && (rd != null))
     {
         DERMSConveter.PopulateIdentifiedObjectProperties(cimPowerSystemResource, rd);
     }
 }
示例#4
0
 public static void PopulateAORAgAggregatorProperties(DERMS.AOR_AGAggregator cimAORAgAggregator, ResourceDescription rd)
 {
     if ((cimAORAgAggregator != null) && (rd != null))
     {
         DERMSConveter.PopulateIdentifiedObjectProperties(cimAORAgAggregator, rd);
     }
 }
示例#5
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));
                }
            }
        }
示例#6
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));
                }
            }
        }
示例#7
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));
                }
            }
        }
示例#8
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));
                }
            }
        }