client/public/src/models/CollectionModel.js
/**
   * @method constructUrl
   * @description Constructs url based on query object
   * @param {Object} q - Simplified query object used by element
   * @param {String[]} ignoreArgs - Array of query parameters to ignore when constructing url
   * 
   * @returns {String}
   */
@method constructUrl
@description Constructs url based on query object
@param {Object} q - Simplified query object used by element
@param {String[]} ignoreArgs - Array of query parameters to ignore when constructing url

@returns {String}
@method constructUrl @description Constructs url based on query object @param { Object } q - Simplified query object used by element @param { String [] } ignoreArgs - Array of query parameters to ignore when constructing url @returns { String }
constructUrl(q, ignoreArgs=[]) {
    let path = "";
    if ( q.textQuery ) path += "/search";
    if ( AssetDefs.facetExists(q.mainFacet) ) path += `/${q.mainFacet}`;
    if ( AssetDefs.subFacetExists(q.mainFacet, q.subFacet) && !ignoreArgs.includes('subFacet') ) path += `/${q.subFacet}`;
    if( path === '' ) path = "/search";
    let args = [];
    if (q.subjectFilter && !ignoreArgs.includes('subjectFilter')) {
      args.push(`subject=${encodeURIComponent(q.subjectFilter)}`);
    }
    if (q.pgCurrent && q.pgCurrent > 1 && !ignoreArgs.includes('page')) {
      args.push(`page=${q.pgCurrent}`);
    }
    if (q.textQuery && !(ignoreArgs.includes('textQuery') || ignoreArgs.includes('s')) ) {
      args.push(`s=${encodeURIComponent(q.textQuery)}`);
    }
    if (q.azSelected && q.azSelected.toLowerCase() != 'all' && !(ignoreArgs.includes('az') || ignoreArgs.includes('azSelected')) ) {
      args.push(`az=${q.azSelected}`);
    }
    if (args.length > 0) path += "?";
    path += args.join('&');
    return path;
  }
constructUrl ( q , ignoreArgs = [ ] ) { let path = "" ; if ( q . textQuery ) path += "/search" ; if ( AssetDefs . facetExists ( q . mainFacet ) ) path += ` ${ q . mainFacet } ` ; if ( AssetDefs . subFacetExists ( q . mainFacet , q . subFacet ) && ! ignoreArgs . includes ( 'subFacet' ) ) path += ` ${ q . subFacet } ` ; if ( path === '' ) path = "/search" ; let args = [ ] ; if ( q . subjectFilter && ! ignoreArgs . includes ( 'subjectFilter' ) ) { args . push ( ` ${ encodeURIComponent ( q . subjectFilter ) } ` ) ; } if ( q . pgCurrent && q . pgCurrent > 1 && ! ignoreArgs . includes ( 'page' ) ) { args . push ( ` ${ q . pgCurrent } ` ) ; } if ( q . textQuery && ! ( ignoreArgs . includes ( 'textQuery' ) || ignoreArgs . includes ( 's' ) ) ) { args . push ( ` ${ encodeURIComponent ( q . textQuery ) } ` ) ; } if ( q . azSelected && q . azSelected . toLowerCase ( ) != 'all' && ! ( ignoreArgs . includes ( 'az' ) || ignoreArgs . includes ( 'azSelected' ) ) ) { args . push ( ` ${ q . azSelected } ` ) ; } if ( args . length > 0 ) path += "?" ; path += args . join ( '&' ) ; return path ; }
@method constructUrl
 @description Constructs url based on query object
 @param {Object} q - Simplified query object used by element
 @param {String[]} ignoreArgs - Array of query parameters to ignore when constructing url
@method constructUrl @description Constructs url based on query object @param { Object } q - Simplified query object used by element @param { String [] } ignoreArgs - Array of query parameters to ignore when constructing url
// URL Path // empty text search // query args // subject filter // pagination // search query // az