protected ParserResults processSpecContents ( ParserData parserData , final boolean processProcesses ) { parserData . setCurrentLevel ( parserData . getContentSpec ( ) . getBaseLevel ( ) ) ; boolean error = false ; while ( parserData . getLines ( ) . peek ( ) != null ) { parserData . setLineCount ( parserData . getLineCount ( ) + 1 ) ; // Process the content specification and print an error message if an error occurs try { if ( ! parseLine ( parserData , parserData . getLines ( ) . poll ( ) , parserData . getLineCount ( ) ) ) { error = true ; } } catch ( IndentationException e ) { log . error ( e . getMessage ( ) ) ; return new ParserResults ( false , null ) ; } } // Before validating the content specification, processes should be loaded first so that the // relationships and targets are created if ( processProcesses ) { for ( final Process process : parserData . getProcesses ( ) ) { process . processTopics ( parserData . getSpecTopics ( ) , parserData . getTargetTopics ( ) , topicProvider , serverSettingsProvider ) ; } } // Setup the relationships processRelationships ( parserData ) ; return new ParserResults ( ! error , parserData . getContentSpec ( ) ) ; }
Process the contents of a content specification and parse it into a ContentSpec object .