private void processOutlineCodeValues ( ) throws IOException { DirectoryEntry outlineCodeDir = ( DirectoryEntry ) m_projectDir . getEntry ( "TBkndOutlCode" ) ; FixedMeta fm = new FixedMeta ( new DocumentInputStream ( ( ( DocumentEntry ) outlineCodeDir . getEntry ( "FixedMeta" ) ) ) , 10 ) ; FixedData fd = new FixedData ( fm , new DocumentInputStream ( ( ( DocumentEntry ) outlineCodeDir . getEntry ( "FixedData" ) ) ) ) ; Map < Integer , FieldType > map = new HashMap < Integer , FieldType > ( ) ; int items = fm . getItemCount ( ) ; for ( int loop = 0 ; loop < items ; loop ++ ) { byte [ ] data = fd . getByteArrayValue ( loop ) ; if ( data . length < 18 ) { continue ; } int index = MPPUtility . getShort ( data , 0 ) ; int fieldID = MPPUtility . getInt ( data , 12 ) ; FieldType fieldType = FieldTypeHelper . getInstance ( fieldID ) ; if ( fieldType . getFieldTypeClass ( ) != FieldTypeClass . UNKNOWN ) { map . put ( Integer . valueOf ( index ) , fieldType ) ; } } VarMeta outlineCodeVarMeta = new VarMeta9 ( new DocumentInputStream ( ( ( DocumentEntry ) outlineCodeDir . getEntry ( "VarMeta" ) ) ) ) ; Var2Data outlineCodeVarData = new Var2Data ( outlineCodeVarMeta , new DocumentInputStream ( ( ( DocumentEntry ) outlineCodeDir . getEntry ( "Var2Data" ) ) ) ) ; Map < FieldType , List < Pair < String , String > > > valueMap = new HashMap < FieldType , List < Pair < String , String > > > ( ) ; for ( Integer id : outlineCodeVarMeta . getUniqueIdentifierArray ( ) ) { FieldType fieldType = map . get ( id ) ; String value = outlineCodeVarData . getUnicodeString ( id , VALUE ) ; String description = outlineCodeVarData . getUnicodeString ( id , DESCRIPTION ) ; List < Pair < String , String > > list = valueMap . get ( fieldType ) ; if ( list == null ) { list = new ArrayList < Pair < String , String > > ( ) ; valueMap . put ( fieldType , list ) ; } list . add ( new Pair < String , String > ( value , description ) ) ; } for ( Entry < FieldType , List < Pair < String , String > > > entry : valueMap . entrySet ( ) ) { populateContainer ( entry . getKey ( ) , entry . getValue ( ) ) ; } }
Reads outline code custom field values and populates container .