protected void processLevelRelationships(final ParserData parserData, final Level level,
            final HashMap<ParserType, String[]> variableMap, final String line, int lineNumber) throws ParsingException {
        // Process the relationships
        final String uniqueId = level.getUniqueId();
        final ArrayList<Relationship> levelRelationships = new ArrayList<Relationship>();

        // Refer-To relationships
        processRelationshipList(ParserType.REFER_TO, level, variableMap, levelRelationships, lineNumber);

        // Prerequisite relationships
        processRelationshipList(ParserType.PREREQUISITE, level, variableMap, levelRelationships, lineNumber);

        // Link-List relationships
        processRelationshipList(ParserType.LINKLIST, level, variableMap, levelRelationships, lineNumber);

        // Next and Previous relationships should only be created internally and shouldn't be specified by the user
        if (variableMap.containsKey(ParserType.NEXT) || variableMap.containsKey(ParserType.PREVIOUS)) {
            throw new ParsingException(format(ProcessorConstants.ERROR_TOPIC_NEXT_PREV_MSG, lineNumber, line));
        }

        // Add the relationships to the global list if any exist
        if (!levelRelationships.isEmpty()) {
            parserData.getLevelRelationships().put(uniqueId, levelRelationships);
        }
    }
protected void processLevelRelationships ( final ParserData parserData , final Level level , final HashMap < ParserType , String [ ] > variableMap , final String line , int lineNumber ) throws ParsingException { final String uniqueId = level . getUniqueId ( ) ; final ArrayList < Relationship > levelRelationships = new ArrayList < Relationship > ( ) ; processRelationshipList ( ParserType . REFER_TO , level , variableMap , levelRelationships , lineNumber ) ; processRelationshipList ( ParserType . PREREQUISITE , level , variableMap , levelRelationships , lineNumber ) ; processRelationshipList ( ParserType . LINKLIST , level , variableMap , levelRelationships , lineNumber ) ; if ( variableMap . containsKey ( ParserType . NEXT ) || variableMap . containsKey ( ParserType . PREVIOUS ) ) { throw new ParsingException ( format ( ProcessorConstants . ERROR_TOPIC_NEXT_PREV_MSG , lineNumber , line ) ) ; } if ( ! levelRelationships . isEmpty ( ) ) { parserData . getLevelRelationships ( ) . put ( uniqueId , levelRelationships ) ; } }
Process the relationships parsed for a topic.

@param parserData
@param level       The temporary topic that will be turned into a full topic once fully parsed.
@param variableMap The list of variables containing the parsed relationships.
@param line        The line representing the topic and it's relationships.
@param lineNumber  The number of the line the relationships are on.
@throws ParsingException Thrown if the variables can't be parsed due to incorrect syntax.