GoalModelEditor/FrontEnd/public/js/projectEdit/graph.js
/**
 * Adds non-functional goals into the hierarchy next to their associated
 * functional goals.
 */
Adds non-functional goals into the hierarchy next to their associated
functional goals.
Adds non - functional goals into the hierarchy next to their associated functional goals .
function associateNonFunctions(graph) {
    var goals = graph.getChildVertices();
    for (var i = 0; i < goals.length; i++) {
        let goal = goals[i];
        let value = goal.value;
        if (emotionsGlob[value]) {
            renderNonFunction(
                emotionsGlob[goal.value], graph, goal, TYPE_EMOTIONAL
            );
        }
        if (qualitiesGlob[value]) {
            renderNonFunction(
                qualitiesGlob[goal.value], graph, goal, TYPE_QUALITY
            );
        }
        if (negativesGlob[value]) {
            renderNonFunction(
                negativesGlob[goal.value],
                graph, goal, TYPE_NEGATIVE
            );
        }
        if (stakeholdersGlob[value]) {
            renderNonFunction(
                stakeholdersGlob[goal.value],
                graph, goal, TYPE_STAKEHOLDER
            );
        }
    }
    if (emotionsGlob[ROOT_KEY] && rootGoal != null) {
        renderNonFunction(emotionsGlob[ROOT_KEY],
            graph, rootGoal, TYPE_EMOTIONAL
        );
    }
    if (qualitiesGlob[ROOT_KEY] && rootGoal != null) {
        renderNonFunction(qualitiesGlob[ROOT_KEY],
            graph, rootGoal, TYPE_QUALITY
        );
    }
    if (negativesGlob[ROOT_KEY] && rootGoal != null) {
        renderNonFunction(negativesGlob[ROOT_KEY],
            graph, rootGoal, TYPE_NEGATIVE
        );
    }
    if (stakeholdersGlob[ROOT_KEY] && rootGoal != null) {
        renderNonFunction(stakeholdersGlob[ROOT_KEY],
            graph, rootGoal, TYPE_STAKEHOLDER
        );
    }
}
function associateNonFunctions ( graph ) { var goals = graph . getChildVertices ( ) ; for ( var i = 0 ; i < goals . length ; i ++ ) { let goal = goals [ i ] ; let value = goal . value ; if ( emotionsGlob [ value ] ) { renderNonFunction ( emotionsGlob [ goal . value ] , graph , goal , TYPE_EMOTIONAL ) ; } if ( qualitiesGlob [ value ] ) { renderNonFunction ( qualitiesGlob [ goal . value ] , graph , goal , TYPE_QUALITY ) ; } if ( negativesGlob [ value ] ) { renderNonFunction ( negativesGlob [ goal . value ] , graph , goal , TYPE_NEGATIVE ) ; } if ( stakeholdersGlob [ value ] ) { renderNonFunction ( stakeholdersGlob [ goal . value ] , graph , goal , TYPE_STAKEHOLDER ) ; } } if ( emotionsGlob [ ROOT_KEY ] && rootGoal != null ) { renderNonFunction ( emotionsGlob [ ROOT_KEY ] , graph , rootGoal , TYPE_EMOTIONAL ) ; } if ( qualitiesGlob [ ROOT_KEY ] && rootGoal != null ) { renderNonFunction ( qualitiesGlob [ ROOT_KEY ] , graph , rootGoal , TYPE_QUALITY ) ; } if ( negativesGlob [ ROOT_KEY ] && rootGoal != null ) { renderNonFunction ( negativesGlob [ ROOT_KEY ] , graph , rootGoal , TYPE_NEGATIVE ) ; } if ( stakeholdersGlob [ ROOT_KEY ] && rootGoal != null ) { renderNonFunction ( stakeholdersGlob [ ROOT_KEY ] , graph , rootGoal , TYPE_STAKEHOLDER ) ; } }
Adds non-functional goals into the hierarchy next to their associated
 functional goals.
Adds non - functional goals into the hierarchy next to their associated functional goals .
// fetch all the functional goals // render all emotions // render all qualities // render all concerns // render all stakeholders // render each of the non-functional goals at the root level