Exemplo n.º 1
0
 public static void PopulateConnectivityNodeContainerProperties(ConnectivityNodeContainer cnc, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cnc != null) && (rd != null))
     {
         PowerTransformerConverter.PopulatePowerSystemResourceProperties(cnc, rd, importHelper, report);
     }
 }
Exemplo n.º 2
0
 public static void PopulateConnectivityNodeContainerProperties(ConnectivityNodeContainer cimConnectivityNodeContainer, ResourceDescription rd)
 {
     if ((cimConnectivityNodeContainer != null) && (rd != null))
     {
         IES21Converter.PopulateIdentifiedObjectProperties(cimConnectivityNodeContainer, rd);
     }
 }
        private void ImportConnectivityNodeContainers()
        {
            SortedDictionary <string, object> cimConnectivityNodeContainers = concreteModel.GetAllObjectsOfType("FTN.ConnectivityNodeContainer");

            if (cimConnectivityNodeContainers != null)
            {
                foreach (KeyValuePair <string, object> cimConnectivityNodeContainerPair in cimConnectivityNodeContainers)
                {
                    ConnectivityNodeContainer cimConnectivityNodeContainer = cimConnectivityNodeContainerPair.Value as ConnectivityNodeContainer;

                    ResourceDescription rd = CreateConnectivityNodeContainerResourceDescription(cimConnectivityNodeContainer);
                    if (rd != null)
                    {
                        delta.AddDeltaOperation(DeltaOpType.Insert, rd, true);
                        report.Report.Append("ConnectivityNodeContainer ID = ").Append(cimConnectivityNodeContainer.ID).Append(" SUCCESSFULLY converted to GID = ").AppendLine(rd.Id.ToString());
                    }
                    else
                    {
                        report.Report.Append("ConnectivityNodeContainer ID = ").Append(cimConnectivityNodeContainer.ID).AppendLine(" FAILED to be converted");
                    }
                }
                report.Report.AppendLine();
            }
        }
        private ResourceDescription CreateConnectivityNodeContainerResourceDescription(ConnectivityNodeContainer cimConnectivityNodeContainer)
        {
            ResourceDescription rd = null;

            if (cimConnectivityNodeContainer != null)
            {
                long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.CONNECTNODECONTAINER, importHelper.CheckOutIndexForDMSType(DMSType.CONNECTNODECONTAINER));
                rd = new ResourceDescription(gid);

                importHelper.DefineIDMapping(cimConnectivityNodeContainer.ID, gid);

                IES21Converter.PopulateConnectivityNodeContainerProperties(cimConnectivityNodeContainer, rd);
            }
            return(rd);
        }