示例#1
0
 public static void PopulateConnectivityNodeContainerProperties(FTN.ConnectivityNodeContainer cimConnNCon, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((cimConnNCon != null) && (rd != null))
     {
         OMSConverter.PopulatePowerSystemResourceProperties(cimConnNCon, rd, importHelper, report);
     }
 }
示例#2
0
 public static void PopulateConnectivityNodeContainerProperties(FTN.ConnectivityNodeContainer cimConnectivityNodeContainer, ResourceDescription rd)
 {
     if ((cimConnectivityNodeContainer != null) && (rd != null))
     {
         //popuni propertije prethodne klase
         PowerTransformerConverter.PopulatePowerSystemResourceProperties(cimConnectivityNodeContainer, rd);
     }
 }
示例#3
0
        private ResourceDescription CreateConnNodeContResourceDescription(FTN.ConnectivityNodeContainer cimCNC)
        {
            ResourceDescription rd = null;

            if (cimCNC != null)
            {
                long gid = ModelCodeHelper.CreateGlobalId(0, (short)DMSType.CONNECTNODECONT, importHelper.CheckOutIndexForDMSType(DMSType.CONNECTNODECONT));
                rd = new ResourceDescription(gid);
                importHelper.DefineIDMapping(cimCNC.ID, gid);

                ////populate ResourceDescription
                OMSConverter.PopulateConnectivityNodeContainerProperties(cimCNC, rd, importHelper, report);
            }
            return(rd);
        }
示例#4
0
        private void ImportConnectNodeCount()
        {
            SortedDictionary <string, object> cimConnNodeCont = concreteModel.GetAllObjectsOfType("FTN.ConnectivityNodeContainer");

            if (cimConnNodeCont != null)
            {
                foreach (KeyValuePair <string, object> cimConnNodeContPair in cimConnNodeCont)
                {
                    FTN.ConnectivityNodeContainer cimCNC = cimConnNodeContPair.Value as FTN.ConnectivityNodeContainer;

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

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

                ////populate ResourceDescription
                PowerTransformerConverter.PopulateConnectivityNodeContainerProperties(cimConnectivityNodeContainer, rd);
            }
            return(rd);
        }