public void parseRawValue ( String value ) { int valueIndex = 0 ; int elementIndex = 0 ; m_elements . clear ( ) ; while ( valueIndex < value . length ( ) && elementIndex < m_elements . size ( ) ) { int elementLength = m_lengths . get ( elementIndex ) . intValue ( ) ; if ( elementIndex > 0 ) { m_elements . add ( m_separators . get ( elementIndex - 1 ) ) ; } int endIndex = valueIndex + elementLength ; if ( endIndex > value . length ( ) ) { endIndex = value . length ( ) ; } String element = value . substring ( valueIndex , endIndex ) ; m_elements . add ( element ) ; valueIndex += elementLength ; elementIndex ++ ; } }
Parses a raw WBS value from the database and breaks it into component parts ready for formatting .