src/net/nodeDatumMetadataUrlHelperMixin.js
/**
	 * Generate a URL for searching for datum metadata.
	 * 
	 * @param {number} [nodeId] a specific node ID to use; if not provided the <code>nodeId</code> property of this class will be used
	 * @param {string} [sourceId] a specific source ID to use; 
     *                            if not provided the <code>sourceId</code> property of this class will be used;
     *                            if <code>null</code> then ignore any <code>sourceId</code> property of this class
	 * @param {SortDescriptor[]} [sorts] optional sort settings to use
	 * @param {module:domain~Pagination} [pagination] optional pagination settings to use
	 * @returns {string} the URL
	 */
Generate a URL for searching for datum metadata.


Generate a URL for searching for datum metadata .
findNodeDatumMetadataUrl(nodeId, sourceId, sorts, pagination) {
        let result = this.baseNodeDatumMetadataUrl(nodeId);
		let params = '';
        let source = (sourceId || this.sourceId);
        if ( sourceId !== null && source ) {
            params += 'sourceId=' +encodeURIComponent(source);
        }
		if ( Array.isArray(sorts) ) {
			sorts.forEach((sort, i) => {
				if ( sort instanceof SortDescriptor ) {
					if ( params.length > 0 ) {
						params += '&';
					}
					params += sort.toUriEncoding(i);
				}
			});
		}
		if ( pagination instanceof Pagination ) {
			if ( params.length > 0 ) {
				params += '&';
			}
			params += pagination.toUriEncoding();
		}
		if ( params.length > 0 ) {
			result += '?' + params;
		}
		return result;
	}
findNodeDatumMetadataUrl ( nodeId , sourceId , sorts , pagination ) { let result = this . baseNodeDatumMetadataUrl ( nodeId ) ; let params = '' ; let source = ( sourceId || this . sourceId ) ; if ( sourceId !== null && source ) { params += 'sourceId=' + encodeURIComponent ( source ) ; } if ( Array . isArray ( sorts ) ) { sorts . forEach ( ( sort , i ) => { if ( sort instanceof SortDescriptor ) { if ( params . length > 0 ) { params += '&' ; } params += sort . toUriEncoding ( i ) ; } } ) ; } if ( pagination instanceof Pagination ) { if ( params . length > 0 ) { params += '&' ; } params += pagination . toUriEncoding ( ) ; } if ( params . length > 0 ) { result += '?' + params ; } return result ; }
Generate a URL for searching for datum metadata.
Generate a URL for searching for datum metadata .