protected ParserResults processNewSpec ( final ParserData parserData , final boolean processProcesses ) { final String input = parserData . getLines ( ) . poll ( ) ; parserData . setLineCount ( parserData . getLineCount ( ) + 1 ) ; try { final Pair < String , String > keyValuePair = ProcessorUtilities . getAndValidateKeyValuePair ( input ) ; final String key = keyValuePair . getFirst ( ) ; final String value = keyValuePair . getSecond ( ) ; if ( key . equalsIgnoreCase ( CommonConstants . CS_TITLE_TITLE ) ) { parserData . getContentSpec ( ) . setTitle ( value ) ; // Process the rest of the spec now that we know the start is correct return processSpecContents ( parserData , processProcesses ) ; } else if ( key . equalsIgnoreCase ( CommonConstants . CS_CHECKSUM_TITLE ) ) { log . error ( ProcessorConstants . ERROR_INCORRECT_NEW_MODE_MSG ) ; return new ParserResults ( false , null ) ; } else { log . error ( ProcessorConstants . ERROR_INCORRECT_FILE_FORMAT_MSG ) ; return new ParserResults ( false , null ) ; } } catch ( InvalidKeyValueException e ) { log . error ( ProcessorConstants . ERROR_INCORRECT_FILE_FORMAT_MSG , e ) ; return new ParserResults ( false , null ) ; } }
Process a New Content Specification . That is that it should start with a Title instead of a CHECKSUM and ID .