protected SpecTopic parseTopic ( final ParserData parserData , final String line , int lineNumber ) throws ParsingException { // Read in the variables inside of the brackets final HashMap < ParserType , String [ ] > variableMap = getLineVariables ( parserData , line , lineNumber , ' ' , ' ' , ' ' , false ) ; if ( ! variableMap . containsKey ( ParserType . NONE ) ) { throw new ParsingException ( format ( ProcessorConstants . ERROR_INVALID_TOPIC_FORMAT_MSG , lineNumber , line ) ) ; } // Get the title final String title = ProcessorUtilities . replaceEscapeChars ( getTitle ( line , ' ' ) ) ; // Create the spec topic final SpecTopic tempTopic = new SpecTopic ( title , lineNumber , line , null ) ; // Add in the topic attributes addTopicAttributes ( tempTopic , parserData , variableMap . get ( ParserType . NONE ) , lineNumber , line ) ; parserData . getSpecTopics ( ) . put ( tempTopic . getUniqueId ( ) , tempTopic ) ; // Process the Topic Relationships processTopicRelationships ( parserData , tempTopic , variableMap , line , lineNumber ) ; // Throw an error for info if ( variableMap . containsKey ( ParserType . INFO ) ) { throw new ParsingException ( format ( ProcessorConstants . ERROR_TOPIC_WITH_INFO_TOPIC , lineNumber , line ) ) ; } return tempTopic ; }
Processes the input to create a new topic