Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | 12x 12x 12x 12x 12x 12x 12x 1x 12x 12x 12x 12x 12x | import Logger from "../../Utils/LoggerByDefault";
/**
* @classdesc
*
* Entête de la requête XSL
*
* @example
* // header XSL
* header = new RequestHeader ();
* header.srsName = "epsg:4326";
* header.toString();
* // out ->
* // <RequestHeader srsName="epsg:4326"/>
*
* @constructor
* @alias Gp.Formats.XLS.RequestHeader
* @param {Object} options - options
* @param {Object} options.srsName - projection
* @param {Function} options.onsuccess - function callback success (TODO)
* @param {Function} options.onerror - function callback error (TODO)
*
* @private
*/
function RequestHeader (options) {
this.logger = Logger.getLogger();
this.logger.trace("[Constructeur RequestHeader ()]");
Iif (!(this instanceof RequestHeader)) {
throw new TypeError("RequestHeader constructor cannot be called as a function.");
}
// options par defaut
this.options = options || {
srsName : "EPSG:4326"
};
// et on ajoute les options en paramètre aux options par défaut
for (var opt in options) {
Eif (options.hasOwnProperty(opt)) {
this.options[opt] = options[opt];
}
}
}
RequestHeader.prototype = {
/**
* @lends module:RequestHeader#
*/
/**
* request (out)
* @type {String}
*/
requestString : null,
/**
* Template de la requête.
* substitution des valeurs suivantes :
* __SRSNAME__
*/
template : "<RequestHeader srsName=\"__SRSNAME__\"/>",
/**
* Constructeur (alias)
*/
constructor : RequestHeader,
/**
* toString
* @returns {String} requête
*/
toString : function () {
var template = null;
template = this.template;
template = template.replace(/__SRSNAME__/g, this.options.srsName);
this.requestString = template;
return this.requestString;
}
};
export default RequestHeader;
|