Exemple #1
0
 public static void PopulatePowerSystemResourceProperties(FTN.PowerSystemResource cimPowerSystemResource, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cimPowerSystemResource != null) && (rd != null))
     {
         PowerTransformerConverter.PopulateIdentifiedObjectProperties(cimPowerSystemResource, rd);
     }
 }
Exemple #2
0
 public static void PopulatePowerSystemResourceProperties(FTN.PowerSystemResource cimPowerSystemResource, ResourceDescription rd)
 {
     if ((cimPowerSystemResource != null) && (rd != null))
     {
         IES1Converter.PopulateIdentifiedObjectProperties(cimPowerSystemResource, rd);
     }
 }
        public static void PopulatePowerSystemResourceProperties(FTN.PowerSystemResource cimPowerSystemResource, ResourceDescription rd, ImportHelper importHelper)
        {
            if ((cimPowerSystemResource != null) && (rd != null))
            {
                PowerTransformerConverter.PopulateIdentifiedObjectProperties(cimPowerSystemResource, rd);

                if (cimPowerSystemResource.CustomTypeHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PSR_CUSTOMTYPE, cimPowerSystemResource.CustomType));
                }
                if (cimPowerSystemResource.LocationHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimPowerSystemResource.Location.ID);
                    rd.AddProperty(new Property(ModelCode.PSR_LOCATION, gid));
                }
            }
        }
Exemple #4
0
        public static void PopulatePowerSystemResourceProperties(FTN.PowerSystemResource cimPowerSystemResource, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((cimPowerSystemResource != null) && (rd != null))
            {
                PowerTransformerConverter.PopulateIdentifiedObjectProperties(cimPowerSystemResource, rd);

                if (cimPowerSystemResource.CustomTypeHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.PSR_CUSTOMTYPE, cimPowerSystemResource.CustomType));
                }
                if (cimPowerSystemResource.LocationHasValue)
                {
                    long gid = importHelper.GetMappedGID(cimPowerSystemResource.Location.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert ").Append(cimPowerSystemResource.GetType().ToString()).Append(" rdfID = \"").Append(cimPowerSystemResource.ID);
                        report.Report.Append("\" - Failed to set reference to Location: rdfID \"").Append(cimPowerSystemResource.Location.ID).AppendLine(" \" is not mapped to GID!");
                    }
                    rd.AddProperty(new Property(ModelCode.PSR_LOCATION, gid));
                }
            }
        }