Example #1
0
        private static void serialize()
        {
            using (EpcDocument epc_file = new EpcDocument("../../../TestingPackageCs.epc"))
                using (DataObjectRepository repo = new DataObjectRepository())
                {
                    LocalDepth3dCrs crs = repo.createLocalDepth3dCrs(Guid.NewGuid().ToString(), "UTF8 Crs title : éàç : олег1", 0.0, 0.0, 0.0, 0.0, eml20__LengthUom.eml20__LengthUom__m, 5215, eml20__LengthUom.eml20__LengthUom__m, "Unknown", false);
                    repo.setDefaultCrs(crs);
                    System.Console.WriteLine("Serialize : CRS title is " + crs.getTitle());
                    Well well = repo.createWell("1425632e-3c22-4845-b431-ecd36da0671e", "Well");
                    well.setNameLegal("Legal Name");
                    well.setWaterDepth(0.0, eml21__LengthUom.eml21__LengthUom__0_x002e1_x0020ft);
                    well.setTimeZone(true, 0);
                    System.Console.WriteLine("Serialize : Well title is " + well.getTitle());

                    // HdfProxy
                    AbstractHdfProxy hdfProxy = repo.createHdfProxy("", "Hdf Proxy", epc_file.getStorageDirectory(), epc_file.getName() + ".h5", DataObjectRepository.openingMode.OVERWRITE);
                    repo.setDefaultHdfProxy(hdfProxy);

                    // Features
                    WellboreFeature wellbore1 = repo.createWellboreFeature("22d5b48f-f789-46e7-a454-6d8bd05afd0b", "Wellbore1");

                    // Interpretations
                    WellboreInterpretation wellbore1Interp1 = repo.createWellboreInterpretation(wellbore1, "dc7840fe-e5a3-4b53-a1df-18040bc4d0c0", "Wellbore1 Interp1", false);

                    // Representation
                    f2i.energisticsStandardsApi.$ {
                        FESAPI_RESQML2_NS
                    }.MdDatum mdInfo = repo.createMdDatum("36e91de5-7833-4b6d-90d0-1d643c0adece", "md Info", repo.getDefaultCrs(), resqml20__MdReference.resqml20__MdReference__mean_x0020sea_x0020level, 275, 75, 0);
Example #2
0
 private static void serialize()
 {
     using (EpcDocument epc_file = new EpcDocument("../../../TestingPackageCs"))
     {
         LocalDepth3dCrs crs = epc_file.createLocalDepth3dCrs(Guid.NewGuid().ToString(), "UTF8 Crs title : éàç : олег1", 0.0, 0.0, 0.0, 0.0, eml__LengthUom.eml__LengthUom__m, 5215, eml__LengthUom.eml__LengthUom__m, "Unknown", false);
         epc_file.serialize();
         epc_file.close();
     }
 }
Example #3
0
 private static void serialize()
 {
     using (EpcDocument epc_file = new EpcDocument("../../../TestingPackageCs"))
     {
         LocalDepth3dCrs crs = epc_file.createLocalDepth3dCrs(Guid.NewGuid().ToString(), "UTF8 Crs title : éàç : олег1", 0.0, 0.0, 0.0, 0.0, eml20__LengthUom.eml20__LengthUom__m, 5215, eml20__LengthUom.eml20__LengthUom__m, "Unknown", false);
         System.Console.WriteLine("Serialize : CRS title is " + crs.getTitle());
         epc_file.serialize();
         epc_file.close();
     }
 }
Example #4
0
 private static void deserialize()
 {
     using (EpcDocument epc_file = new EpcDocument("../../../TestingPackageCs"))
     {
         string des_status             = epc_file.deserialize();
         LocalDepth3dCrsVector crs_set = epc_file.getLocalDepth3dCrsSet();
         System.Console.WriteLine("CRS title is " + crs_set[0].getTitle());
         epc_file.close();
         System.Console.WriteLine("Press enter to exit");
         System.Console.ReadLine();
     }
 }
Example #5
0
 private static void deserialize()
 {
     using (EpcDocument epc_file = new EpcDocument("../../../TestingPackageCs"))
     {
         string status = epc_file.deserialize();
         if (status.Length > 0)
         {
             System.Console.WriteLine(status);
         }
         LocalDepth3dCrsVector crs_set = epc_file.getLocalDepth3dCrsSet();
         System.Console.WriteLine("Deserialize : CRS title is " + crs_set[0].getTitle());
     }
 }
Example #6
0
        private static void serialize()
        {
            using (EpcDocument epc_file = new EpcDocument("../../../TestingPackageCs.epc"))
            {
                LocalDepth3dCrs crs = epc_file.createLocalDepth3dCrs(Guid.NewGuid().ToString(), "UTF8 Crs title : éàç : олег1", 0.0, 0.0, 0.0, 0.0, eml20__LengthUom.eml20__LengthUom__m, 5215, eml20__LengthUom.eml20__LengthUom__m, "Unknown", false);
                System.Console.WriteLine("Serialize : CRS title is " + crs.getTitle());
                Well well = epc_file.createWell("1425632e-3c22-4845-b431-ecd36da0671e", "Well");
                well.setNameLegal("Legal Name");
                well.setWaterDepth(0.0, eml21__LengthUom.eml21__LengthUom__0_x002e1_x0020ft);
                well.setTimeZone(true, 0);

                System.Console.WriteLine("Serialize : Well title is " + well.getTitle());
                epc_file.serialize();
                epc_file.close();
            }
        }
Example #7
0
 private static void deserialize()
 {
     using (EpcDocument epc_file = new EpcDocument("../../../TestingPackageCs.epc"))
     {
         string status = epc_file.deserialize();
         if (status.Length > 0)
         {
             System.Console.WriteLine("Warnings are " + status);
         }
         LocalDepth3dCrsVector crs_set = epc_file.getLocalDepth3dCrsSet();
         System.Console.WriteLine("Deserialize : CRS title is " + crs_set[0].getTitle());
         Well well = epc_file.getDataObjectByUuid("1425632e-3c22-4845-b431-ecd36da0671e") as Well;
         System.Console.WriteLine("Deserialize : Well title is " + well.getTitle());
         System.Console.WriteLine("\tnameLegal : " + well.getNameLegal());
         System.Console.WriteLine("\twaterDepth : " + well.getWaterDepthValue() + " (" + well.getWaterDepthUom() + ")");
         if (well.hasTimeZone())
         {
             System.Console.WriteLine("\ttimeZone : " + well.getTimeZoneHours() + " hours");
         }
     }
 }