protected CommonContent parseCommonContentLine ( 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 common content final CommonContent commonContent = new CommonContent ( title , lineNumber , line ) ; commonContent . setUniqueId ( "L" + lineNumber + "-CommonContent" ) ; // Check that no attributes were defined final String [ ] baseAttributes = variableMap . get ( ParserType . NONE ) ; if ( baseAttributes . length > 1 ) { log . warn ( format ( ProcessorConstants . WARN_IGNORE_COMMON_CONTENT_ATTRIBUTES_MSG , lineNumber , line ) ) ; } // Throw an error for relationships variableMap . remove ( ParserType . NONE ) ; if ( variableMap . size ( ) > 0 ) { throw new ParsingException ( format ( ProcessorConstants . ERROR_COMMON_CONTENT_CONTAINS_ILLEGAL_CONTENT , lineNumber , line ) ) ; } return commonContent ; }
Processes the input to create a new common content node .