@@ -32,6 +32,7 @@ Licensed to the Apache Software Foundation (ASF) under one
3232import com .f2i_consulting .fesapi .eml23__IndexableElement ;
3333import com .f2i_consulting .fesapi .eml23__LengthUom ;
3434import com .f2i_consulting .fesapi .eml23__MassPerLengthUom ;
35+ import com .f2i_consulting .fesapi .eml23__QuantityClassKind ;
3536import com .f2i_consulting .fesapi .eml23__ReferencePointKind ;
3637import com .f2i_consulting .fesapi .eml23__WellStatus ;
3738import com .f2i_consulting .fesapi .fesapi ;
@@ -52,6 +53,7 @@ Licensed to the Apache Software Foundation (ASF) under one
5253import com .f2i_consulting .fesapi .common .EpcDocument ;
5354import com .f2i_consulting .fesapi .eml2 .AbstractHdfProxy ;
5455import com .f2i_consulting .fesapi .eml2 .AbstractLocal3dCrs ;
56+ import com .f2i_consulting .fesapi .eml2 .ColumnBasedTable ;
5557import com .f2i_consulting .fesapi .eml2 .GraphicalInformationSet ;
5658import com .f2i_consulting .fesapi .eml2 .PropertyKind ;
5759import com .f2i_consulting .fesapi .eml2_3 .Eml23_LocalEngineeringCompoundCrs ;
@@ -655,6 +657,84 @@ private static void serializeGraphicalInformationSet(DataObjectRepository repo,
655657 graphicalInformationSet .setContinuousColorMap (contColMapContProp , contColMap );
656658 }
657659$ {COMMENT_END }
660+ private static void serializeColumnBasedTable (DataObjectRepository repo )
661+ {
662+ ColumnBasedTable cbt = repo .createColumnBasedTable ("866841eb-0c56-4b7d-96d6-f15f385deaf9" , "KrPc" );
663+
664+ PropertyKind pwls3Saturation = repo .createPropertyKind ("cfe9293f-d5a9-486d-815a-a957cace90b6" , "saturation" , eml23__QuantityClassKind .dimensionless );
665+ PropertyKind pwls3RelPerm = repo .createPropertyKind ("8e3c5579-7efd-40d0-ab03-bc79452dd2db" , "relative permeability" , eml23__QuantityClassKind .unitless );
666+ PropertyKind pwls3CapPressure = repo .createPropertyKind ("a816a113-1544-4f58-bc6d-7c030b65627b" , "capillary pressure" , eml23__QuantityClassKind .pressure );
667+
668+ cbt .pushBackColumnHeader (true , "Water Saturation" , pwls3Saturation );
669+ cbt .pushBackColumnHeader (false , "Water Relative Permeability" , pwls3RelPerm );
670+ cbt .pushBackColumnHeader (false , "Oil Relative Permeability" , pwls3RelPerm );
671+ cbt .pushBackColumnHeader (false , "Oil Water Capillary Pressure" , pwls3CapPressure );
672+
673+ SWIGTYPE_p_double watSat = fesapi .new_DoubleArray (7 );
674+ try {
675+ fesapi .DoubleArray_setitem (watSat , 0 , 0 );
676+ fesapi .DoubleArray_setitem (watSat , 1 , 0.157 );
677+ fesapi .DoubleArray_setitem (watSat , 2 , 0.173 );
678+ fesapi .DoubleArray_setitem (watSat , 3 , 0.174325 );
679+ fesapi .DoubleArray_setitem (watSat , 4 , 0.19 );
680+ fesapi .DoubleArray_setitem (watSat , 5 , 0.19165 );
681+ fesapi .DoubleArray_setitem (watSat , 6 , 0.207 );
682+
683+ cbt .setDoubleValues (0 , watSat , 7 );
684+ }
685+ finally {
686+ fesapi .delete_DoubleArray (watSat );
687+ }
688+
689+ SWIGTYPE_p_double watRelPerm = fesapi .new_DoubleArray (7 );
690+ try {
691+ fesapi .DoubleArray_setitem (watRelPerm , 0 , 0 );
692+ fesapi .DoubleArray_setitem (watRelPerm , 1 , 0 );
693+ fesapi .DoubleArray_setitem (watRelPerm , 2 , 0.000356 );
694+ fesapi .DoubleArray_setitem (watRelPerm , 3 , 0.0004392 );
695+ fesapi .DoubleArray_setitem (watRelPerm , 4 , 0.0014241 );
696+ fesapi .DoubleArray_setitem (watRelPerm , 5 , 0.0015969 );
697+ fesapi .DoubleArray_setitem (watRelPerm , 6 , 0.0032041 );
698+
699+ cbt .setDoubleValues (1 , watRelPerm , 7 );
700+ }
701+ finally {
702+ fesapi .delete_DoubleArray (watRelPerm );
703+ }
704+
705+ SWIGTYPE_p_double oilRelPerm = fesapi .new_DoubleArray (7 );
706+ try {
707+ fesapi .DoubleArray_setitem (oilRelPerm , 0 , 1 );
708+ fesapi .DoubleArray_setitem (oilRelPerm , 1 , 0.99 );
709+ fesapi .DoubleArray_setitem (oilRelPerm , 2 , 0.886131 );
710+ fesapi .DoubleArray_setitem (oilRelPerm , 3 , 0.8767012 );
711+ fesapi .DoubleArray_setitem (oilRelPerm , 4 , 0.7764308 );
712+ fesapi .DoubleArray_setitem (oilRelPerm , 5 , 0.765876 );
713+ fesapi .DoubleArray_setitem (oilRelPerm , 6 , 0.6778755 );
714+
715+ cbt .setDoubleValues (2 , oilRelPerm , 7 );
716+ }
717+ finally {
718+ fesapi .delete_DoubleArray (oilRelPerm );
719+ }
720+
721+ SWIGTYPE_p_double capPressure = fesapi .new_DoubleArray (7 );
722+ try {
723+ fesapi .DoubleArray_setitem (capPressure , 0 , 0 );
724+ fesapi .DoubleArray_setitem (capPressure , 1 , 0 );
725+ fesapi .DoubleArray_setitem (capPressure , 2 , 0 );
726+ fesapi .DoubleArray_setitem (capPressure , 3 , 0 );
727+ fesapi .DoubleArray_setitem (capPressure , 4 , 0 );
728+ fesapi .DoubleArray_setitem (capPressure , 5 , 0 );
729+ fesapi .DoubleArray_setitem (capPressure , 6 , 0 );
730+
731+ cbt .setDoubleValues (3 , capPressure , 7 );
732+ }
733+ finally {
734+ fesapi .delete_DoubleArray (capPressure );
735+ }
736+ }
737+
658738 private static void serialize ()
659739 {
660740 try (DataObjectRepository repo = new DataObjectRepository ()) {
@@ -672,6 +752,7 @@ private static void serialize()
672752$ {COMMENT_START }
673753 serializeGraphicalInformationSet (repo , hdfProxy );
674754$ {COMMENT_END }
755+ serializeColumnBasedTable (repo );
675756
676757 EpcDocument pck = new EpcDocument (storageDirectory + File .separator + epcName + ".epc" );
677758 pck .serializeFrom (repo );
@@ -800,7 +881,8 @@ private static void deserialize()
800881 }
801882 }
802883 }
803- $ {COMMENT_END }
884+ $ {COMMENT_END }
885+ deserializeColumnBasedTable (repo );
804886 }
805887 }
806888
@@ -921,6 +1003,22 @@ private static void deserializeIjkGrid(DataObjectRepository repo) {
9211003 }
9221004 }
9231005
1006+ private static void deserializeColumnBasedTable (DataObjectRepository repo ) {
1007+ System .out .println ("COLUMN BASED TABLE" );
1008+ long cbtCount = repo .getColumnBasedTableCount ();
1009+ for (long cbtIdx = 0 ; cbtIdx < cbtCount ; ++cbtIdx ) {
1010+ ColumnBasedTable cbt = repo .getColumnBasedTable (cbtIdx );
1011+ System .out .println ("\t COLUMN BASED TABLE : " + cbt .getTitle ());
1012+ for (long columnIdx = 0 ; columnIdx < cbt .getColumnCount (); ++columnIdx ) {
1013+ System .out .println ("\t \t PropKind : " + cbt .getPropertyKind (columnIdx ).getTitle ());
1014+ for (double dbl : cbt .getDoubleValues (columnIdx )) {
1015+ System .out .print (dbl + " " );
1016+ }
1017+ System .out .println ();
1018+ }
1019+ }
1020+ }
1021+
9241022 public static void main (String [] args ) {
9251023 serialize ();
9261024 deserialize ();
0 commit comments