protected Level parseLevelLine ( final ParserData parserData , final String line , int lineNumber ) throws ParsingException { String tempInput [ ] = StringUtilities . split ( line , ' ' , 2 ) ; // Remove the whitespace from each value in the split array tempInput = CollectionUtilities . trimStringArray ( tempInput ) ; if ( tempInput . length >= 1 ) { final LevelType levelType = LevelType . getLevelType ( tempInput [ 0 ] ) ; Level retValue = null ; try { retValue = parseLevel ( parserData , lineNumber , levelType , line ) ; } catch ( ParsingException e ) { log . error ( e . getMessage ( ) ) ; // Create a basic level so the rest of the spec can be processed retValue = createEmptyLevelFromType ( lineNumber , levelType , line ) ; retValue . setUniqueId ( "L" + lineNumber ) ; } parserData . getLevels ( ) . put ( retValue . getUniqueId ( ) , retValue ) ; return retValue ; } else { throw new ParsingException ( format ( ProcessorConstants . ERROR_LEVEL_FORMAT_MSG , lineNumber , line ) ) ; } }
Processes a line that represents the start of a Content Specification Level . This method creates the level based on the data in the line and then changes the current processing level to the new level .