public static void PopulateACLineSegmentProperties(FTN.ACLineSegment cimACLineSegment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimACLineSegment != null) && (rd != null)) { PowerTransformerConverter.PopulateConductorProperties(cimACLineSegment, rd, importHelper, report); if (cimACLineSegment.RatedCurrentHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_CURRENTFLOW, cimACLineSegment.RatedCurrent)); } if (cimACLineSegment.FeederCableHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_FEEDERCABLE, cimACLineSegment.FeederCable)); } if (cimACLineSegment.EquipmentContainerHasValue) { long gid = importHelper.GetMappedGID(cimACLineSegment.EquipmentContainer.ID); if (gid < 0) { report.Report.Append("WARNING: Convert ").Append(cimACLineSegment.GetType().ToString()).Append(" rdfID = \"").Append(cimACLineSegment.ID); report.Report.Append("\" - Failed to set reference to EquipmentContainer: rdfID \"").Append(cimACLineSegment.EquipmentContainer.ID).AppendLine(" \" is not mapped to GID!"); } rd.AddProperty(new Property(ModelCode.EQUIPMENT_CONTAINER, gid)); } } }
public static void PopulateACLineSegmentProperties(FTN.ACLineSegment cimACLineSeg, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimACLineSeg != null) && (rd != null)) { OMSConverter.PopulateConductorProperties(cimACLineSeg, rd, importHelper, report); } }
private void ImportACLineSegments() { SortedDictionary <string, object> cimACLineSegmetns = concreteModel.GetAllObjectsOfType("FTN.ACLineSegment"); if (cimACLineSegmetns != null) { foreach (KeyValuePair <string, object> cimACLineSegmentPair in cimACLineSegmetns) { FTN.ACLineSegment cimACLineSegment = cimACLineSegmentPair.Value as FTN.ACLineSegment; ResourceDescription rd = CreateACLineSegmentResourceDecription(cimACLineSegment); if (rd != null) { delta.AddDeltaOperation(DeltaOpType.Insert, rd, true); report.Report.Append("ACLineSegment ID = ").Append(cimACLineSegment.ID).Append(" SUCCESSFULLY converted to GID = ").AppendLine(rd.Id.ToString()); } else { report.Report.Append("ACLineSegment ID = ").Append(cimACLineSegment.ID).AppendLine(" FAILED to be converted"); } } report.Report.AppendLine(); } }
public static void PopulateACLineSegmentProperties(FTN.ACLineSegment cimACLineSegment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimACLineSegment != null) && (rd != null)) { PowerTransformerConverter.PopulateConductorProperties(cimACLineSegment, rd, importHelper, report); if (cimACLineSegment.B0chHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESGMNT_B0CH, cimACLineSegment.B0ch)); } if (cimACLineSegment.BchHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESGMNT_BCH, cimACLineSegment.Bch)); } if (cimACLineSegment.G0chHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESGMNT_G0CH, cimACLineSegment.G0ch)); } if (cimACLineSegment.GchHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESGMNT_GCH, cimACLineSegment.Gch)); } if (cimACLineSegment.RHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESGMNT_R, cimACLineSegment.R)); } if (cimACLineSegment.R0HasValue) { rd.AddProperty(new Property(ModelCode.ACLINESGMNT_R0, cimACLineSegment.R0)); } if (cimACLineSegment.XHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESGMNT_X, cimACLineSegment.X)); } if (cimACLineSegment.X0HasValue) { rd.AddProperty(new Property(ModelCode.ACLINESGMNT_X0, cimACLineSegment.X0)); } if (cimACLineSegment.PerLengthImpedanceHasValue) { long gid = importHelper.GetMappedGID(cimACLineSegment.PerLengthImpedance.ID); if (gid < 0) { report.Report.Append("WARNING: Convert ").Append(cimACLineSegment.GetType().ToString()).Append(" rdfID = \"").Append(cimACLineSegment.ID); report.Report.Append("\" - Failed to set reference to PerLengthImpedance: rdfID \"").Append(cimACLineSegment.PerLengthImpedance.ID).AppendLine(" \" is not mapped to GID!"); } rd.AddProperty(new Property(ModelCode.ACLINESGMNT_PERLGTHIMPDNC, gid)); } } }
private ResourceDescription CreateACLineSegmentResourceDescription(FTN.ACLineSegment cimACLineSegment) { ResourceDescription rd = null; if (cimACLineSegment != null) { long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.ACLINESEGMENT, importHelper.CheckOutIndexForDMSType(DMSType.ACLINESEGMENT)); rd = new ResourceDescription(gid); importHelper.DefineIDMapping(cimACLineSegment.ID, gid); ////populate ResourceDescription PowerTransformerConverter.PopulateACLineSegmentProperties(cimACLineSegment, rd, importHelper, report); } return(rd); }
public static void PopulateACLineSegmentProperties(FTN.ACLineSegment cimACLineSegment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimACLineSegment != null) && (rd != null)) { PowerTransformerConverter.PopulateConductorProperties(cimACLineSegment, rd, importHelper, report); if (cimACLineSegment.RHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_R, cimACLineSegment.R)); } if (cimACLineSegment.R0HasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_R0, cimACLineSegment.R0)); } if (cimACLineSegment.XHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_X, cimACLineSegment.X)); } if (cimACLineSegment.X0HasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_X0, cimACLineSegment.X0)); } if (cimACLineSegment.BchHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_BCH, cimACLineSegment.Bch)); } if (cimACLineSegment.B0chHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_B0CH, cimACLineSegment.B0ch)); } if (cimACLineSegment.GchHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_GCH, cimACLineSegment.Gch)); } if (cimACLineSegment.G0chHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_G0CH, cimACLineSegment.G0ch)); } } }
public static void PopulateACLineSegmentProperties(FTN.ACLineSegment cimACLineSegment, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((cimACLineSegment != null) && (rd != null)) { PowerTransformerConverter.PopulateConductorProperties(cimACLineSegment, rd, importHelper, report); if (cimACLineSegment.RatedCurrentHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_CURRENTFLOW, cimACLineSegment.RatedCurrent)); } if (cimACLineSegment.FeederCableHasValue) { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_FEEDERCABLE, cimACLineSegment.FeederCable)); } } }
public static void PopulateACLineSegmentProperties(FTN.ACLineSegment cimACLineSegment, ResourceDescription rd) { if ((cimACLineSegment != null) && (rd != null)) { //popuni propertije prethodne klase PowerTransformerConverter.PopulateConductorProperties(cimACLineSegment, rd); if (cimACLineSegment.B0chHasValue) //1. { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_B0CH, cimACLineSegment.B0ch)); } if (cimACLineSegment.BchHasValue) //2. { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_BCH, cimACLineSegment.Bch)); } if (cimACLineSegment.G0chHasValue) //3. { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_G0CH, cimACLineSegment.G0ch)); } if (cimACLineSegment.GchHasValue) //4. { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_GCH, cimACLineSegment.Gch)); } if (cimACLineSegment.RHasValue) //5. { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_R, cimACLineSegment.R)); } if (cimACLineSegment.R0HasValue) //6. { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_R0, cimACLineSegment.R0)); } if (cimACLineSegment.XHasValue) //7. { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_X, cimACLineSegment.X)); } if (cimACLineSegment.X0HasValue) //8. { rd.AddProperty(new Property(ModelCode.ACLINESEGMENT_X0, cimACLineSegment.X0)); } } }