Exemple #1
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));
                }
            }
        }