metreex-analysis.js
/**
 * Checks the loaded treebanks for a treebank with the given Id, and unloads it if found.
 * @param {String} id Id of tree which should be removed from the loaded array
 * @returns {Boolean} Returns true if a tree was successfully removed or false otherwise.
 */
Checks the loaded treebanks for a treebank with the given Id, and unloads it if found.
@param {String} id Id of tree which should be removed from the loaded array
@returns {Boolean} Returns true if a tree was successfully removed or false otherwise.
Checks the loaded treebanks for a treebank with the given Id and unloads it if found . @param { String } id Id of tree which should be removed from the loaded array @returns { Boolean } Returns true if a tree was successfully removed or false otherwise .
function removeLoadedTreeById(id){
    for (var index = 0; index < loadedTreebanks.length; index++){
        if (loadedTreebanks[index].id === id){
            loadedTreebanks.splice(index, 1);
            output.println("Treebank " + id + " has been unloaded");
            if (USING_SIDEBAR){
                removeTreeFromSidebar(id);
            }
            return true; 
        }
    }
    output.println("Treebank " + id + " was not previously loaded");
    return false;
}
function removeLoadedTreeById ( id ) { for ( var index = 0 ; index < loadedTreebanks . length ; index ++ ) { if ( loadedTreebanks [ index ] . id === id ) { loadedTreebanks . splice ( index , 1 ) ; output . println ( "Treebank " + id + " has been unloaded" ) ; if ( USING_SIDEBAR ) { removeTreeFromSidebar ( id ) ; } return true ; } } output . println ( "Treebank " + id + " was not previously loaded" ) ; return false ; }
Checks the loaded treebanks for a treebank with the given Id, and unloads it if found.
Checks the loaded treebanks for a treebank with the given Id and unloads it if found .
//Should not have to worry about duplicates.