id
int32
0
58k
repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
sequence
docstring
stringlengths
4
11.8k
docstring_tokens
sequence
sha
stringlengths
40
40
url
stringlengths
86
226
3,700
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js
htmlSplit
function htmlSplit(str) { // can't hoist this out of the function because of the re.exec loop. var re = /(<\/|<\!--|<[!?]|[&<>])/g; str += ''; if (splitWillCapture) { return str.split(re); } else { var parts = []; var lastPos = 0; var m; while ((m = re.exec(str)) !== null) { parts.push(str.substring(lastPos, m.index)); parts.push(m[0]); lastPos = m.index + m[0].length; } parts.push(str.substring(lastPos)); return parts; } }
javascript
function htmlSplit(str) { // can't hoist this out of the function because of the re.exec loop. var re = /(<\/|<\!--|<[!?]|[&<>])/g; str += ''; if (splitWillCapture) { return str.split(re); } else { var parts = []; var lastPos = 0; var m; while ((m = re.exec(str)) !== null) { parts.push(str.substring(lastPos, m.index)); parts.push(m[0]); lastPos = m.index + m[0].length; } parts.push(str.substring(lastPos)); return parts; } }
[ "function", "htmlSplit", "(", "str", ")", "{", "// can't hoist this out of the function because of the re.exec loop.", "var", "re", "=", "/", "(<\\/|<\\!--|<[!?]|[&<>])", "/", "g", ";", "str", "+=", "''", ";", "if", "(", "splitWillCapture", ")", "{", "return", "str", ".", "split", "(", "re", ")", ";", "}", "else", "{", "var", "parts", "=", "[", "]", ";", "var", "lastPos", "=", "0", ";", "var", "m", ";", "while", "(", "(", "m", "=", "re", ".", "exec", "(", "str", ")", ")", "!==", "null", ")", "{", "parts", ".", "push", "(", "str", ".", "substring", "(", "lastPos", ",", "m", ".", "index", ")", ")", ";", "parts", ".", "push", "(", "m", "[", "0", "]", ")", ";", "lastPos", "=", "m", ".", "index", "+", "m", "[", "0", "]", ".", "length", ";", "}", "parts", ".", "push", "(", "str", ".", "substring", "(", "lastPos", ")", ")", ";", "return", "parts", ";", "}", "}" ]
Split str into parts for the html parser.
[ "Split", "str", "into", "parts", "for", "the", "html", "parser", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js#L3152-L3170
3,701
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js
sanitize
function sanitize(inputHtml, opt_naiveUriRewriter, opt_nmTokenPolicy) { var tagPolicy = makeTagPolicy(opt_naiveUriRewriter, opt_nmTokenPolicy); return sanitizeWithPolicy(inputHtml, tagPolicy); }
javascript
function sanitize(inputHtml, opt_naiveUriRewriter, opt_nmTokenPolicy) { var tagPolicy = makeTagPolicy(opt_naiveUriRewriter, opt_nmTokenPolicy); return sanitizeWithPolicy(inputHtml, tagPolicy); }
[ "function", "sanitize", "(", "inputHtml", ",", "opt_naiveUriRewriter", ",", "opt_nmTokenPolicy", ")", "{", "var", "tagPolicy", "=", "makeTagPolicy", "(", "opt_naiveUriRewriter", ",", "opt_nmTokenPolicy", ")", ";", "return", "sanitizeWithPolicy", "(", "inputHtml", ",", "tagPolicy", ")", ";", "}" ]
Strips unsafe tags and attributes from HTML. @param {string} inputHtml The HTML to sanitize. @param {?function(?string): ?string} opt_naiveUriRewriter A transform to apply to URI attributes. If not given, URI attributes are deleted. @param {function(?string): ?string} opt_nmTokenPolicy A transform to apply to attributes containing HTML names, element IDs, and space-separated lists of classes. If not given, such attributes are left unchanged.
[ "Strips", "unsafe", "tags", "and", "attributes", "from", "HTML", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js#L3552-L3555
3,702
SAP/openui5
src/sap.ui.core/src/sap/ui/performance/BeaconRequest.js
function (option) { option = option || {}; if (!BeaconRequest.isSupported()) { throw Error("Beacon API is not supported"); } if (typeof option.url !== "string") { throw Error("Beacon url must be valid"); } this._nMaxBufferLength = option.maxBufferLength || 10; this._aBuffer = []; this._sUrl = option.url; this.attachSendOnUnload(); }
javascript
function (option) { option = option || {}; if (!BeaconRequest.isSupported()) { throw Error("Beacon API is not supported"); } if (typeof option.url !== "string") { throw Error("Beacon url must be valid"); } this._nMaxBufferLength = option.maxBufferLength || 10; this._aBuffer = []; this._sUrl = option.url; this.attachSendOnUnload(); }
[ "function", "(", "option", ")", "{", "option", "=", "option", "||", "{", "}", ";", "if", "(", "!", "BeaconRequest", ".", "isSupported", "(", ")", ")", "{", "throw", "Error", "(", "\"Beacon API is not supported\"", ")", ";", "}", "if", "(", "typeof", "option", ".", "url", "!==", "\"string\"", ")", "{", "throw", "Error", "(", "\"Beacon url must be valid\"", ")", ";", "}", "this", ".", "_nMaxBufferLength", "=", "option", ".", "maxBufferLength", "||", "10", ";", "this", ".", "_aBuffer", "=", "[", "]", ";", "this", ".", "_sUrl", "=", "option", ".", "url", ";", "this", ".", "attachSendOnUnload", "(", ")", ";", "}" ]
A helper for buffering and sending BeaconRequests to a certain URL @param {object} option Options for beacon API initialization @param {string} option.url beacon URL @param {string} option.maxBufferLength Number of entries in the stack before the beacon is send @private @ui5-restricted sap.ui.core
[ "A", "helper", "for", "buffering", "and", "sending", "BeaconRequests", "to", "a", "certain", "URL" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/performance/BeaconRequest.js#L18-L33
3,703
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function (sRule, bAsync) { var sCheckFunction = this.model.getProperty(sRule + "/check"); if (!sCheckFunction) { return; } // Check if a function is found var oMatch = sCheckFunction.match(/function[^(]*\(([^)]*)\)/); if (!oMatch) { return; } // Get the parameters of the function found and trim, then split by word. var aParams = oMatch[1].trim().split(/\W+/); // Add missing parameters to ensure the resolve function is passed on the correct position. aParams[0] = aParams[0] || "oIssueManager"; aParams[1] = aParams[1] || "oCoreFacade"; aParams[2] = aParams[2] || "oScope"; // If async add a fnResolve to the template else remove it. if (bAsync) { aParams[3] = aParams[3] || "fnResolve"; } else { aParams = aParams.slice(0, 3); } // Replace the current parameters with the new ones. var sNewCheckFunction = sCheckFunction.replace(/function[^(]*\(([^)]*)\)/, "function (" + aParams.join(", ") + ")"); this.model.setProperty(sRule + "/check", sNewCheckFunction); }
javascript
function (sRule, bAsync) { var sCheckFunction = this.model.getProperty(sRule + "/check"); if (!sCheckFunction) { return; } // Check if a function is found var oMatch = sCheckFunction.match(/function[^(]*\(([^)]*)\)/); if (!oMatch) { return; } // Get the parameters of the function found and trim, then split by word. var aParams = oMatch[1].trim().split(/\W+/); // Add missing parameters to ensure the resolve function is passed on the correct position. aParams[0] = aParams[0] || "oIssueManager"; aParams[1] = aParams[1] || "oCoreFacade"; aParams[2] = aParams[2] || "oScope"; // If async add a fnResolve to the template else remove it. if (bAsync) { aParams[3] = aParams[3] || "fnResolve"; } else { aParams = aParams.slice(0, 3); } // Replace the current parameters with the new ones. var sNewCheckFunction = sCheckFunction.replace(/function[^(]*\(([^)]*)\)/, "function (" + aParams.join(", ") + ")"); this.model.setProperty(sRule + "/check", sNewCheckFunction); }
[ "function", "(", "sRule", ",", "bAsync", ")", "{", "var", "sCheckFunction", "=", "this", ".", "model", ".", "getProperty", "(", "sRule", "+", "\"/check\"", ")", ";", "if", "(", "!", "sCheckFunction", ")", "{", "return", ";", "}", "// Check if a function is found", "var", "oMatch", "=", "sCheckFunction", ".", "match", "(", "/", "function[^(]*\\(([^)]*)\\)", "/", ")", ";", "if", "(", "!", "oMatch", ")", "{", "return", ";", "}", "// Get the parameters of the function found and trim, then split by word.", "var", "aParams", "=", "oMatch", "[", "1", "]", ".", "trim", "(", ")", ".", "split", "(", "/", "\\W+", "/", ")", ";", "// Add missing parameters to ensure the resolve function is passed on the correct position.", "aParams", "[", "0", "]", "=", "aParams", "[", "0", "]", "||", "\"oIssueManager\"", ";", "aParams", "[", "1", "]", "=", "aParams", "[", "1", "]", "||", "\"oCoreFacade\"", ";", "aParams", "[", "2", "]", "=", "aParams", "[", "2", "]", "||", "\"oScope\"", ";", "// If async add a fnResolve to the template else remove it.", "if", "(", "bAsync", ")", "{", "aParams", "[", "3", "]", "=", "aParams", "[", "3", "]", "||", "\"fnResolve\"", ";", "}", "else", "{", "aParams", "=", "aParams", ".", "slice", "(", "0", ",", "3", ")", ";", "}", "// Replace the current parameters with the new ones.", "var", "sNewCheckFunction", "=", "sCheckFunction", ".", "replace", "(", "/", "function[^(]*\\(([^)]*)\\)", "/", ",", "\"function (\"", "+", "aParams", ".", "join", "(", "\", \"", ")", "+", "\")\"", ")", ";", "this", ".", "model", ".", "setProperty", "(", "sRule", "+", "\"/check\"", ",", "sNewCheckFunction", ")", ";", "}" ]
Add fnResolve to the check function when async is set to true otherwise removes it. @private @param {string} sRule the model path to edit or new rule @param {bAsync} bAsync the async property of the rule
[ "Add", "fnResolve", "to", "the", "check", "function", "when", "async", "is", "set", "to", "true", "otherwise", "removes", "it", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L123-L155
3,704
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function (component, savedComponents) { for (var index = 0; index < savedComponents.length; index += 1) { if (savedComponents[index].text == component.text && savedComponents[index].selected) { return true; } } return false; }
javascript
function (component, savedComponents) { for (var index = 0; index < savedComponents.length; index += 1) { if (savedComponents[index].text == component.text && savedComponents[index].selected) { return true; } } return false; }
[ "function", "(", "component", ",", "savedComponents", ")", "{", "for", "(", "var", "index", "=", "0", ";", "index", "<", "savedComponents", ".", "length", ";", "index", "+=", "1", ")", "{", "if", "(", "savedComponents", "[", "index", "]", ".", "text", "==", "component", ".", "text", "&&", "savedComponents", "[", "index", "]", ".", "selected", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}" ]
Checks if given execution scope component is selected comparing against an array of settings @param {Object} component The current component object to be checked @param {Array} savedComponents The local storage settings for the checked execution scope components @returns {boolean} If the component is checked or not
[ "Checks", "if", "given", "execution", "scope", "component", "is", "selected", "comparing", "against", "an", "array", "of", "settings" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L348-L355
3,705
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function (oEvent) { var bShowRuleProperties = true, oSelectedRule = this.model.getProperty("/selectedRule"), bAdditionalRulesetsTab = oEvent.getParameter("selectedKey") === "additionalRulesets"; if (bAdditionalRulesetsTab || !oSelectedRule) { bShowRuleProperties = false; } // Ensure we don't make unnecessary requests. The requests will be made only // the first time the user clicks AdditionalRulesets tab. if (!this.bAdditionalRulesetsLoaded && bAdditionalRulesetsTab) { this.rulesViewContainer.setBusyIndicatorDelay(0); this.rulesViewContainer.setBusy(true); CommunicationBus.publish(channelNames.GET_NON_LOADED_RULE_SETS, { loadedRulesets: this._getLoadedRulesets() }); } this.getView().getModel().setProperty("/showRuleProperties", bShowRuleProperties); }
javascript
function (oEvent) { var bShowRuleProperties = true, oSelectedRule = this.model.getProperty("/selectedRule"), bAdditionalRulesetsTab = oEvent.getParameter("selectedKey") === "additionalRulesets"; if (bAdditionalRulesetsTab || !oSelectedRule) { bShowRuleProperties = false; } // Ensure we don't make unnecessary requests. The requests will be made only // the first time the user clicks AdditionalRulesets tab. if (!this.bAdditionalRulesetsLoaded && bAdditionalRulesetsTab) { this.rulesViewContainer.setBusyIndicatorDelay(0); this.rulesViewContainer.setBusy(true); CommunicationBus.publish(channelNames.GET_NON_LOADED_RULE_SETS, { loadedRulesets: this._getLoadedRulesets() }); } this.getView().getModel().setProperty("/showRuleProperties", bShowRuleProperties); }
[ "function", "(", "oEvent", ")", "{", "var", "bShowRuleProperties", "=", "true", ",", "oSelectedRule", "=", "this", ".", "model", ".", "getProperty", "(", "\"/selectedRule\"", ")", ",", "bAdditionalRulesetsTab", "=", "oEvent", ".", "getParameter", "(", "\"selectedKey\"", ")", "===", "\"additionalRulesets\"", ";", "if", "(", "bAdditionalRulesetsTab", "||", "!", "oSelectedRule", ")", "{", "bShowRuleProperties", "=", "false", ";", "}", "// Ensure we don't make unnecessary requests. The requests will be made only", "// the first time the user clicks AdditionalRulesets tab.", "if", "(", "!", "this", ".", "bAdditionalRulesetsLoaded", "&&", "bAdditionalRulesetsTab", ")", "{", "this", ".", "rulesViewContainer", ".", "setBusyIndicatorDelay", "(", "0", ")", ";", "this", ".", "rulesViewContainer", ".", "setBusy", "(", "true", ")", ";", "CommunicationBus", ".", "publish", "(", "channelNames", ".", "GET_NON_LOADED_RULE_SETS", ",", "{", "loadedRulesets", ":", "this", ".", "_getLoadedRulesets", "(", ")", "}", ")", ";", "}", "this", ".", "getView", "(", ")", ".", "getModel", "(", ")", ".", "setProperty", "(", "\"/showRuleProperties\"", ",", "bShowRuleProperties", ")", ";", "}" ]
On selecting "Additional RuleSet" tab, start loading Additional RuleSets by brute search. @param {Event} oEvent TreeTable event
[ "On", "selecting", "Additional", "RuleSet", "tab", "start", "loading", "Additional", "RuleSets", "by", "brute", "search", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L405-L425
3,706
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function (tempLib, treeTable) { var library, rule, oTempLibCopy, bSelected, aRules, iIndex, fnFilter = function (oRule) { return oRule.id === rule.id; }; for (var i in treeTable) { library = treeTable[i]; oTempLibCopy = treeTable[i].nodes; if (library.name !== Constants.TEMP_RULESETS_NAME) { continue; } //reset the model to add the temp rules treeTable[i].nodes = []; for (var ruleIndex in tempLib.rules) { rule = tempLib.rules[ruleIndex]; bSelected = oTempLibCopy[ruleIndex] !== undefined ? oTempLibCopy[ruleIndex].selected : true; // syncs selection of temporary rules from local storage if (this.tempRulesFromStorage) { aRules = this.tempRulesFromStorage.filter(fnFilter); if (aRules.length > 0) { bSelected = aRules[0].selected; iIndex = this.tempRulesFromStorage.indexOf(aRules[0]); this.tempRulesFromStorage.splice(iIndex, 1); if (bSelected === false) { library.selected = false; } } if (this.tempRulesFromStorage.length === 0) { this.tempRulesFromStorage.length = null; } } library.nodes.push({ name: rule.title, description: rule.description, id: rule.id, audiences: rule.audiences.toString(), categories: rule.categories.toString(), minversion: rule.minversion, resolution: rule.resolution, title: rule.title, selected: bSelected, libName: library.name, check: rule.check }); } this.model.setProperty("/treeModel", treeTable); return library; } }
javascript
function (tempLib, treeTable) { var library, rule, oTempLibCopy, bSelected, aRules, iIndex, fnFilter = function (oRule) { return oRule.id === rule.id; }; for (var i in treeTable) { library = treeTable[i]; oTempLibCopy = treeTable[i].nodes; if (library.name !== Constants.TEMP_RULESETS_NAME) { continue; } //reset the model to add the temp rules treeTable[i].nodes = []; for (var ruleIndex in tempLib.rules) { rule = tempLib.rules[ruleIndex]; bSelected = oTempLibCopy[ruleIndex] !== undefined ? oTempLibCopy[ruleIndex].selected : true; // syncs selection of temporary rules from local storage if (this.tempRulesFromStorage) { aRules = this.tempRulesFromStorage.filter(fnFilter); if (aRules.length > 0) { bSelected = aRules[0].selected; iIndex = this.tempRulesFromStorage.indexOf(aRules[0]); this.tempRulesFromStorage.splice(iIndex, 1); if (bSelected === false) { library.selected = false; } } if (this.tempRulesFromStorage.length === 0) { this.tempRulesFromStorage.length = null; } } library.nodes.push({ name: rule.title, description: rule.description, id: rule.id, audiences: rule.audiences.toString(), categories: rule.categories.toString(), minversion: rule.minversion, resolution: rule.resolution, title: rule.title, selected: bSelected, libName: library.name, check: rule.check }); } this.model.setProperty("/treeModel", treeTable); return library; } }
[ "function", "(", "tempLib", ",", "treeTable", ")", "{", "var", "library", ",", "rule", ",", "oTempLibCopy", ",", "bSelected", ",", "aRules", ",", "iIndex", ",", "fnFilter", "=", "function", "(", "oRule", ")", "{", "return", "oRule", ".", "id", "===", "rule", ".", "id", ";", "}", ";", "for", "(", "var", "i", "in", "treeTable", ")", "{", "library", "=", "treeTable", "[", "i", "]", ";", "oTempLibCopy", "=", "treeTable", "[", "i", "]", ".", "nodes", ";", "if", "(", "library", ".", "name", "!==", "Constants", ".", "TEMP_RULESETS_NAME", ")", "{", "continue", ";", "}", "//reset the model to add the temp rules", "treeTable", "[", "i", "]", ".", "nodes", "=", "[", "]", ";", "for", "(", "var", "ruleIndex", "in", "tempLib", ".", "rules", ")", "{", "rule", "=", "tempLib", ".", "rules", "[", "ruleIndex", "]", ";", "bSelected", "=", "oTempLibCopy", "[", "ruleIndex", "]", "!==", "undefined", "?", "oTempLibCopy", "[", "ruleIndex", "]", ".", "selected", ":", "true", ";", "// syncs selection of temporary rules from local storage", "if", "(", "this", ".", "tempRulesFromStorage", ")", "{", "aRules", "=", "this", ".", "tempRulesFromStorage", ".", "filter", "(", "fnFilter", ")", ";", "if", "(", "aRules", ".", "length", ">", "0", ")", "{", "bSelected", "=", "aRules", "[", "0", "]", ".", "selected", ";", "iIndex", "=", "this", ".", "tempRulesFromStorage", ".", "indexOf", "(", "aRules", "[", "0", "]", ")", ";", "this", ".", "tempRulesFromStorage", ".", "splice", "(", "iIndex", ",", "1", ")", ";", "if", "(", "bSelected", "===", "false", ")", "{", "library", ".", "selected", "=", "false", ";", "}", "}", "if", "(", "this", ".", "tempRulesFromStorage", ".", "length", "===", "0", ")", "{", "this", ".", "tempRulesFromStorage", ".", "length", "=", "null", ";", "}", "}", "library", ".", "nodes", ".", "push", "(", "{", "name", ":", "rule", ".", "title", ",", "description", ":", "rule", ".", "description", ",", "id", ":", "rule", ".", "id", ",", "audiences", ":", "rule", ".", "audiences", ".", "toString", "(", ")", ",", "categories", ":", "rule", ".", "categories", ".", "toString", "(", ")", ",", "minversion", ":", "rule", ".", "minversion", ",", "resolution", ":", "rule", ".", "resolution", ",", "title", ":", "rule", ".", "title", ",", "selected", ":", "bSelected", ",", "libName", ":", "library", ".", "name", ",", "check", ":", "rule", ".", "check", "}", ")", ";", "}", "this", ".", "model", ".", "setProperty", "(", "\"/treeModel\"", ",", "treeTable", ")", ";", "return", "library", ";", "}", "}" ]
Keeps in sync the TreeViewModel for temporary library that we use for visualisation of sap.m.TreeTable and the model that we use in the Suppport Assistant @param {Object} tempLib temporary library model from Support Assistant @param {Object} treeTable Model for sap.m.TreeTable visualization @returns {Object} The temp library
[ "Keeps", "in", "sync", "the", "TreeViewModel", "for", "temporary", "library", "that", "we", "use", "for", "visualisation", "of", "sap", ".", "m", ".", "TreeTable", "and", "the", "model", "that", "we", "use", "in", "the", "Suppport", "Assistant" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L451-L514
3,707
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function (tempRule, treeTable) { var ruleSource = this.model.getProperty("/editRuleSource"); for (var i in treeTable) { if (treeTable[i].name === Constants.TEMP_RULESETS_NAME) { for (var innerIndex in treeTable[i].nodes) { if (treeTable[i].nodes[innerIndex].id === ruleSource.id) { treeTable[i].nodes[innerIndex] = { name: tempRule.title, description: tempRule.description, id: tempRule.id, audiences: tempRule.audiences, categories: tempRule.categories, minversion: tempRule.minversion, resolution: tempRule.resolution, selected: treeTable[i].nodes[innerIndex].selected, title: tempRule.title, libName: treeTable[i].name, check: tempRule.check }; } } } } }
javascript
function (tempRule, treeTable) { var ruleSource = this.model.getProperty("/editRuleSource"); for (var i in treeTable) { if (treeTable[i].name === Constants.TEMP_RULESETS_NAME) { for (var innerIndex in treeTable[i].nodes) { if (treeTable[i].nodes[innerIndex].id === ruleSource.id) { treeTable[i].nodes[innerIndex] = { name: tempRule.title, description: tempRule.description, id: tempRule.id, audiences: tempRule.audiences, categories: tempRule.categories, minversion: tempRule.minversion, resolution: tempRule.resolution, selected: treeTable[i].nodes[innerIndex].selected, title: tempRule.title, libName: treeTable[i].name, check: tempRule.check }; } } } } }
[ "function", "(", "tempRule", ",", "treeTable", ")", "{", "var", "ruleSource", "=", "this", ".", "model", ".", "getProperty", "(", "\"/editRuleSource\"", ")", ";", "for", "(", "var", "i", "in", "treeTable", ")", "{", "if", "(", "treeTable", "[", "i", "]", ".", "name", "===", "Constants", ".", "TEMP_RULESETS_NAME", ")", "{", "for", "(", "var", "innerIndex", "in", "treeTable", "[", "i", "]", ".", "nodes", ")", "{", "if", "(", "treeTable", "[", "i", "]", ".", "nodes", "[", "innerIndex", "]", ".", "id", "===", "ruleSource", ".", "id", ")", "{", "treeTable", "[", "i", "]", ".", "nodes", "[", "innerIndex", "]", "=", "{", "name", ":", "tempRule", ".", "title", ",", "description", ":", "tempRule", ".", "description", ",", "id", ":", "tempRule", ".", "id", ",", "audiences", ":", "tempRule", ".", "audiences", ",", "categories", ":", "tempRule", ".", "categories", ",", "minversion", ":", "tempRule", ".", "minversion", ",", "resolution", ":", "tempRule", ".", "resolution", ",", "selected", ":", "treeTable", "[", "i", "]", ".", "nodes", "[", "innerIndex", "]", ".", "selected", ",", "title", ":", "tempRule", ".", "title", ",", "libName", ":", "treeTable", "[", "i", "]", ".", "name", ",", "check", ":", "tempRule", ".", "check", "}", ";", "}", "}", "}", "}", "}" ]
Keeps in sync the TreeViewModel for temporary rules that we use for visualisation of sap.m.TreeTable and the model that we use in the SuppportAssistant @param {Object} tempRule Temporary rule @param {Object} treeTable Model for sap.m.TreeTable visualization
[ "Keeps", "in", "sync", "the", "TreeViewModel", "for", "temporary", "rules", "that", "we", "use", "for", "visualisation", "of", "sap", ".", "m", ".", "TreeTable", "and", "the", "model", "that", "we", "use", "in", "the", "SuppportAssistant" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L521-L544
3,708
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function () { var tempRules = Storage.getRules(), loadingFromAdditionalRuleSets = this.model.getProperty("/loadingAdditionalRuleSets"); if (tempRules && !loadingFromAdditionalRuleSets && !this.tempRulesLoaded) { this.tempRulesFromStorage = tempRules; this.tempRulesLoaded = true; tempRules.forEach(function (tempRule) { CommunicationBus.publish(channelNames.VERIFY_CREATE_RULE, RuleSerializer.serialize(tempRule)); }); this.persistedTempRulesCount = tempRules.length; } }
javascript
function () { var tempRules = Storage.getRules(), loadingFromAdditionalRuleSets = this.model.getProperty("/loadingAdditionalRuleSets"); if (tempRules && !loadingFromAdditionalRuleSets && !this.tempRulesLoaded) { this.tempRulesFromStorage = tempRules; this.tempRulesLoaded = true; tempRules.forEach(function (tempRule) { CommunicationBus.publish(channelNames.VERIFY_CREATE_RULE, RuleSerializer.serialize(tempRule)); }); this.persistedTempRulesCount = tempRules.length; } }
[ "function", "(", ")", "{", "var", "tempRules", "=", "Storage", ".", "getRules", "(", ")", ",", "loadingFromAdditionalRuleSets", "=", "this", ".", "model", ".", "getProperty", "(", "\"/loadingAdditionalRuleSets\"", ")", ";", "if", "(", "tempRules", "&&", "!", "loadingFromAdditionalRuleSets", "&&", "!", "this", ".", "tempRulesLoaded", ")", "{", "this", ".", "tempRulesFromStorage", "=", "tempRules", ";", "this", ".", "tempRulesLoaded", "=", "true", ";", "tempRules", ".", "forEach", "(", "function", "(", "tempRule", ")", "{", "CommunicationBus", ".", "publish", "(", "channelNames", ".", "VERIFY_CREATE_RULE", ",", "RuleSerializer", ".", "serialize", "(", "tempRule", ")", ")", ";", "}", ")", ";", "this", ".", "persistedTempRulesCount", "=", "tempRules", ".", "length", ";", "}", "}" ]
Loads temporary rules from the local storage
[ "Loads", "temporary", "rules", "from", "the", "local", "storage" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L725-L739
3,709
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function (event) { var sPath = event.getSource().getBindingContext("treeModel").getPath(), sourceObject = this.treeTable.getBinding().getModel().getProperty(sPath), libs = this.model.getProperty("/libraries"); libs.forEach(function (lib, libIndex) { lib.rules.forEach(function (rule) { if (rule.id === sourceObject.id) { sourceObject.check = rule.check; } }); }); return sourceObject; }
javascript
function (event) { var sPath = event.getSource().getBindingContext("treeModel").getPath(), sourceObject = this.treeTable.getBinding().getModel().getProperty(sPath), libs = this.model.getProperty("/libraries"); libs.forEach(function (lib, libIndex) { lib.rules.forEach(function (rule) { if (rule.id === sourceObject.id) { sourceObject.check = rule.check; } }); }); return sourceObject; }
[ "function", "(", "event", ")", "{", "var", "sPath", "=", "event", ".", "getSource", "(", ")", ".", "getBindingContext", "(", "\"treeModel\"", ")", ".", "getPath", "(", ")", ",", "sourceObject", "=", "this", ".", "treeTable", ".", "getBinding", "(", ")", ".", "getModel", "(", ")", ".", "getProperty", "(", "sPath", ")", ",", "libs", "=", "this", ".", "model", ".", "getProperty", "(", "\"/libraries\"", ")", ";", "libs", ".", "forEach", "(", "function", "(", "lib", ",", "libIndex", ")", "{", "lib", ".", "rules", ".", "forEach", "(", "function", "(", "rule", ")", "{", "if", "(", "rule", ".", "id", "===", "sourceObject", ".", "id", ")", "{", "sourceObject", ".", "check", "=", "rule", ".", "check", ";", "}", "}", ")", ";", "}", ")", ";", "return", "sourceObject", ";", "}" ]
Gets rule from selected row @param {Object} event Event @returns {Object} ISelected rule from row *
[ "Gets", "rule", "from", "selected", "row" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L966-L979
3,710
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function (aColumnsIds, bVisibilityValue) { var aColumns = this.treeTable.getColumns(); aColumns.forEach(function(oColumn) { oColumn.setVisible(!bVisibilityValue); aColumnsIds.forEach(function(sRuleId) { if (oColumn.sId.includes(sRuleId)) { oColumn.setVisible(bVisibilityValue); } }); }); }
javascript
function (aColumnsIds, bVisibilityValue) { var aColumns = this.treeTable.getColumns(); aColumns.forEach(function(oColumn) { oColumn.setVisible(!bVisibilityValue); aColumnsIds.forEach(function(sRuleId) { if (oColumn.sId.includes(sRuleId)) { oColumn.setVisible(bVisibilityValue); } }); }); }
[ "function", "(", "aColumnsIds", ",", "bVisibilityValue", ")", "{", "var", "aColumns", "=", "this", ".", "treeTable", ".", "getColumns", "(", ")", ";", "aColumns", ".", "forEach", "(", "function", "(", "oColumn", ")", "{", "oColumn", ".", "setVisible", "(", "!", "bVisibilityValue", ")", ";", "aColumnsIds", ".", "forEach", "(", "function", "(", "sRuleId", ")", "{", "if", "(", "oColumn", ".", "sId", ".", "includes", "(", "sRuleId", ")", ")", "{", "oColumn", ".", "setVisible", "(", "bVisibilityValue", ")", ";", "}", "}", ")", ";", "}", ")", ";", "}" ]
Sets visibility to columns. @param {Array} aColumnsIds Ids of columns @param {boolean} bVisibilityValue
[ "Sets", "visibility", "to", "columns", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L996-L1007
3,711
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function (oEvent) { var oColumn = oEvent.getParameter("column"), bNewVisibilityState = oEvent.getParameter("newVisible"); if (!this.model.getProperty("/persistingSettings")) { return; } oColumn.setVisible(bNewVisibilityState); this.persistVisibleColumns(); }
javascript
function (oEvent) { var oColumn = oEvent.getParameter("column"), bNewVisibilityState = oEvent.getParameter("newVisible"); if (!this.model.getProperty("/persistingSettings")) { return; } oColumn.setVisible(bNewVisibilityState); this.persistVisibleColumns(); }
[ "function", "(", "oEvent", ")", "{", "var", "oColumn", "=", "oEvent", ".", "getParameter", "(", "\"column\"", ")", ",", "bNewVisibilityState", "=", "oEvent", ".", "getParameter", "(", "\"newVisible\"", ")", ";", "if", "(", "!", "this", ".", "model", ".", "getProperty", "(", "\"/persistingSettings\"", ")", ")", "{", "return", ";", "}", "oColumn", ".", "setVisible", "(", "bNewVisibilityState", ")", ";", "this", ".", "persistVisibleColumns", "(", ")", ";", "}" ]
On column visibility change persist column visibility selection @param {object} oEvent event
[ "On", "column", "visibility", "change", "persist", "column", "visibility", "selection" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L1013-L1021
3,712
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(oModelReference, mParameter) { if (typeof mParameter == "string") { throw "Deprecated second argument: Adjust your invocation by passing an object with a property sAnnotationJSONDoc as a second argument instead"; } this._mParameter = mParameter; var that = this; /* * get access to OData model */ this._oActivatedWorkarounds = {}; if (oModelReference && oModelReference.aWorkaroundID) { for (var i = -1, sID; (sID = oModelReference.aWorkaroundID[++i]) !== undefined;) { this._oActivatedWorkarounds[sID] = true; } oModelReference = oModelReference.oModelReference; } // check proper usage if (!oModelReference || (!oModelReference.sServiceURI && !oModelReference.oModel)) { throw "Usage with oModelReference being an instance of Model.ReferenceByURI or Model.ReferenceByModel"; } //check if a model is given, or we need to create one from the service URI if (oModelReference.oModel) { this._oModel = oModelReference.oModel; // find out which model version we are running this._iVersion = AnalyticalVersionInfo.getVersion(this._oModel); checkForMetadata(); } else if (mParameter && mParameter.modelVersion === AnalyticalVersionInfo.V2) { // Check if the user wants a V2 model var V2ODataModel = sap.ui.requireSync("sap/ui/model/odata/v2/ODataModel"); this._oModel = new V2ODataModel(oModelReference.sServiceURI); this._iVersion = AnalyticalVersionInfo.V2; checkForMetadata(); } else { //default is V1 Model var ODataModel = sap.ui.requireSync("sap/ui/model/odata/ODataModel"); this._oModel = new ODataModel(oModelReference.sServiceURI); this._iVersion = AnalyticalVersionInfo.V1; checkForMetadata(); } if (this._oModel.getServiceMetadata() && this._oModel.getServiceMetadata().dataServices == undefined) { throw "Model could not be loaded"; } /** * Check if the metadata is already available, if not defere the interpretation of the Metadata */ function checkForMetadata() { // V2 supports asynchronous loading of metadata // we have to register for the MetadataLoaded Event in case, the data is not loaded already if (!that._oModel.getServiceMetadata()) { that._oModel.attachMetadataLoaded(processMetadata); } else { // metadata already loaded processMetadata(); } } /** * Kickstart the interpretation of the metadata, * either called directly if metadata is available, or deferred and then * executed via callback by the model during the metadata loaded event. */ function processMetadata () { //only interprete the metadata if the analytics model was not initialised yet if (that.bIsInitialized) { return; } //mark analytics model as initialized that.bIsInitialized = true; /* * add extra annotations if provided */ if (mParameter && mParameter.sAnnotationJSONDoc) { that.mergeV2Annotations(mParameter.sAnnotationJSONDoc); } that._interpreteMetadata(that._oModel.getServiceMetadata().dataServices); } }
javascript
function(oModelReference, mParameter) { if (typeof mParameter == "string") { throw "Deprecated second argument: Adjust your invocation by passing an object with a property sAnnotationJSONDoc as a second argument instead"; } this._mParameter = mParameter; var that = this; /* * get access to OData model */ this._oActivatedWorkarounds = {}; if (oModelReference && oModelReference.aWorkaroundID) { for (var i = -1, sID; (sID = oModelReference.aWorkaroundID[++i]) !== undefined;) { this._oActivatedWorkarounds[sID] = true; } oModelReference = oModelReference.oModelReference; } // check proper usage if (!oModelReference || (!oModelReference.sServiceURI && !oModelReference.oModel)) { throw "Usage with oModelReference being an instance of Model.ReferenceByURI or Model.ReferenceByModel"; } //check if a model is given, or we need to create one from the service URI if (oModelReference.oModel) { this._oModel = oModelReference.oModel; // find out which model version we are running this._iVersion = AnalyticalVersionInfo.getVersion(this._oModel); checkForMetadata(); } else if (mParameter && mParameter.modelVersion === AnalyticalVersionInfo.V2) { // Check if the user wants a V2 model var V2ODataModel = sap.ui.requireSync("sap/ui/model/odata/v2/ODataModel"); this._oModel = new V2ODataModel(oModelReference.sServiceURI); this._iVersion = AnalyticalVersionInfo.V2; checkForMetadata(); } else { //default is V1 Model var ODataModel = sap.ui.requireSync("sap/ui/model/odata/ODataModel"); this._oModel = new ODataModel(oModelReference.sServiceURI); this._iVersion = AnalyticalVersionInfo.V1; checkForMetadata(); } if (this._oModel.getServiceMetadata() && this._oModel.getServiceMetadata().dataServices == undefined) { throw "Model could not be loaded"; } /** * Check if the metadata is already available, if not defere the interpretation of the Metadata */ function checkForMetadata() { // V2 supports asynchronous loading of metadata // we have to register for the MetadataLoaded Event in case, the data is not loaded already if (!that._oModel.getServiceMetadata()) { that._oModel.attachMetadataLoaded(processMetadata); } else { // metadata already loaded processMetadata(); } } /** * Kickstart the interpretation of the metadata, * either called directly if metadata is available, or deferred and then * executed via callback by the model during the metadata loaded event. */ function processMetadata () { //only interprete the metadata if the analytics model was not initialised yet if (that.bIsInitialized) { return; } //mark analytics model as initialized that.bIsInitialized = true; /* * add extra annotations if provided */ if (mParameter && mParameter.sAnnotationJSONDoc) { that.mergeV2Annotations(mParameter.sAnnotationJSONDoc); } that._interpreteMetadata(that._oModel.getServiceMetadata().dataServices); } }
[ "function", "(", "oModelReference", ",", "mParameter", ")", "{", "if", "(", "typeof", "mParameter", "==", "\"string\"", ")", "{", "throw", "\"Deprecated second argument: Adjust your invocation by passing an object with a property sAnnotationJSONDoc as a second argument instead\"", ";", "}", "this", ".", "_mParameter", "=", "mParameter", ";", "var", "that", "=", "this", ";", "/*\n\t\t\t * get access to OData model\n\t\t\t */", "this", ".", "_oActivatedWorkarounds", "=", "{", "}", ";", "if", "(", "oModelReference", "&&", "oModelReference", ".", "aWorkaroundID", ")", "{", "for", "(", "var", "i", "=", "-", "1", ",", "sID", ";", "(", "sID", "=", "oModelReference", ".", "aWorkaroundID", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "this", ".", "_oActivatedWorkarounds", "[", "sID", "]", "=", "true", ";", "}", "oModelReference", "=", "oModelReference", ".", "oModelReference", ";", "}", "// check proper usage", "if", "(", "!", "oModelReference", "||", "(", "!", "oModelReference", ".", "sServiceURI", "&&", "!", "oModelReference", ".", "oModel", ")", ")", "{", "throw", "\"Usage with oModelReference being an instance of Model.ReferenceByURI or Model.ReferenceByModel\"", ";", "}", "//check if a model is given, or we need to create one from the service URI", "if", "(", "oModelReference", ".", "oModel", ")", "{", "this", ".", "_oModel", "=", "oModelReference", ".", "oModel", ";", "// find out which model version we are running", "this", ".", "_iVersion", "=", "AnalyticalVersionInfo", ".", "getVersion", "(", "this", ".", "_oModel", ")", ";", "checkForMetadata", "(", ")", ";", "}", "else", "if", "(", "mParameter", "&&", "mParameter", ".", "modelVersion", "===", "AnalyticalVersionInfo", ".", "V2", ")", "{", "// Check if the user wants a V2 model", "var", "V2ODataModel", "=", "sap", ".", "ui", ".", "requireSync", "(", "\"sap/ui/model/odata/v2/ODataModel\"", ")", ";", "this", ".", "_oModel", "=", "new", "V2ODataModel", "(", "oModelReference", ".", "sServiceURI", ")", ";", "this", ".", "_iVersion", "=", "AnalyticalVersionInfo", ".", "V2", ";", "checkForMetadata", "(", ")", ";", "}", "else", "{", "//default is V1 Model", "var", "ODataModel", "=", "sap", ".", "ui", ".", "requireSync", "(", "\"sap/ui/model/odata/ODataModel\"", ")", ";", "this", ".", "_oModel", "=", "new", "ODataModel", "(", "oModelReference", ".", "sServiceURI", ")", ";", "this", ".", "_iVersion", "=", "AnalyticalVersionInfo", ".", "V1", ";", "checkForMetadata", "(", ")", ";", "}", "if", "(", "this", ".", "_oModel", ".", "getServiceMetadata", "(", ")", "&&", "this", ".", "_oModel", ".", "getServiceMetadata", "(", ")", ".", "dataServices", "==", "undefined", ")", "{", "throw", "\"Model could not be loaded\"", ";", "}", "/**\n\t\t\t * Check if the metadata is already available, if not defere the interpretation of the Metadata\n\t\t\t */", "function", "checkForMetadata", "(", ")", "{", "// V2 supports asynchronous loading of metadata", "// we have to register for the MetadataLoaded Event in case, the data is not loaded already", "if", "(", "!", "that", ".", "_oModel", ".", "getServiceMetadata", "(", ")", ")", "{", "that", ".", "_oModel", ".", "attachMetadataLoaded", "(", "processMetadata", ")", ";", "}", "else", "{", "// metadata already loaded", "processMetadata", "(", ")", ";", "}", "}", "/**\n\t\t\t * Kickstart the interpretation of the metadata,\n\t\t\t * either called directly if metadata is available, or deferred and then\n\t\t\t * executed via callback by the model during the metadata loaded event.\n\t\t\t */", "function", "processMetadata", "(", ")", "{", "//only interprete the metadata if the analytics model was not initialised yet", "if", "(", "that", ".", "bIsInitialized", ")", "{", "return", ";", "}", "//mark analytics model as initialized", "that", ".", "bIsInitialized", "=", "true", ";", "/*\n\t\t\t\t * add extra annotations if provided\n\t\t\t\t */", "if", "(", "mParameter", "&&", "mParameter", ".", "sAnnotationJSONDoc", ")", "{", "that", ".", "mergeV2Annotations", "(", "mParameter", ".", "sAnnotationJSONDoc", ")", ";", "}", "that", ".", "_interpreteMetadata", "(", "that", ".", "_oModel", ".", "getServiceMetadata", "(", ")", ".", "dataServices", ")", ";", "}", "}" ]
initialize a new object @private
[ "initialize", "a", "new", "object" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L245-L333
3,713
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
processMetadata
function processMetadata () { //only interprete the metadata if the analytics model was not initialised yet if (that.bIsInitialized) { return; } //mark analytics model as initialized that.bIsInitialized = true; /* * add extra annotations if provided */ if (mParameter && mParameter.sAnnotationJSONDoc) { that.mergeV2Annotations(mParameter.sAnnotationJSONDoc); } that._interpreteMetadata(that._oModel.getServiceMetadata().dataServices); }
javascript
function processMetadata () { //only interprete the metadata if the analytics model was not initialised yet if (that.bIsInitialized) { return; } //mark analytics model as initialized that.bIsInitialized = true; /* * add extra annotations if provided */ if (mParameter && mParameter.sAnnotationJSONDoc) { that.mergeV2Annotations(mParameter.sAnnotationJSONDoc); } that._interpreteMetadata(that._oModel.getServiceMetadata().dataServices); }
[ "function", "processMetadata", "(", ")", "{", "//only interprete the metadata if the analytics model was not initialised yet", "if", "(", "that", ".", "bIsInitialized", ")", "{", "return", ";", "}", "//mark analytics model as initialized", "that", ".", "bIsInitialized", "=", "true", ";", "/*\n\t\t\t\t * add extra annotations if provided\n\t\t\t\t */", "if", "(", "mParameter", "&&", "mParameter", ".", "sAnnotationJSONDoc", ")", "{", "that", ".", "mergeV2Annotations", "(", "mParameter", ".", "sAnnotationJSONDoc", ")", ";", "}", "that", ".", "_interpreteMetadata", "(", "that", ".", "_oModel", ".", "getServiceMetadata", "(", ")", ".", "dataServices", ")", ";", "}" ]
Kickstart the interpretation of the metadata, either called directly if metadata is available, or deferred and then executed via callback by the model during the metadata loaded event.
[ "Kickstart", "the", "interpretation", "of", "the", "metadata", "either", "called", "directly", "if", "metadata", "is", "available", "or", "deferred", "and", "then", "executed", "via", "callback", "by", "the", "model", "during", "the", "metadata", "loaded", "event", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L314-L331
3,714
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sName) { var oQueryResult = this._oQueryResultSet[sName]; // Everybody should have a second chance: // If the name was not fully qualified, check if it is in the default // container if (!oQueryResult && this._oDefaultEntityContainer) { var sQName = this._oDefaultEntityContainer.name + "." + sName; oQueryResult = this._oQueryResultSet[sQName]; } return oQueryResult; }
javascript
function(sName) { var oQueryResult = this._oQueryResultSet[sName]; // Everybody should have a second chance: // If the name was not fully qualified, check if it is in the default // container if (!oQueryResult && this._oDefaultEntityContainer) { var sQName = this._oDefaultEntityContainer.name + "." + sName; oQueryResult = this._oQueryResultSet[sQName]; } return oQueryResult; }
[ "function", "(", "sName", ")", "{", "var", "oQueryResult", "=", "this", ".", "_oQueryResultSet", "[", "sName", "]", ";", "// Everybody should have a second chance:", "// If the name was not fully qualified, check if it is in the default", "// container", "if", "(", "!", "oQueryResult", "&&", "this", ".", "_oDefaultEntityContainer", ")", "{", "var", "sQName", "=", "this", ".", "_oDefaultEntityContainer", ".", "name", "+", "\".\"", "+", "sName", ";", "oQueryResult", "=", "this", ".", "_oQueryResultSet", "[", "sQName", "]", ";", "}", "return", "oQueryResult", ";", "}" ]
Find analytic query result by name @param {string} sName Fully qualified name of query result entity set @returns {sap.ui.model.analytics.odata4analytics.QueryResult} The query result object with this name or null if it does not exist @public @function @name sap.ui.model.analytics.odata4analytics.Model#findQueryResultByName
[ "Find", "analytic", "query", "result", "by", "name" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L743-L755
3,715
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(oSchema, sQTypeName) { var aEntitySet = []; for (var i = -1, oEntityContainer; (oEntityContainer = oSchema.entityContainer[++i]) !== undefined;) { for (var j = -1, oEntitySet; (oEntitySet = oEntityContainer.entitySet[++j]) !== undefined;) { if (oEntitySet.entityType == sQTypeName) { aEntitySet.push([ oEntityContainer, oEntitySet ]); } } } return aEntitySet; }
javascript
function(oSchema, sQTypeName) { var aEntitySet = []; for (var i = -1, oEntityContainer; (oEntityContainer = oSchema.entityContainer[++i]) !== undefined;) { for (var j = -1, oEntitySet; (oEntitySet = oEntityContainer.entitySet[++j]) !== undefined;) { if (oEntitySet.entityType == sQTypeName) { aEntitySet.push([ oEntityContainer, oEntitySet ]); } } } return aEntitySet; }
[ "function", "(", "oSchema", ",", "sQTypeName", ")", "{", "var", "aEntitySet", "=", "[", "]", ";", "for", "(", "var", "i", "=", "-", "1", ",", "oEntityContainer", ";", "(", "oEntityContainer", "=", "oSchema", ".", "entityContainer", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "for", "(", "var", "j", "=", "-", "1", ",", "oEntitySet", ";", "(", "oEntitySet", "=", "oEntityContainer", ".", "entitySet", "[", "++", "j", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "oEntitySet", ".", "entityType", "==", "sQTypeName", ")", "{", "aEntitySet", ".", "push", "(", "[", "oEntityContainer", ",", "oEntitySet", "]", ")", ";", "}", "}", "}", "return", "aEntitySet", ";", "}" ]
Private methods Find entity sets of a given type @private
[ "Private", "methods", "Find", "entity", "sets", "of", "a", "given", "type" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L815-L827
3,716
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(oModel, oEntityType, oEntitySet, oParameterization, oAssocFromParamsToResult) { this._oModel = oModel; this._oEntityType = oEntityType; this._oEntitySet = oEntitySet; this._oParameterization = oParameterization; this._oDimensionSet = {}; this._oMeasureSet = {}; // parse entity type for analytic semantics described by annotations var aProperty = oEntityType.getTypeDescription().property; var oAttributeForPropertySet = {}; for (var i = -1, oProperty; (oProperty = aProperty[++i]) !== undefined;) { if (oProperty.extensions == undefined) { continue; } for (var j = -1, oExtension; (oExtension = oProperty.extensions[++j]) !== undefined;) { if (!oExtension.namespace == odata4analytics.constants.SAP_NAMESPACE) { continue; } switch (oExtension.name) { case "aggregation-role": switch (oExtension.value) { case "dimension": { var oDimension = new odata4analytics.Dimension(this, oProperty); this._oDimensionSet[oDimension.getName()] = oDimension; break; } case "measure": { var oMeasure = new odata4analytics.Measure(this, oProperty); this._oMeasureSet[oMeasure.getName()] = oMeasure; break; } case "totaled-properties-list": this._oTotaledPropertyListProperty = oProperty; break; default: } break; case "attribute-for": { var oDimensionAttribute = new odata4analytics.DimensionAttribute(this, oProperty); var oKeyProperty = oDimensionAttribute.getKeyProperty(); oAttributeForPropertySet[oKeyProperty.name] = oDimensionAttribute; break; } default: } } } // assign dimension attributes to the respective dimension objects for ( var sDimensionAttributeName in oAttributeForPropertySet) { var oDimensionAttribute2 = oAttributeForPropertySet[sDimensionAttributeName]; oDimensionAttribute2.getDimension().addAttribute(oDimensionAttribute2); } // apply workaround for missing text properties if requested if (oModel._oActivatedWorkarounds.IdentifyTextPropertiesByName) { var aMatchedTextPropertyName = []; for ( var oDimName in this._oDimensionSet) { var oDimension2 = this._oDimensionSet[oDimName]; if (!oDimension2.getTextProperty()) { var oTextProperty = null; // order of matching is // significant! oTextProperty = oEntityType.findPropertyByName(oDimName + "Name"); if (!oTextProperty) { oTextProperty = oEntityType.findPropertyByName(oDimName + "Text"); } if (!oTextProperty) { oTextProperty = oEntityType.findPropertyByName(oDimName + "Desc"); } if (!oTextProperty) { oTextProperty = oEntityType.findPropertyByName(oDimName + "Description"); } if (oTextProperty) { // any match? oDimension2.setTextProperty(oTextProperty); // link // dimension // with text // property aMatchedTextPropertyName.push(oTextProperty.name); } } } // make sure that any matched text property is not exposed as // dimension (according to spec) for (var t = -1, sPropertyName; (sPropertyName = aMatchedTextPropertyName[++t]) !== undefined;) { delete this._oDimensionSet[sPropertyName]; } } }
javascript
function(oModel, oEntityType, oEntitySet, oParameterization, oAssocFromParamsToResult) { this._oModel = oModel; this._oEntityType = oEntityType; this._oEntitySet = oEntitySet; this._oParameterization = oParameterization; this._oDimensionSet = {}; this._oMeasureSet = {}; // parse entity type for analytic semantics described by annotations var aProperty = oEntityType.getTypeDescription().property; var oAttributeForPropertySet = {}; for (var i = -1, oProperty; (oProperty = aProperty[++i]) !== undefined;) { if (oProperty.extensions == undefined) { continue; } for (var j = -1, oExtension; (oExtension = oProperty.extensions[++j]) !== undefined;) { if (!oExtension.namespace == odata4analytics.constants.SAP_NAMESPACE) { continue; } switch (oExtension.name) { case "aggregation-role": switch (oExtension.value) { case "dimension": { var oDimension = new odata4analytics.Dimension(this, oProperty); this._oDimensionSet[oDimension.getName()] = oDimension; break; } case "measure": { var oMeasure = new odata4analytics.Measure(this, oProperty); this._oMeasureSet[oMeasure.getName()] = oMeasure; break; } case "totaled-properties-list": this._oTotaledPropertyListProperty = oProperty; break; default: } break; case "attribute-for": { var oDimensionAttribute = new odata4analytics.DimensionAttribute(this, oProperty); var oKeyProperty = oDimensionAttribute.getKeyProperty(); oAttributeForPropertySet[oKeyProperty.name] = oDimensionAttribute; break; } default: } } } // assign dimension attributes to the respective dimension objects for ( var sDimensionAttributeName in oAttributeForPropertySet) { var oDimensionAttribute2 = oAttributeForPropertySet[sDimensionAttributeName]; oDimensionAttribute2.getDimension().addAttribute(oDimensionAttribute2); } // apply workaround for missing text properties if requested if (oModel._oActivatedWorkarounds.IdentifyTextPropertiesByName) { var aMatchedTextPropertyName = []; for ( var oDimName in this._oDimensionSet) { var oDimension2 = this._oDimensionSet[oDimName]; if (!oDimension2.getTextProperty()) { var oTextProperty = null; // order of matching is // significant! oTextProperty = oEntityType.findPropertyByName(oDimName + "Name"); if (!oTextProperty) { oTextProperty = oEntityType.findPropertyByName(oDimName + "Text"); } if (!oTextProperty) { oTextProperty = oEntityType.findPropertyByName(oDimName + "Desc"); } if (!oTextProperty) { oTextProperty = oEntityType.findPropertyByName(oDimName + "Description"); } if (oTextProperty) { // any match? oDimension2.setTextProperty(oTextProperty); // link // dimension // with text // property aMatchedTextPropertyName.push(oTextProperty.name); } } } // make sure that any matched text property is not exposed as // dimension (according to spec) for (var t = -1, sPropertyName; (sPropertyName = aMatchedTextPropertyName[++t]) !== undefined;) { delete this._oDimensionSet[sPropertyName]; } } }
[ "function", "(", "oModel", ",", "oEntityType", ",", "oEntitySet", ",", "oParameterization", ",", "oAssocFromParamsToResult", ")", "{", "this", ".", "_oModel", "=", "oModel", ";", "this", ".", "_oEntityType", "=", "oEntityType", ";", "this", ".", "_oEntitySet", "=", "oEntitySet", ";", "this", ".", "_oParameterization", "=", "oParameterization", ";", "this", ".", "_oDimensionSet", "=", "{", "}", ";", "this", ".", "_oMeasureSet", "=", "{", "}", ";", "// parse entity type for analytic semantics described by annotations", "var", "aProperty", "=", "oEntityType", ".", "getTypeDescription", "(", ")", ".", "property", ";", "var", "oAttributeForPropertySet", "=", "{", "}", ";", "for", "(", "var", "i", "=", "-", "1", ",", "oProperty", ";", "(", "oProperty", "=", "aProperty", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "oProperty", ".", "extensions", "==", "undefined", ")", "{", "continue", ";", "}", "for", "(", "var", "j", "=", "-", "1", ",", "oExtension", ";", "(", "oExtension", "=", "oProperty", ".", "extensions", "[", "++", "j", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "!", "oExtension", ".", "namespace", "==", "odata4analytics", ".", "constants", ".", "SAP_NAMESPACE", ")", "{", "continue", ";", "}", "switch", "(", "oExtension", ".", "name", ")", "{", "case", "\"aggregation-role\"", ":", "switch", "(", "oExtension", ".", "value", ")", "{", "case", "\"dimension\"", ":", "{", "var", "oDimension", "=", "new", "odata4analytics", ".", "Dimension", "(", "this", ",", "oProperty", ")", ";", "this", ".", "_oDimensionSet", "[", "oDimension", ".", "getName", "(", ")", "]", "=", "oDimension", ";", "break", ";", "}", "case", "\"measure\"", ":", "{", "var", "oMeasure", "=", "new", "odata4analytics", ".", "Measure", "(", "this", ",", "oProperty", ")", ";", "this", ".", "_oMeasureSet", "[", "oMeasure", ".", "getName", "(", ")", "]", "=", "oMeasure", ";", "break", ";", "}", "case", "\"totaled-properties-list\"", ":", "this", ".", "_oTotaledPropertyListProperty", "=", "oProperty", ";", "break", ";", "default", ":", "}", "break", ";", "case", "\"attribute-for\"", ":", "{", "var", "oDimensionAttribute", "=", "new", "odata4analytics", ".", "DimensionAttribute", "(", "this", ",", "oProperty", ")", ";", "var", "oKeyProperty", "=", "oDimensionAttribute", ".", "getKeyProperty", "(", ")", ";", "oAttributeForPropertySet", "[", "oKeyProperty", ".", "name", "]", "=", "oDimensionAttribute", ";", "break", ";", "}", "default", ":", "}", "}", "}", "// assign dimension attributes to the respective dimension objects", "for", "(", "var", "sDimensionAttributeName", "in", "oAttributeForPropertySet", ")", "{", "var", "oDimensionAttribute2", "=", "oAttributeForPropertySet", "[", "sDimensionAttributeName", "]", ";", "oDimensionAttribute2", ".", "getDimension", "(", ")", ".", "addAttribute", "(", "oDimensionAttribute2", ")", ";", "}", "// apply workaround for missing text properties if requested", "if", "(", "oModel", ".", "_oActivatedWorkarounds", ".", "IdentifyTextPropertiesByName", ")", "{", "var", "aMatchedTextPropertyName", "=", "[", "]", ";", "for", "(", "var", "oDimName", "in", "this", ".", "_oDimensionSet", ")", "{", "var", "oDimension2", "=", "this", ".", "_oDimensionSet", "[", "oDimName", "]", ";", "if", "(", "!", "oDimension2", ".", "getTextProperty", "(", ")", ")", "{", "var", "oTextProperty", "=", "null", ";", "// order of matching is", "// significant!", "oTextProperty", "=", "oEntityType", ".", "findPropertyByName", "(", "oDimName", "+", "\"Name\"", ")", ";", "if", "(", "!", "oTextProperty", ")", "{", "oTextProperty", "=", "oEntityType", ".", "findPropertyByName", "(", "oDimName", "+", "\"Text\"", ")", ";", "}", "if", "(", "!", "oTextProperty", ")", "{", "oTextProperty", "=", "oEntityType", ".", "findPropertyByName", "(", "oDimName", "+", "\"Desc\"", ")", ";", "}", "if", "(", "!", "oTextProperty", ")", "{", "oTextProperty", "=", "oEntityType", ".", "findPropertyByName", "(", "oDimName", "+", "\"Description\"", ")", ";", "}", "if", "(", "oTextProperty", ")", "{", "// any match?", "oDimension2", ".", "setTextProperty", "(", "oTextProperty", ")", ";", "// link", "// dimension", "// with text", "// property", "aMatchedTextPropertyName", ".", "push", "(", "oTextProperty", ".", "name", ")", ";", "}", "}", "}", "// make sure that any matched text property is not exposed as", "// dimension (according to spec)", "for", "(", "var", "t", "=", "-", "1", ",", "sPropertyName", ";", "(", "sPropertyName", "=", "aMatchedTextPropertyName", "[", "++", "t", "]", ")", "!==", "undefined", ";", ")", "{", "delete", "this", ".", "_oDimensionSet", "[", "sPropertyName", "]", ";", "}", "}", "}" ]
initialize new object @private
[ "initialize", "new", "object" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L880-L971
3,717
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { if (this._aDimensionNames) { return this._aDimensionNames; } this._aDimensionNames = []; for ( var sName in this._oDimensionSet) { this._aDimensionNames.push(this._oDimensionSet[sName].getName()); } return this._aDimensionNames; }
javascript
function() { if (this._aDimensionNames) { return this._aDimensionNames; } this._aDimensionNames = []; for ( var sName in this._oDimensionSet) { this._aDimensionNames.push(this._oDimensionSet[sName].getName()); } return this._aDimensionNames; }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_aDimensionNames", ")", "{", "return", "this", ".", "_aDimensionNames", ";", "}", "this", ".", "_aDimensionNames", "=", "[", "]", ";", "for", "(", "var", "sName", "in", "this", ".", "_oDimensionSet", ")", "{", "this", ".", "_aDimensionNames", ".", "push", "(", "this", ".", "_oDimensionSet", "[", "sName", "]", ".", "getName", "(", ")", ")", ";", "}", "return", "this", ".", "_aDimensionNames", ";", "}" ]
Get the names of all dimensions included in the query result @returns {string[]} List of all dimension names @public @function @name sap.ui.model.analytics.odata4analytics.QueryResult#getAllDimensionNames
[ "Get", "the", "names", "of", "all", "dimensions", "included", "in", "the", "query", "result" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L1009-L1021
3,718
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { if (this._aMeasureNames) { return this._aMeasureNames; } this._aMeasureNames = []; for ( var sName in this._oMeasureSet) { this._aMeasureNames.push(this._oMeasureSet[sName].getName()); } return this._aMeasureNames; }
javascript
function() { if (this._aMeasureNames) { return this._aMeasureNames; } this._aMeasureNames = []; for ( var sName in this._oMeasureSet) { this._aMeasureNames.push(this._oMeasureSet[sName].getName()); } return this._aMeasureNames; }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_aMeasureNames", ")", "{", "return", "this", ".", "_aMeasureNames", ";", "}", "this", ".", "_aMeasureNames", "=", "[", "]", ";", "for", "(", "var", "sName", "in", "this", ".", "_oMeasureSet", ")", "{", "this", ".", "_aMeasureNames", ".", "push", "(", "this", ".", "_oMeasureSet", "[", "sName", "]", ".", "getName", "(", ")", ")", ";", "}", "return", "this", ".", "_aMeasureNames", ";", "}" ]
Get the names of all measures included in the query result @returns {string[]} List of all measure names @public @function @name sap.ui.model.analytics.odata4analytics.QueryResult#getAllMeasureNames
[ "Get", "the", "names", "of", "all", "measures", "included", "in", "the", "query", "result" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L1047-L1059
3,719
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sName) { if (this._oDimensionSet[sName]) { // the easy case return this._oDimensionSet[sName]; } for ( var sDimensionName in this._oDimensionSet) { var oDimension = this._oDimensionSet[sDimensionName]; var oTextProperty = oDimension.getTextProperty(); if (oTextProperty && oTextProperty.name == sName) { return oDimension; } if (oDimension.findAttributeByName(sName)) { return oDimension; } } return null; }
javascript
function(sName) { if (this._oDimensionSet[sName]) { // the easy case return this._oDimensionSet[sName]; } for ( var sDimensionName in this._oDimensionSet) { var oDimension = this._oDimensionSet[sDimensionName]; var oTextProperty = oDimension.getTextProperty(); if (oTextProperty && oTextProperty.name == sName) { return oDimension; } if (oDimension.findAttributeByName(sName)) { return oDimension; } } return null; }
[ "function", "(", "sName", ")", "{", "if", "(", "this", ".", "_oDimensionSet", "[", "sName", "]", ")", "{", "// the easy case", "return", "this", ".", "_oDimensionSet", "[", "sName", "]", ";", "}", "for", "(", "var", "sDimensionName", "in", "this", ".", "_oDimensionSet", ")", "{", "var", "oDimension", "=", "this", ".", "_oDimensionSet", "[", "sDimensionName", "]", ";", "var", "oTextProperty", "=", "oDimension", ".", "getTextProperty", "(", ")", ";", "if", "(", "oTextProperty", "&&", "oTextProperty", ".", "name", "==", "sName", ")", "{", "return", "oDimension", ";", "}", "if", "(", "oDimension", ".", "findAttributeByName", "(", "sName", ")", ")", "{", "return", "oDimension", ";", "}", "}", "return", "null", ";", "}" ]
Find dimension by property name @param {string} sName Property name @returns {sap.ui.model.analytics.odata4analytics.Dimension} The dimension object to which the given property name is related, because the property holds the dimension key, its text, or is an attribute of this dimension. If no such dimension exists, null is returned. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResult#findDimensionByPropertyName
[ "Find", "dimension", "by", "property", "name" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L1105-L1121
3,720
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sName) { if (this._oMeasureSet[sName]) { // the easy case return this._oMeasureSet[sName]; } for ( var sMeasureName in this._oMeasureSet) { var oMeasure = this._oMeasureSet[sMeasureName]; var oFormattedValueProperty = oMeasure.getFormattedValueProperty(); if (oFormattedValueProperty && oFormattedValueProperty.name == sName) { return oMeasure; } } return null; }
javascript
function(sName) { if (this._oMeasureSet[sName]) { // the easy case return this._oMeasureSet[sName]; } for ( var sMeasureName in this._oMeasureSet) { var oMeasure = this._oMeasureSet[sMeasureName]; var oFormattedValueProperty = oMeasure.getFormattedValueProperty(); if (oFormattedValueProperty && oFormattedValueProperty.name == sName) { return oMeasure; } } return null; }
[ "function", "(", "sName", ")", "{", "if", "(", "this", ".", "_oMeasureSet", "[", "sName", "]", ")", "{", "// the easy case", "return", "this", ".", "_oMeasureSet", "[", "sName", "]", ";", "}", "for", "(", "var", "sMeasureName", "in", "this", ".", "_oMeasureSet", ")", "{", "var", "oMeasure", "=", "this", ".", "_oMeasureSet", "[", "sMeasureName", "]", ";", "var", "oFormattedValueProperty", "=", "oMeasure", ".", "getFormattedValueProperty", "(", ")", ";", "if", "(", "oFormattedValueProperty", "&&", "oFormattedValueProperty", ".", "name", "==", "sName", ")", "{", "return", "oMeasure", ";", "}", "}", "return", "null", ";", "}" ]
Find measure by property name @param {string} sName Property name @returns {sap.ui.model.analytics.odata4analytics.Measure} The measure object to which the given property name is related, because the property holds the raw measure value or its formatted value. If no such measure exists, null is returned. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResult#findMeasureByPropertyName
[ "Find", "measure", "by", "property", "name" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L1163-L1176
3,721
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(oQueryResult, oAssociation) { this._oQueryResult = oQueryResult; var sQAssocName = this._oEntityType.getSchema().namespace + "." + oAssociation.name; var aNavProp = this._oEntityType.getTypeDescription().navigationProperty; if (!aNavProp) { throw "Invalid consumption model: Parameters entity type lacks navigation property for association to query result entity type"; } for (var i = -1, oNavProp; (oNavProp = aNavProp[++i]) !== undefined;) { if (oNavProp.relationship == sQAssocName) { this._oNavPropToQueryResult = oNavProp.name; } } if (!this._oNavPropToQueryResult) { throw "Invalid consumption model: Parameters entity type lacks navigation property for association to query result entity type"; } }
javascript
function(oQueryResult, oAssociation) { this._oQueryResult = oQueryResult; var sQAssocName = this._oEntityType.getSchema().namespace + "." + oAssociation.name; var aNavProp = this._oEntityType.getTypeDescription().navigationProperty; if (!aNavProp) { throw "Invalid consumption model: Parameters entity type lacks navigation property for association to query result entity type"; } for (var i = -1, oNavProp; (oNavProp = aNavProp[++i]) !== undefined;) { if (oNavProp.relationship == sQAssocName) { this._oNavPropToQueryResult = oNavProp.name; } } if (!this._oNavPropToQueryResult) { throw "Invalid consumption model: Parameters entity type lacks navigation property for association to query result entity type"; } }
[ "function", "(", "oQueryResult", ",", "oAssociation", ")", "{", "this", ".", "_oQueryResult", "=", "oQueryResult", ";", "var", "sQAssocName", "=", "this", ".", "_oEntityType", ".", "getSchema", "(", ")", ".", "namespace", "+", "\".\"", "+", "oAssociation", ".", "name", ";", "var", "aNavProp", "=", "this", ".", "_oEntityType", ".", "getTypeDescription", "(", ")", ".", "navigationProperty", ";", "if", "(", "!", "aNavProp", ")", "{", "throw", "\"Invalid consumption model: Parameters entity type lacks navigation property for association to query result entity type\"", ";", "}", "for", "(", "var", "i", "=", "-", "1", ",", "oNavProp", ";", "(", "oNavProp", "=", "aNavProp", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "oNavProp", ".", "relationship", "==", "sQAssocName", ")", "{", "this", ".", "_oNavPropToQueryResult", "=", "oNavProp", ".", "name", ";", "}", "}", "if", "(", "!", "this", ".", "_oNavPropToQueryResult", ")", "{", "throw", "\"Invalid consumption model: Parameters entity type lacks navigation property for association to query result entity type\"", ";", "}", "}" ]
to be called only by Model objects
[ "to", "be", "called", "only", "by", "Model", "objects" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L1291-L1306
3,722
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { if (this._aParameterNames) { return this._aParameterNames; } this._aParameterNames = []; for ( var sName in this._oParameterSet) { this._aParameterNames.push(this._oParameterSet[sName].getName()); } return this._aParameterNames; }
javascript
function() { if (this._aParameterNames) { return this._aParameterNames; } this._aParameterNames = []; for ( var sName in this._oParameterSet) { this._aParameterNames.push(this._oParameterSet[sName].getName()); } return this._aParameterNames; }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_aParameterNames", ")", "{", "return", "this", ".", "_aParameterNames", ";", "}", "this", ".", "_aParameterNames", "=", "[", "]", ";", "for", "(", "var", "sName", "in", "this", ".", "_oParameterSet", ")", "{", "this", ".", "_aParameterNames", ".", "push", "(", "this", ".", "_oParameterSet", "[", "sName", "]", ".", "getName", "(", ")", ")", ";", "}", "return", "this", ".", "_aParameterNames", ";", "}" ]
Get the names of all parameters part of the parameterization @returns {string[]} List of all parameter names @public @function @name sap.ui.model.analytics.odata4analytics.Parameterization#getAllParameterNames
[ "Get", "the", "names", "of", "all", "parameters", "part", "of", "the", "parameterization" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L1337-L1349
3,723
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { var sPeerParamPropName = null; if (this._oLowerIntervalBoundaryParameterProperty) { sPeerParamPropName = this._oLowerIntervalBoundaryParameterProperty.name; } else { sPeerParamPropName = this._oUpperIntervalBoundaryParameterProperty.name; } if (!sPeerParamPropName) { throw "Parameter is not an interval boundary"; } return this._oParameterization.findParameterByName(sPeerParamPropName); }
javascript
function() { var sPeerParamPropName = null; if (this._oLowerIntervalBoundaryParameterProperty) { sPeerParamPropName = this._oLowerIntervalBoundaryParameterProperty.name; } else { sPeerParamPropName = this._oUpperIntervalBoundaryParameterProperty.name; } if (!sPeerParamPropName) { throw "Parameter is not an interval boundary"; } return this._oParameterization.findParameterByName(sPeerParamPropName); }
[ "function", "(", ")", "{", "var", "sPeerParamPropName", "=", "null", ";", "if", "(", "this", ".", "_oLowerIntervalBoundaryParameterProperty", ")", "{", "sPeerParamPropName", "=", "this", ".", "_oLowerIntervalBoundaryParameterProperty", ".", "name", ";", "}", "else", "{", "sPeerParamPropName", "=", "this", ".", "_oUpperIntervalBoundaryParameterProperty", ".", "name", ";", "}", "if", "(", "!", "sPeerParamPropName", ")", "{", "throw", "\"Parameter is not an interval boundary\"", ";", "}", "return", "this", ".", "_oParameterization", ".", "findParameterByName", "(", "sPeerParamPropName", ")", ";", "}" ]
Get property for the parameter representing the peer boundary of the same interval @returns {sap.ui.model.analytics.odata4analytics.Parameter} The parameter representing the peer boundary of the same interval. This means that if *this* parameter is a lower boundary, the returned object @public @function @name sap.ui.model.analytics.odata4analytics.Parameter#getPeerIntervalBoundaryParameter
[ "Get", "property", "for", "the", "parameter", "representing", "the", "peer", "boundary", "of", "the", "same", "interval" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L1589-L1600
3,724
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { if (!this._sSuperOrdinateDimension) { var oSuperOrdProperty = this._oQueryResult.getEntityType().getSuperOrdinatePropertyOfProperty(this.getName()); if (oSuperOrdProperty) { this._sSuperOrdinateDimension = this._oQueryResult.findDimensionByName(oSuperOrdProperty.name); } } return this._sSuperOrdinateDimension; }
javascript
function() { if (!this._sSuperOrdinateDimension) { var oSuperOrdProperty = this._oQueryResult.getEntityType().getSuperOrdinatePropertyOfProperty(this.getName()); if (oSuperOrdProperty) { this._sSuperOrdinateDimension = this._oQueryResult.findDimensionByName(oSuperOrdProperty.name); } } return this._sSuperOrdinateDimension; }
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "_sSuperOrdinateDimension", ")", "{", "var", "oSuperOrdProperty", "=", "this", ".", "_oQueryResult", ".", "getEntityType", "(", ")", ".", "getSuperOrdinatePropertyOfProperty", "(", "this", ".", "getName", "(", ")", ")", ";", "if", "(", "oSuperOrdProperty", ")", "{", "this", ".", "_sSuperOrdinateDimension", "=", "this", ".", "_oQueryResult", ".", "findDimensionByName", "(", "oSuperOrdProperty", ".", "name", ")", ";", "}", "}", "return", "this", ".", "_sSuperOrdinateDimension", ";", "}" ]
Get super-ordinate dimension @returns {object} The super-ordinate dimension or null if there is none @public @function @name sap.ui.model.analytics.odata4analytics.Dimension#getSuperOrdinateDimension
[ "Get", "super", "-", "ordinate", "dimension" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L1804-L1812
3,725
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { if (this._aAttributeNames) { return this._aAttributeNames; } this._aAttributeNames = []; for ( var sName in this._oAttributeSet) { this._aAttributeNames.push(this._oAttributeSet[sName].getName()); } return this._aAttributeNames; }
javascript
function() { if (this._aAttributeNames) { return this._aAttributeNames; } this._aAttributeNames = []; for ( var sName in this._oAttributeSet) { this._aAttributeNames.push(this._oAttributeSet[sName].getName()); } return this._aAttributeNames; }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_aAttributeNames", ")", "{", "return", "this", ".", "_aAttributeNames", ";", "}", "this", ".", "_aAttributeNames", "=", "[", "]", ";", "for", "(", "var", "sName", "in", "this", ".", "_oAttributeSet", ")", "{", "this", ".", "_aAttributeNames", ".", "push", "(", "this", ".", "_oAttributeSet", "[", "sName", "]", ".", "getName", "(", ")", ")", ";", "}", "return", "this", ".", "_aAttributeNames", ";", "}" ]
Get the names of all attributes included in this dimension @returns {string[]} List of all attribute names @public @function @name sap.ui.model.analytics.odata4analytics.Dimension#getAllAttributeNames
[ "Get", "the", "names", "of", "all", "attributes", "included", "in", "this", "dimension" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L1843-L1855
3,726
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { if (this._bIsUpdatable != null) { return this._bIsUpdatable; } var oUpdatablePropertyNameSet = this._oQueryResult.getEntitySet().getUpdatablePropertyNameSet(); return (oUpdatablePropertyNameSet[this.getName()] != undefined); }
javascript
function() { if (this._bIsUpdatable != null) { return this._bIsUpdatable; } var oUpdatablePropertyNameSet = this._oQueryResult.getEntitySet().getUpdatablePropertyNameSet(); return (oUpdatablePropertyNameSet[this.getName()] != undefined); }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_bIsUpdatable", "!=", "null", ")", "{", "return", "this", ".", "_bIsUpdatable", ";", "}", "var", "oUpdatablePropertyNameSet", "=", "this", ".", "_oQueryResult", ".", "getEntitySet", "(", ")", ".", "getUpdatablePropertyNameSet", "(", ")", ";", "return", "(", "oUpdatablePropertyNameSet", "[", "this", ".", "getName", "(", ")", "]", "!=", "undefined", ")", ";", "}" ]
Get indicator whether or not the measure is updatable @returns {boolean} True iff the measure is updatable @public @function @name sap.ui.model.analytics.odata4analytics.Measure#isUpdatable
[ "Get", "indicator", "whether", "or", "not", "the", "measure", "is", "updatable" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L2211-L2218
3,727
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { if (this._oUpdatablePropertyNames) { return this._oUpdatablePropertyNames; } this._oUpdatablePropertyNames = {}; var bSetIsUpdatable = true; if (this._oEntitySet.extensions != undefined) { for (var j = -1, oExtension; (oExtension = this._oEntitySet.extensions[++j]) !== undefined;) { if (oExtension.namespace == odata4analytics.constants.SAP_NAMESPACE && oExtension.name == "updatable") { if (oExtension.value == "false") { bSetIsUpdatable = false; break; } } } } if (!bSetIsUpdatable) { // set not updatable cascades to all properties return this._oUpdatablePropertyNames; } var aProperty = this._oEntityType.getTypeDescription().property; for (var i = -1, oProperty; (oProperty = aProperty[++i]) !== undefined;) { var bPropertyIsUpdatable = true; if (oProperty.extensions == undefined) { continue; } for (var k = -1, oExtension2; (oExtension2 = oProperty.extensions[++k]) !== undefined;) { if (oExtension2.namespace != odata4analytics.constants.SAP_NAMESPACE) { continue; } if (oExtension2.name == "updatable") { if (oExtension2.value == "false") { bPropertyIsUpdatable = false; break; } } } if (bPropertyIsUpdatable) { this._oUpdatablePropertyNames[oProperty.name] = true; } } return this._oUpdatablePropertyNames; }
javascript
function() { if (this._oUpdatablePropertyNames) { return this._oUpdatablePropertyNames; } this._oUpdatablePropertyNames = {}; var bSetIsUpdatable = true; if (this._oEntitySet.extensions != undefined) { for (var j = -1, oExtension; (oExtension = this._oEntitySet.extensions[++j]) !== undefined;) { if (oExtension.namespace == odata4analytics.constants.SAP_NAMESPACE && oExtension.name == "updatable") { if (oExtension.value == "false") { bSetIsUpdatable = false; break; } } } } if (!bSetIsUpdatable) { // set not updatable cascades to all properties return this._oUpdatablePropertyNames; } var aProperty = this._oEntityType.getTypeDescription().property; for (var i = -1, oProperty; (oProperty = aProperty[++i]) !== undefined;) { var bPropertyIsUpdatable = true; if (oProperty.extensions == undefined) { continue; } for (var k = -1, oExtension2; (oExtension2 = oProperty.extensions[++k]) !== undefined;) { if (oExtension2.namespace != odata4analytics.constants.SAP_NAMESPACE) { continue; } if (oExtension2.name == "updatable") { if (oExtension2.value == "false") { bPropertyIsUpdatable = false; break; } } } if (bPropertyIsUpdatable) { this._oUpdatablePropertyNames[oProperty.name] = true; } } return this._oUpdatablePropertyNames; }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_oUpdatablePropertyNames", ")", "{", "return", "this", ".", "_oUpdatablePropertyNames", ";", "}", "this", ".", "_oUpdatablePropertyNames", "=", "{", "}", ";", "var", "bSetIsUpdatable", "=", "true", ";", "if", "(", "this", ".", "_oEntitySet", ".", "extensions", "!=", "undefined", ")", "{", "for", "(", "var", "j", "=", "-", "1", ",", "oExtension", ";", "(", "oExtension", "=", "this", ".", "_oEntitySet", ".", "extensions", "[", "++", "j", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "oExtension", ".", "namespace", "==", "odata4analytics", ".", "constants", ".", "SAP_NAMESPACE", "&&", "oExtension", ".", "name", "==", "\"updatable\"", ")", "{", "if", "(", "oExtension", ".", "value", "==", "\"false\"", ")", "{", "bSetIsUpdatable", "=", "false", ";", "break", ";", "}", "}", "}", "}", "if", "(", "!", "bSetIsUpdatable", ")", "{", "// set not updatable cascades to all properties", "return", "this", ".", "_oUpdatablePropertyNames", ";", "}", "var", "aProperty", "=", "this", ".", "_oEntityType", ".", "getTypeDescription", "(", ")", ".", "property", ";", "for", "(", "var", "i", "=", "-", "1", ",", "oProperty", ";", "(", "oProperty", "=", "aProperty", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "var", "bPropertyIsUpdatable", "=", "true", ";", "if", "(", "oProperty", ".", "extensions", "==", "undefined", ")", "{", "continue", ";", "}", "for", "(", "var", "k", "=", "-", "1", ",", "oExtension2", ";", "(", "oExtension2", "=", "oProperty", ".", "extensions", "[", "++", "k", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "oExtension2", ".", "namespace", "!=", "odata4analytics", ".", "constants", ".", "SAP_NAMESPACE", ")", "{", "continue", ";", "}", "if", "(", "oExtension2", ".", "name", "==", "\"updatable\"", ")", "{", "if", "(", "oExtension2", ".", "value", "==", "\"false\"", ")", "{", "bPropertyIsUpdatable", "=", "false", ";", "break", ";", "}", "}", "}", "if", "(", "bPropertyIsUpdatable", ")", "{", "this", ".", "_oUpdatablePropertyNames", "[", "oProperty", ".", "name", "]", "=", "true", ";", "}", "}", "return", "this", ".", "_oUpdatablePropertyNames", ";", "}" ]
Get names of properties in this entity set that can be updated @returns {object} An object with individual JS properties for each updatable property. For testing whether propertyName is the name of an updatable property, use <code>getUpdatablePropertyNameSet()[propertyName]</code>. The included JS object properties are all set to true. @public @function @name sap.ui.model.analytics.odata4analytics.EntitySet#getUpdatablePropertyNameSet
[ "Get", "names", "of", "properties", "in", "this", "entity", "set", "that", "can", "be", "updated" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L2335-L2380
3,728
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
getOrCreateHierarchy
function getOrCreateHierarchy(sKey) { var oResult = oRecursiveHierarchies[sKey]; if (!oResult) { oResult = oRecursiveHierarchies[sKey] = {}; } return oResult; }
javascript
function getOrCreateHierarchy(sKey) { var oResult = oRecursiveHierarchies[sKey]; if (!oResult) { oResult = oRecursiveHierarchies[sKey] = {}; } return oResult; }
[ "function", "getOrCreateHierarchy", "(", "sKey", ")", "{", "var", "oResult", "=", "oRecursiveHierarchies", "[", "sKey", "]", ";", "if", "(", "!", "oResult", ")", "{", "oResult", "=", "oRecursiveHierarchies", "[", "sKey", "]", "=", "{", "}", ";", "}", "return", "oResult", ";", "}" ]
temp for collecting all properties participating in hierarchies
[ "temp", "for", "collecting", "all", "properties", "participating", "in", "hierarchies" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L2449-L2456
3,729
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { if (this._aHierarchyPropertyNames) { return this._aHierarchyPropertyNames; } this._aHierarchyPropertyNames = []; for ( var sName in this._oRecursiveHierarchySet) { this._aHierarchyPropertyNames.push(this._oRecursiveHierarchySet[sName].getNodeValueProperty().name); } return this._aHierarchyPropertyNames; }
javascript
function() { if (this._aHierarchyPropertyNames) { return this._aHierarchyPropertyNames; } this._aHierarchyPropertyNames = []; for ( var sName in this._oRecursiveHierarchySet) { this._aHierarchyPropertyNames.push(this._oRecursiveHierarchySet[sName].getNodeValueProperty().name); } return this._aHierarchyPropertyNames; }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_aHierarchyPropertyNames", ")", "{", "return", "this", ".", "_aHierarchyPropertyNames", ";", "}", "this", ".", "_aHierarchyPropertyNames", "=", "[", "]", ";", "for", "(", "var", "sName", "in", "this", ".", "_oRecursiveHierarchySet", ")", "{", "this", ".", "_aHierarchyPropertyNames", ".", "push", "(", "this", ".", "_oRecursiveHierarchySet", "[", "sName", "]", ".", "getNodeValueProperty", "(", ")", ".", "name", ")", ";", "}", "return", "this", ".", "_aHierarchyPropertyNames", ";", "}" ]
Get the names of all properties with an associated hierarchy @returns {string[]} List of all property names @public @function @name sap.ui.model.analytics.odata4analytics.EntityType#getAllHierarchyPropertyNames
[ "Get", "the", "names", "of", "all", "properties", "with", "an", "associated", "hierarchy" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L2812-L2824
3,730
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sPropertyName, sOperator, oValue, oValue2) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot add filter condition for unknown property name " + sPropertyName; // TODO } var aFilterablePropertyNames = this._oEntityType.getFilterablePropertyNames(); if (((aFilterablePropertyNames ? Array.prototype.indexOf.call(aFilterablePropertyNames, sPropertyName) : -1)) === -1) { throw "Cannot add filter condition for not filterable property name " + sPropertyName; // TODO } this._addCondition(sPropertyName, sOperator, oValue, oValue2); return this; }
javascript
function(sPropertyName, sOperator, oValue, oValue2) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot add filter condition for unknown property name " + sPropertyName; // TODO } var aFilterablePropertyNames = this._oEntityType.getFilterablePropertyNames(); if (((aFilterablePropertyNames ? Array.prototype.indexOf.call(aFilterablePropertyNames, sPropertyName) : -1)) === -1) { throw "Cannot add filter condition for not filterable property name " + sPropertyName; // TODO } this._addCondition(sPropertyName, sOperator, oValue, oValue2); return this; }
[ "function", "(", "sPropertyName", ",", "sOperator", ",", "oValue", ",", "oValue2", ")", "{", "var", "oProperty", "=", "this", ".", "_oEntityType", ".", "findPropertyByName", "(", "sPropertyName", ")", ";", "if", "(", "oProperty", "==", "null", ")", "{", "throw", "\"Cannot add filter condition for unknown property name \"", "+", "sPropertyName", ";", "// TODO", "}", "var", "aFilterablePropertyNames", "=", "this", ".", "_oEntityType", ".", "getFilterablePropertyNames", "(", ")", ";", "if", "(", "(", "(", "aFilterablePropertyNames", "?", "Array", ".", "prototype", ".", "indexOf", ".", "call", "(", "aFilterablePropertyNames", ",", "sPropertyName", ")", ":", "-", "1", ")", ")", "===", "-", "1", ")", "{", "throw", "\"Cannot add filter condition for not filterable property name \"", "+", "sPropertyName", ";", "// TODO", "}", "this", ".", "_addCondition", "(", "sPropertyName", ",", "sOperator", ",", "oValue", ",", "oValue2", ")", ";", "return", "this", ";", "}" ]
Add a condition to the filter expression. Multiple conditions on the same property are combined with a logical OR first, and in a second step conditions for different properties are combined with a logical AND. @param {string} sPropertyName The name of the property bound in the condition @param {sap.ui.model.FilterOperator} sOperator operator used for the condition @param {object} oValue value to be used for this condition @param {object} oValue2 (optional) as second value to be used for this condition @throws Exception if the property is unknown or not filterable @returns {sap.ui.model.analytics.odata4analytics.FilterExpression} This object for method chaining @public @function @name sap.ui.model.analytics.odata4analytics.FilterExpression#addCondition
[ "Add", "a", "condition", "to", "the", "filter", "expression", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3153-L3164
3,731
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sPropertyName) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot remove filter conditions for unknown property name " + sPropertyName; // TODO } for (var i = 0; i < this._aConditionUI5Filter.length; i++) { var oUI5Filter = this._aConditionUI5Filter[i]; if (oUI5Filter.sPath == sPropertyName) { this._aConditionUI5Filter.splice(i--, 1); } } return this; }
javascript
function(sPropertyName) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot remove filter conditions for unknown property name " + sPropertyName; // TODO } for (var i = 0; i < this._aConditionUI5Filter.length; i++) { var oUI5Filter = this._aConditionUI5Filter[i]; if (oUI5Filter.sPath == sPropertyName) { this._aConditionUI5Filter.splice(i--, 1); } } return this; }
[ "function", "(", "sPropertyName", ")", "{", "var", "oProperty", "=", "this", ".", "_oEntityType", ".", "findPropertyByName", "(", "sPropertyName", ")", ";", "if", "(", "oProperty", "==", "null", ")", "{", "throw", "\"Cannot remove filter conditions for unknown property name \"", "+", "sPropertyName", ";", "// TODO", "}", "for", "(", "var", "i", "=", "0", ";", "i", "<", "this", ".", "_aConditionUI5Filter", ".", "length", ";", "i", "++", ")", "{", "var", "oUI5Filter", "=", "this", ".", "_aConditionUI5Filter", "[", "i", "]", ";", "if", "(", "oUI5Filter", ".", "sPath", "==", "sPropertyName", ")", "{", "this", ".", "_aConditionUI5Filter", ".", "splice", "(", "i", "--", ",", "1", ")", ";", "}", "}", "return", "this", ";", "}" ]
Remove all conditions for some property from the filter expression. All previously set conditions for some property are removed from the filter expression. @param {string} sPropertyName The name of the property bound in the condition @throws Exception if the property is unknown @returns {sap.ui.model.analytics.odata4analytics.FilterExpression} This object for method chaining @public @function @name sap.ui.model.analytics.odata4analytics.FilterExpression#removeConditions
[ "Remove", "all", "conditions", "for", "some", "property", "from", "the", "filter", "expression", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3180-L3192
3,732
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sPropertyName, aValues) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot add filter condition for unknown property name " + sPropertyName; // TODO } var aFilterablePropertyNames = this._oEntityType.getFilterablePropertyNames(); if (((aFilterablePropertyNames ? Array.prototype.indexOf.call(aFilterablePropertyNames, sPropertyName) : -1)) === -1) { throw "Cannot add filter condition for not filterable property name " + sPropertyName; // TODO } for ( var i = -1, oValue; (oValue = aValues[++i]) !== undefined;) { this._addCondition(sPropertyName, FilterOperator.EQ, oValue); } return this; }
javascript
function(sPropertyName, aValues) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot add filter condition for unknown property name " + sPropertyName; // TODO } var aFilterablePropertyNames = this._oEntityType.getFilterablePropertyNames(); if (((aFilterablePropertyNames ? Array.prototype.indexOf.call(aFilterablePropertyNames, sPropertyName) : -1)) === -1) { throw "Cannot add filter condition for not filterable property name " + sPropertyName; // TODO } for ( var i = -1, oValue; (oValue = aValues[++i]) !== undefined;) { this._addCondition(sPropertyName, FilterOperator.EQ, oValue); } return this; }
[ "function", "(", "sPropertyName", ",", "aValues", ")", "{", "var", "oProperty", "=", "this", ".", "_oEntityType", ".", "findPropertyByName", "(", "sPropertyName", ")", ";", "if", "(", "oProperty", "==", "null", ")", "{", "throw", "\"Cannot add filter condition for unknown property name \"", "+", "sPropertyName", ";", "// TODO", "}", "var", "aFilterablePropertyNames", "=", "this", ".", "_oEntityType", ".", "getFilterablePropertyNames", "(", ")", ";", "if", "(", "(", "(", "aFilterablePropertyNames", "?", "Array", ".", "prototype", ".", "indexOf", ".", "call", "(", "aFilterablePropertyNames", ",", "sPropertyName", ")", ":", "-", "1", ")", ")", "===", "-", "1", ")", "{", "throw", "\"Cannot add filter condition for not filterable property name \"", "+", "sPropertyName", ";", "// TODO", "}", "for", "(", "var", "i", "=", "-", "1", ",", "oValue", ";", "(", "oValue", "=", "aValues", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "this", ".", "_addCondition", "(", "sPropertyName", ",", "FilterOperator", ".", "EQ", ",", "oValue", ")", ";", "}", "return", "this", ";", "}" ]
Add a set condition to the filter expression. A set condition tests if the value of a property is included in a set of given values. It is a convenience method for this particular use case eliminating the need for multiple API calls. @param {string} sPropertyName The name of the property bound in the condition @param {array} aValues values defining the set @throws Exception if the property is unknown or not filterable @returns {sap.ui.model.analytics.odata4analytics.FilterExpression} This object for method chaining @public @function @name sap.ui.model.analytics.odata4analytics.FilterExpression#addSetCondition
[ "Add", "a", "set", "condition", "to", "the", "filter", "expression", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3211-L3224
3,733
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(aUI5Filter) { if (!Array.isArray(aUI5Filter)) { throw "Argument is not an array"; } if (aUI5Filter.length == 0) { return this; } // check if a multi filter is included; otherwise every element simply represents a single condition var bHasMultiFilter = false; for (var i = 0; i < aUI5Filter.length; i++) { if (aUI5Filter[i].aFilters != undefined) { bHasMultiFilter = true; break; } } if (bHasMultiFilter) { this._addUI5FilterArray(aUI5Filter); } else { for (var j = 0; j < aUI5Filter.length; j++) { this.addCondition(aUI5Filter[j].sPath, aUI5Filter[j].sOperator, aUI5Filter[j].oValue1, aUI5Filter[j].oValue2); } } return this; }
javascript
function(aUI5Filter) { if (!Array.isArray(aUI5Filter)) { throw "Argument is not an array"; } if (aUI5Filter.length == 0) { return this; } // check if a multi filter is included; otherwise every element simply represents a single condition var bHasMultiFilter = false; for (var i = 0; i < aUI5Filter.length; i++) { if (aUI5Filter[i].aFilters != undefined) { bHasMultiFilter = true; break; } } if (bHasMultiFilter) { this._addUI5FilterArray(aUI5Filter); } else { for (var j = 0; j < aUI5Filter.length; j++) { this.addCondition(aUI5Filter[j].sPath, aUI5Filter[j].sOperator, aUI5Filter[j].oValue1, aUI5Filter[j].oValue2); } } return this; }
[ "function", "(", "aUI5Filter", ")", "{", "if", "(", "!", "Array", ".", "isArray", "(", "aUI5Filter", ")", ")", "{", "throw", "\"Argument is not an array\"", ";", "}", "if", "(", "aUI5Filter", ".", "length", "==", "0", ")", "{", "return", "this", ";", "}", "// check if a multi filter is included; otherwise every element simply represents a single condition", "var", "bHasMultiFilter", "=", "false", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "aUI5Filter", ".", "length", ";", "i", "++", ")", "{", "if", "(", "aUI5Filter", "[", "i", "]", ".", "aFilters", "!=", "undefined", ")", "{", "bHasMultiFilter", "=", "true", ";", "break", ";", "}", "}", "if", "(", "bHasMultiFilter", ")", "{", "this", ".", "_addUI5FilterArray", "(", "aUI5Filter", ")", ";", "}", "else", "{", "for", "(", "var", "j", "=", "0", ";", "j", "<", "aUI5Filter", ".", "length", ";", "j", "++", ")", "{", "this", ".", "addCondition", "(", "aUI5Filter", "[", "j", "]", ".", "sPath", ",", "aUI5Filter", "[", "j", "]", ".", "sOperator", ",", "aUI5Filter", "[", "j", "]", ".", "oValue1", ",", "aUI5Filter", "[", "j", "]", ".", "oValue2", ")", ";", "}", "}", "return", "this", ";", "}" ]
Add an array of UI5 filter conditions to the filter expression. The UI5 filter condition is combined with the other given conditions using a logical AND. This method is particularly useful for passing forward already created UI5 filter arrays. @param {sap.ui.model.Filter[]} aUI5Filter Array of UI5 filter objects @returns {sap.ui.model.analytics.odata4analytics.FilterExpression} This object for method chaining @public @function @name sap.ui.model.analytics.odata4analytics.FilterExpression#addUI5FilterConditions
[ "Add", "an", "array", "of", "UI5", "filter", "conditions", "to", "the", "filter", "expression", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3239-L3263
3,734
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { var aFilterObjects = this._aConditionUI5Filter.concat([]); for ( var i = -1, aFilter; (aFilter = this._aUI5FilterArray[++i]) !== undefined;) { for ( var j = -1, oFilter; (oFilter = aFilter[++j]) !== undefined;) { aFilterObjects.push(oFilter); } } return aFilterObjects; }
javascript
function() { var aFilterObjects = this._aConditionUI5Filter.concat([]); for ( var i = -1, aFilter; (aFilter = this._aUI5FilterArray[++i]) !== undefined;) { for ( var j = -1, oFilter; (oFilter = aFilter[++j]) !== undefined;) { aFilterObjects.push(oFilter); } } return aFilterObjects; }
[ "function", "(", ")", "{", "var", "aFilterObjects", "=", "this", ".", "_aConditionUI5Filter", ".", "concat", "(", "[", "]", ")", ";", "for", "(", "var", "i", "=", "-", "1", ",", "aFilter", ";", "(", "aFilter", "=", "this", ".", "_aUI5FilterArray", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "for", "(", "var", "j", "=", "-", "1", ",", "oFilter", ";", "(", "oFilter", "=", "aFilter", "[", "++", "j", "]", ")", "!==", "undefined", ";", ")", "{", "aFilterObjects", ".", "push", "(", "oFilter", ")", ";", "}", "}", "return", "aFilterObjects", ";", "}" ]
Get an array of SAPUI5 Filter objects corresponding to this expression. @returns {sap.ui.model.Filter[]} List of filter objects representing this expression @public @function @name sap.ui.model.analytics.odata4analytics.FilterExpression#getExpressionAsUI5FilterArray
[ "Get", "an", "array", "of", "SAPUI5", "Filter", "objects", "corresponding", "to", "this", "expression", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3274-L3283
3,735
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { var oReferencedProperties = {}; for ( var i = -1, oUI5Filter; (oUI5Filter = this._aConditionUI5Filter[++i]) !== undefined;) { if (oReferencedProperties[oUI5Filter.sPath] == undefined) { oReferencedProperties[oUI5Filter.sPath] = []; } oReferencedProperties[oUI5Filter.sPath].push(oUI5Filter); } for ( var j = -1, aUI5Filter; (aUI5Filter = this._aUI5FilterArray[++j]) !== undefined;) { this.getPropertiesReferencedByUI5FilterArray(aUI5Filter, oReferencedProperties); } return oReferencedProperties; }
javascript
function() { var oReferencedProperties = {}; for ( var i = -1, oUI5Filter; (oUI5Filter = this._aConditionUI5Filter[++i]) !== undefined;) { if (oReferencedProperties[oUI5Filter.sPath] == undefined) { oReferencedProperties[oUI5Filter.sPath] = []; } oReferencedProperties[oUI5Filter.sPath].push(oUI5Filter); } for ( var j = -1, aUI5Filter; (aUI5Filter = this._aUI5FilterArray[++j]) !== undefined;) { this.getPropertiesReferencedByUI5FilterArray(aUI5Filter, oReferencedProperties); } return oReferencedProperties; }
[ "function", "(", ")", "{", "var", "oReferencedProperties", "=", "{", "}", ";", "for", "(", "var", "i", "=", "-", "1", ",", "oUI5Filter", ";", "(", "oUI5Filter", "=", "this", ".", "_aConditionUI5Filter", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "oReferencedProperties", "[", "oUI5Filter", ".", "sPath", "]", "==", "undefined", ")", "{", "oReferencedProperties", "[", "oUI5Filter", ".", "sPath", "]", "=", "[", "]", ";", "}", "oReferencedProperties", "[", "oUI5Filter", ".", "sPath", "]", ".", "push", "(", "oUI5Filter", ")", ";", "}", "for", "(", "var", "j", "=", "-", "1", ",", "aUI5Filter", ";", "(", "aUI5Filter", "=", "this", ".", "_aUI5FilterArray", "[", "++", "j", "]", ")", "!==", "undefined", ";", ")", "{", "this", ".", "getPropertiesReferencedByUI5FilterArray", "(", "aUI5Filter", ",", "oReferencedProperties", ")", ";", "}", "return", "oReferencedProperties", ";", "}" ]
Get the properties referenced by the filter expression. @returns {object} Object containing (JavaScript) properties for all (OData entity type) properties referenced in the filter expression. The value for each of these properties is an array holding all used UI5 filters referencing them. @private
[ "Get", "the", "properties", "referenced", "by", "the", "filter", "expression", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3310-L3324
3,736
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(oUI5Filter) { var sFilterExpression = null, oProperty = this._oEntityType.findPropertyByName(oUI5Filter.sPath); if (oProperty == null) { throw "Cannot add filter condition for unknown property name " + oUI5Filter.sPath; // TODO } switch (oUI5Filter.sOperator) { case FilterOperator.BT: sFilterExpression = "(" + oUI5Filter.sPath + " ge " + this._renderPropertyFilterValue(oUI5Filter.oValue1, oProperty.type) + " and " + oUI5Filter.sPath + " le " + this._renderPropertyFilterValue(oUI5Filter.oValue2, oProperty.type) + ")"; break; case FilterOperator.NB: sFilterExpression = "(" + oUI5Filter.sPath + " lt " + this._renderPropertyFilterValue(oUI5Filter.oValue1, oProperty.type) + " or " + oUI5Filter.sPath + " gt " + this._renderPropertyFilterValue(oUI5Filter.oValue2, oProperty.type) + ")"; break; case FilterOperator.Contains: case FilterOperator.NotContains: sFilterExpression = (oUI5Filter.sOperator[0] === "N" ? "not " : "") + "substringof(" + this._renderPropertyFilterValue(oUI5Filter.oValue1, "Edm.String") + "," + oUI5Filter.sPath + ")"; break; case FilterOperator.StartsWith: case FilterOperator.EndsWith: case FilterOperator.NotStartsWith: case FilterOperator.NotEndsWith: sFilterExpression = oUI5Filter.sOperator.toLowerCase().replace("not", "not ") + "(" + oUI5Filter.sPath + "," + this._renderPropertyFilterValue(oUI5Filter.oValue1, "Edm.String") + ")"; break; default: sFilterExpression = oUI5Filter.sPath + " " + oUI5Filter.sOperator.toLowerCase() + " " + this._renderPropertyFilterValue(oUI5Filter.oValue1, oProperty.type); } return sFilterExpression; }
javascript
function(oUI5Filter) { var sFilterExpression = null, oProperty = this._oEntityType.findPropertyByName(oUI5Filter.sPath); if (oProperty == null) { throw "Cannot add filter condition for unknown property name " + oUI5Filter.sPath; // TODO } switch (oUI5Filter.sOperator) { case FilterOperator.BT: sFilterExpression = "(" + oUI5Filter.sPath + " ge " + this._renderPropertyFilterValue(oUI5Filter.oValue1, oProperty.type) + " and " + oUI5Filter.sPath + " le " + this._renderPropertyFilterValue(oUI5Filter.oValue2, oProperty.type) + ")"; break; case FilterOperator.NB: sFilterExpression = "(" + oUI5Filter.sPath + " lt " + this._renderPropertyFilterValue(oUI5Filter.oValue1, oProperty.type) + " or " + oUI5Filter.sPath + " gt " + this._renderPropertyFilterValue(oUI5Filter.oValue2, oProperty.type) + ")"; break; case FilterOperator.Contains: case FilterOperator.NotContains: sFilterExpression = (oUI5Filter.sOperator[0] === "N" ? "not " : "") + "substringof(" + this._renderPropertyFilterValue(oUI5Filter.oValue1, "Edm.String") + "," + oUI5Filter.sPath + ")"; break; case FilterOperator.StartsWith: case FilterOperator.EndsWith: case FilterOperator.NotStartsWith: case FilterOperator.NotEndsWith: sFilterExpression = oUI5Filter.sOperator.toLowerCase().replace("not", "not ") + "(" + oUI5Filter.sPath + "," + this._renderPropertyFilterValue(oUI5Filter.oValue1, "Edm.String") + ")"; break; default: sFilterExpression = oUI5Filter.sPath + " " + oUI5Filter.sOperator.toLowerCase() + " " + this._renderPropertyFilterValue(oUI5Filter.oValue1, oProperty.type); } return sFilterExpression; }
[ "function", "(", "oUI5Filter", ")", "{", "var", "sFilterExpression", "=", "null", ",", "oProperty", "=", "this", ".", "_oEntityType", ".", "findPropertyByName", "(", "oUI5Filter", ".", "sPath", ")", ";", "if", "(", "oProperty", "==", "null", ")", "{", "throw", "\"Cannot add filter condition for unknown property name \"", "+", "oUI5Filter", ".", "sPath", ";", "// TODO", "}", "switch", "(", "oUI5Filter", ".", "sOperator", ")", "{", "case", "FilterOperator", ".", "BT", ":", "sFilterExpression", "=", "\"(\"", "+", "oUI5Filter", ".", "sPath", "+", "\" ge \"", "+", "this", ".", "_renderPropertyFilterValue", "(", "oUI5Filter", ".", "oValue1", ",", "oProperty", ".", "type", ")", "+", "\" and \"", "+", "oUI5Filter", ".", "sPath", "+", "\" le \"", "+", "this", ".", "_renderPropertyFilterValue", "(", "oUI5Filter", ".", "oValue2", ",", "oProperty", ".", "type", ")", "+", "\")\"", ";", "break", ";", "case", "FilterOperator", ".", "NB", ":", "sFilterExpression", "=", "\"(\"", "+", "oUI5Filter", ".", "sPath", "+", "\" lt \"", "+", "this", ".", "_renderPropertyFilterValue", "(", "oUI5Filter", ".", "oValue1", ",", "oProperty", ".", "type", ")", "+", "\" or \"", "+", "oUI5Filter", ".", "sPath", "+", "\" gt \"", "+", "this", ".", "_renderPropertyFilterValue", "(", "oUI5Filter", ".", "oValue2", ",", "oProperty", ".", "type", ")", "+", "\")\"", ";", "break", ";", "case", "FilterOperator", ".", "Contains", ":", "case", "FilterOperator", ".", "NotContains", ":", "sFilterExpression", "=", "(", "oUI5Filter", ".", "sOperator", "[", "0", "]", "===", "\"N\"", "?", "\"not \"", ":", "\"\"", ")", "+", "\"substringof(\"", "+", "this", ".", "_renderPropertyFilterValue", "(", "oUI5Filter", ".", "oValue1", ",", "\"Edm.String\"", ")", "+", "\",\"", "+", "oUI5Filter", ".", "sPath", "+", "\")\"", ";", "break", ";", "case", "FilterOperator", ".", "StartsWith", ":", "case", "FilterOperator", ".", "EndsWith", ":", "case", "FilterOperator", ".", "NotStartsWith", ":", "case", "FilterOperator", ".", "NotEndsWith", ":", "sFilterExpression", "=", "oUI5Filter", ".", "sOperator", ".", "toLowerCase", "(", ")", ".", "replace", "(", "\"not\"", ",", "\"not \"", ")", "+", "\"(\"", "+", "oUI5Filter", ".", "sPath", "+", "\",\"", "+", "this", ".", "_renderPropertyFilterValue", "(", "oUI5Filter", ".", "oValue1", ",", "\"Edm.String\"", ")", "+", "\")\"", ";", "break", ";", "default", ":", "sFilterExpression", "=", "oUI5Filter", ".", "sPath", "+", "\" \"", "+", "oUI5Filter", ".", "sOperator", ".", "toLowerCase", "(", ")", "+", "\" \"", "+", "this", ".", "_renderPropertyFilterValue", "(", "oUI5Filter", ".", "oValue1", ",", "oProperty", ".", "type", ")", ";", "}", "return", "sFilterExpression", ";", "}" ]
Render a UI5 Filter as OData condition. @param {string} oUI5Filter The filter object to render (must not be a multi filter) @returns {string} The $filter value for the given UI5 filter @private
[ "Render", "a", "UI5", "Filter", "as", "OData", "condition", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3333-L3376
3,737
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sPropertyName) { var oResult = null; for (var i = -1, oCurrentSorter; (oCurrentSorter = this._aSortCondition[++i]) !== undefined;) { if (oCurrentSorter.property.name === sPropertyName) { oResult = { sorter : oCurrentSorter, index : i }; break; } } return oResult; }
javascript
function(sPropertyName) { var oResult = null; for (var i = -1, oCurrentSorter; (oCurrentSorter = this._aSortCondition[++i]) !== undefined;) { if (oCurrentSorter.property.name === sPropertyName) { oResult = { sorter : oCurrentSorter, index : i }; break; } } return oResult; }
[ "function", "(", "sPropertyName", ")", "{", "var", "oResult", "=", "null", ";", "for", "(", "var", "i", "=", "-", "1", ",", "oCurrentSorter", ";", "(", "oCurrentSorter", "=", "this", ".", "_aSortCondition", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "oCurrentSorter", ".", "property", ".", "name", "===", "sPropertyName", ")", "{", "oResult", "=", "{", "sorter", ":", "oCurrentSorter", ",", "index", ":", "i", "}", ";", "break", ";", "}", "}", "return", "oResult", ";", "}" ]
Checks if an order by expression for the given property is already defined and returns a reference to an object with property sorter and index of the object or null if the property is not yet defined in an order by expression. @private
[ "Checks", "if", "an", "order", "by", "expression", "for", "the", "given", "property", "is", "already", "defined", "and", "returns", "a", "reference", "to", "an", "object", "with", "property", "sorter", "and", "index", "of", "the", "object", "or", "null", "if", "the", "property", "is", "not", "yet", "defined", "in", "an", "order", "by", "expression", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3635-L3647
3,738
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sPropertyName, sSortOrder) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot add sort condition for unknown property name " + sPropertyName; // TODO } var oExistingSorterEntry = this._containsSorter(sPropertyName); if (oExistingSorterEntry != null) { oExistingSorterEntry.sorter.order = sSortOrder; return this; } var aSortablePropertyNames = this._oEntityType.getSortablePropertyNames(); if (((aSortablePropertyNames ? Array.prototype.indexOf.call(aSortablePropertyNames, sPropertyName) : -1)) === -1) { throw "Cannot add sort condition for not sortable property name " + sPropertyName; // TODO } this._aSortCondition.push({ property : oProperty, order : sSortOrder }); return this; }
javascript
function(sPropertyName, sSortOrder) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot add sort condition for unknown property name " + sPropertyName; // TODO } var oExistingSorterEntry = this._containsSorter(sPropertyName); if (oExistingSorterEntry != null) { oExistingSorterEntry.sorter.order = sSortOrder; return this; } var aSortablePropertyNames = this._oEntityType.getSortablePropertyNames(); if (((aSortablePropertyNames ? Array.prototype.indexOf.call(aSortablePropertyNames, sPropertyName) : -1)) === -1) { throw "Cannot add sort condition for not sortable property name " + sPropertyName; // TODO } this._aSortCondition.push({ property : oProperty, order : sSortOrder }); return this; }
[ "function", "(", "sPropertyName", ",", "sSortOrder", ")", "{", "var", "oProperty", "=", "this", ".", "_oEntityType", ".", "findPropertyByName", "(", "sPropertyName", ")", ";", "if", "(", "oProperty", "==", "null", ")", "{", "throw", "\"Cannot add sort condition for unknown property name \"", "+", "sPropertyName", ";", "// TODO", "}", "var", "oExistingSorterEntry", "=", "this", ".", "_containsSorter", "(", "sPropertyName", ")", ";", "if", "(", "oExistingSorterEntry", "!=", "null", ")", "{", "oExistingSorterEntry", ".", "sorter", ".", "order", "=", "sSortOrder", ";", "return", "this", ";", "}", "var", "aSortablePropertyNames", "=", "this", ".", "_oEntityType", ".", "getSortablePropertyNames", "(", ")", ";", "if", "(", "(", "(", "aSortablePropertyNames", "?", "Array", ".", "prototype", ".", "indexOf", ".", "call", "(", "aSortablePropertyNames", ",", "sPropertyName", ")", ":", "-", "1", ")", ")", "===", "-", "1", ")", "{", "throw", "\"Cannot add sort condition for not sortable property name \"", "+", "sPropertyName", ";", "// TODO", "}", "this", ".", "_aSortCondition", ".", "push", "(", "{", "property", ":", "oProperty", ",", "order", ":", "sSortOrder", "}", ")", ";", "return", "this", ";", "}" ]
Add a condition to the order by expression. It replaces any previously specified sort order for the property. @param {string} sPropertyName The name of the property bound in the condition @param {sap.ui.model.analytics.odata4analytics.SortOrder} sSortOrder sorting order used for the condition @throws Exception if the property is unknown, not sortable or already added as sorter @returns {sap.ui.model.analytics.odata4analytics.SortExpression} This object for method chaining @public @function @name sap.ui.model.analytics.odata4analytics.SortExpression#addSorter
[ "Add", "a", "condition", "to", "the", "order", "by", "expression", ".", "It", "replaces", "any", "previously", "specified", "sort", "order", "for", "the", "property", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3688-L3708
3,739
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sPropertyName) { if (!sPropertyName) { return; } var oSorter = this._containsSorter(sPropertyName); if (oSorter) { this._removeFromArray(this._aSortCondition, oSorter.index); } }
javascript
function(sPropertyName) { if (!sPropertyName) { return; } var oSorter = this._containsSorter(sPropertyName); if (oSorter) { this._removeFromArray(this._aSortCondition, oSorter.index); } }
[ "function", "(", "sPropertyName", ")", "{", "if", "(", "!", "sPropertyName", ")", "{", "return", ";", "}", "var", "oSorter", "=", "this", ".", "_containsSorter", "(", "sPropertyName", ")", ";", "if", "(", "oSorter", ")", "{", "this", ".", "_removeFromArray", "(", "this", ".", "_aSortCondition", ",", "oSorter", ".", "index", ")", ";", "}", "}" ]
Removes the order by expression for the given property name from the list of order by expression. If no order by expression with this property name exists the method does nothing. @param {string} sPropertyName The name of the property to be removed from the condition @public @function @name sap.ui.model.analytics.odata4analytics.SortExpression#removeSorter
[ "Removes", "the", "order", "by", "expression", "for", "the", "given", "property", "name", "from", "the", "list", "of", "order", "by", "expression", ".", "If", "no", "order", "by", "expression", "with", "this", "property", "name", "exists", "the", "method", "does", "nothing", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3722-L3731
3,740
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function() { var aSorterObjects = []; for (var i = -1, oCondition; (oCondition = this._aSortCondition[++i]) !== undefined;) { aSorterObjects.push(new Sorter(oCondition.property.name, oCondition.order == odata4analytics.SortOrder.Descending)); } return aSorterObjects; }
javascript
function() { var aSorterObjects = []; for (var i = -1, oCondition; (oCondition = this._aSortCondition[++i]) !== undefined;) { aSorterObjects.push(new Sorter(oCondition.property.name, oCondition.order == odata4analytics.SortOrder.Descending)); } return aSorterObjects; }
[ "function", "(", ")", "{", "var", "aSorterObjects", "=", "[", "]", ";", "for", "(", "var", "i", "=", "-", "1", ",", "oCondition", ";", "(", "oCondition", "=", "this", ".", "_aSortCondition", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "aSorterObjects", ".", "push", "(", "new", "Sorter", "(", "oCondition", ".", "property", ".", "name", ",", "oCondition", ".", "order", "==", "odata4analytics", ".", "SortOrder", ".", "Descending", ")", ")", ";", "}", "return", "aSorterObjects", ";", "}" ]
Get an array of SAPUI5 Sorter objects corresponding to this expression. @returns {sap.ui.model.Sorter[]} List of sorter objects representing this expression @public @function @name sap.ui.model.analytics.odata4analytics.SortExpression#getExpressionsAsUI5SorterArray
[ "Get", "an", "array", "of", "SAPUI5", "Sorter", "objects", "corresponding", "to", "this", "expression", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3742-L3751
3,741
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sParameterName, sValue, sToValue) { var oParameter = this._oParameterization.findParameterByName(sParameterName); if (!oParameter) { throw "Invalid parameter name " + sParameterName; // TODO improve } // error handling if (sToValue != null) { if (!oParameter.isIntervalBoundary()) { // TODO improve error handling throw "Range value cannot be applied to parameter " + sParameterName + " accepting only single values"; // TODO } if (!oParameter.isLowerIntervalBoundary()) { // TODO improve error handling throw "Range value given, but parameter " + sParameterName + " does not hold the lower boundary"; // TODO } } if (!oParameter.isIntervalBoundary()) { if (sValue == null) { delete this._oParameterValueAssignment[sParameterName]; } else { this._oParameterValueAssignment[sParameterName] = sValue; } } else { if (sValue == null && sToValue != null) { throw "Parameter " + sParameterName + ": An upper boundary cannot be given without the lower boundary"; // TODO } if (sValue == null) { delete this._oParameterValueAssignment[sParameterName]; sToValue = null; } else { this._oParameterValueAssignment[sParameterName] = sValue; } var oUpperBoundaryParameter = oParameter.getPeerIntervalBoundaryParameter(); if (sToValue == null) { sToValue = sValue; } if (sValue == null) { delete this._oParameterValueAssignment[oUpperBoundaryParameter.getName()]; } else { this._oParameterValueAssignment[oUpperBoundaryParameter.getName()] = sToValue; } } return; }
javascript
function(sParameterName, sValue, sToValue) { var oParameter = this._oParameterization.findParameterByName(sParameterName); if (!oParameter) { throw "Invalid parameter name " + sParameterName; // TODO improve } // error handling if (sToValue != null) { if (!oParameter.isIntervalBoundary()) { // TODO improve error handling throw "Range value cannot be applied to parameter " + sParameterName + " accepting only single values"; // TODO } if (!oParameter.isLowerIntervalBoundary()) { // TODO improve error handling throw "Range value given, but parameter " + sParameterName + " does not hold the lower boundary"; // TODO } } if (!oParameter.isIntervalBoundary()) { if (sValue == null) { delete this._oParameterValueAssignment[sParameterName]; } else { this._oParameterValueAssignment[sParameterName] = sValue; } } else { if (sValue == null && sToValue != null) { throw "Parameter " + sParameterName + ": An upper boundary cannot be given without the lower boundary"; // TODO } if (sValue == null) { delete this._oParameterValueAssignment[sParameterName]; sToValue = null; } else { this._oParameterValueAssignment[sParameterName] = sValue; } var oUpperBoundaryParameter = oParameter.getPeerIntervalBoundaryParameter(); if (sToValue == null) { sToValue = sValue; } if (sValue == null) { delete this._oParameterValueAssignment[oUpperBoundaryParameter.getName()]; } else { this._oParameterValueAssignment[oUpperBoundaryParameter.getName()] = sToValue; } } return; }
[ "function", "(", "sParameterName", ",", "sValue", ",", "sToValue", ")", "{", "var", "oParameter", "=", "this", ".", "_oParameterization", ".", "findParameterByName", "(", "sParameterName", ")", ";", "if", "(", "!", "oParameter", ")", "{", "throw", "\"Invalid parameter name \"", "+", "sParameterName", ";", "// TODO improve", "}", "// error handling", "if", "(", "sToValue", "!=", "null", ")", "{", "if", "(", "!", "oParameter", ".", "isIntervalBoundary", "(", ")", ")", "{", "// TODO improve error handling", "throw", "\"Range value cannot be applied to parameter \"", "+", "sParameterName", "+", "\" accepting only single values\"", ";", "// TODO", "}", "if", "(", "!", "oParameter", ".", "isLowerIntervalBoundary", "(", ")", ")", "{", "// TODO improve error handling", "throw", "\"Range value given, but parameter \"", "+", "sParameterName", "+", "\" does not hold the lower boundary\"", ";", "// TODO", "}", "}", "if", "(", "!", "oParameter", ".", "isIntervalBoundary", "(", ")", ")", "{", "if", "(", "sValue", "==", "null", ")", "{", "delete", "this", ".", "_oParameterValueAssignment", "[", "sParameterName", "]", ";", "}", "else", "{", "this", ".", "_oParameterValueAssignment", "[", "sParameterName", "]", "=", "sValue", ";", "}", "}", "else", "{", "if", "(", "sValue", "==", "null", "&&", "sToValue", "!=", "null", ")", "{", "throw", "\"Parameter \"", "+", "sParameterName", "+", "\": An upper boundary cannot be given without the lower boundary\"", ";", "// TODO", "}", "if", "(", "sValue", "==", "null", ")", "{", "delete", "this", ".", "_oParameterValueAssignment", "[", "sParameterName", "]", ";", "sToValue", "=", "null", ";", "}", "else", "{", "this", ".", "_oParameterValueAssignment", "[", "sParameterName", "]", "=", "sValue", ";", "}", "var", "oUpperBoundaryParameter", "=", "oParameter", ".", "getPeerIntervalBoundaryParameter", "(", ")", ";", "if", "(", "sToValue", "==", "null", ")", "{", "sToValue", "=", "sValue", ";", "}", "if", "(", "sValue", "==", "null", ")", "{", "delete", "this", ".", "_oParameterValueAssignment", "[", "oUpperBoundaryParameter", ".", "getName", "(", ")", "]", ";", "}", "else", "{", "this", ".", "_oParameterValueAssignment", "[", "oUpperBoundaryParameter", ".", "getName", "(", ")", "]", "=", "sToValue", ";", "}", "}", "return", ";", "}" ]
Assign a value to a parameter @param {String} sParameterName Name of the parameter. In case of a range value, provide the name of the lower boundary parameter. @param {String} sValue Assigned value. Pass null to remove a value assignment. @param {String} sToValue Omit it or set it to null for single values. If set, it will be assigned to the upper boundary parameter @public @function @name sap.ui.model.analytics.odata4analytics.ParameterizationRequest#setParameterValue
[ "Assign", "a", "value", "to", "a", "parameter" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3898-L3941
3,742
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sServiceRootURI) { var oDefinedParameters = this._oParameterization.getAllParameters(); for ( var sDefinedParameterName in oDefinedParameters) { // check that all parameters have a value assigned. This is also // true for those marked as optional, because the // omitted value is conveyed by some default value, e.g. as empty // string. if (this._oParameterValueAssignment[sDefinedParameterName] == undefined) { throw "Parameter " + sDefinedParameterName + " has no value assigned"; // TODO } } var sKeyIdentification = "", bFirst = true; for ( var sParameterName in this._oParameterValueAssignment) { sKeyIdentification += (bFirst ? "" : ",") + sParameterName + "=" + this._renderParameterKeyValue(this._oParameterValueAssignment[sParameterName], oDefinedParameters[sParameterName].getProperty().type); bFirst = false; } return (sServiceRootURI ? sServiceRootURI : "") + "/" + this._oParameterization.getEntitySet().getQName() + "(" + sKeyIdentification + ")"; }
javascript
function(sServiceRootURI) { var oDefinedParameters = this._oParameterization.getAllParameters(); for ( var sDefinedParameterName in oDefinedParameters) { // check that all parameters have a value assigned. This is also // true for those marked as optional, because the // omitted value is conveyed by some default value, e.g. as empty // string. if (this._oParameterValueAssignment[sDefinedParameterName] == undefined) { throw "Parameter " + sDefinedParameterName + " has no value assigned"; // TODO } } var sKeyIdentification = "", bFirst = true; for ( var sParameterName in this._oParameterValueAssignment) { sKeyIdentification += (bFirst ? "" : ",") + sParameterName + "=" + this._renderParameterKeyValue(this._oParameterValueAssignment[sParameterName], oDefinedParameters[sParameterName].getProperty().type); bFirst = false; } return (sServiceRootURI ? sServiceRootURI : "") + "/" + this._oParameterization.getEntitySet().getQName() + "(" + sKeyIdentification + ")"; }
[ "function", "(", "sServiceRootURI", ")", "{", "var", "oDefinedParameters", "=", "this", ".", "_oParameterization", ".", "getAllParameters", "(", ")", ";", "for", "(", "var", "sDefinedParameterName", "in", "oDefinedParameters", ")", "{", "// check that all parameters have a value assigned. This is also", "// true for those marked as optional, because the", "// omitted value is conveyed by some default value, e.g. as empty", "// string.", "if", "(", "this", ".", "_oParameterValueAssignment", "[", "sDefinedParameterName", "]", "==", "undefined", ")", "{", "throw", "\"Parameter \"", "+", "sDefinedParameterName", "+", "\" has no value assigned\"", ";", "// TODO", "}", "}", "var", "sKeyIdentification", "=", "\"\"", ",", "bFirst", "=", "true", ";", "for", "(", "var", "sParameterName", "in", "this", ".", "_oParameterValueAssignment", ")", "{", "sKeyIdentification", "+=", "(", "bFirst", "?", "\"\"", ":", "\",\"", ")", "+", "sParameterName", "+", "\"=\"", "+", "this", ".", "_renderParameterKeyValue", "(", "this", ".", "_oParameterValueAssignment", "[", "sParameterName", "]", ",", "oDefinedParameters", "[", "sParameterName", "]", ".", "getProperty", "(", ")", ".", "type", ")", ";", "bFirst", "=", "false", ";", "}", "return", "(", "sServiceRootURI", "?", "sServiceRootURI", ":", "\"\"", ")", "+", "\"/\"", "+", "this", ".", "_oParameterization", ".", "getEntitySet", "(", ")", ".", "getQName", "(", ")", "+", "\"(\"", "+", "sKeyIdentification", "+", "\")\"", ";", "}" ]
Get the URI to locate the parameterization entity for the values assigned to all parameters beforehand. Notice that a value must be supplied for every parameter including those marked as optional. For optional parameters, assign the special value that the service provider uses as an "omitted" value. For example, for services based on BW Easy Queries, this would be an empty string. @param {String} sServiceRootURI (optional) Identifies the root of the OData service @returns The resource path of the URI pointing to the entity set. It is a relative URI unless a service root is given, which would then prefixed in order to return a complete URL. @public @function @name sap.ui.model.analytics.odata4analytics.ParameterizationRequest#getURIToParameterizationEntry
[ "Get", "the", "URI", "to", "locate", "the", "parameterization", "entity", "for", "the", "values", "assigned", "to", "all", "parameters", "beforehand", ".", "Notice", "that", "a", "value", "must", "be", "supplied", "for", "every", "parameter", "including", "those", "marked", "as", "optional", ".", "For", "optional", "parameters", "assign", "the", "special", "value", "that", "the", "service", "provider", "uses", "as", "an", "omitted", "value", ".", "For", "example", "for", "services", "based", "on", "BW", "Easy", "Queries", "this", "would", "be", "an", "empty", "string", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3978-L4001
3,743
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function (sHierarchyDimensionName, bIncludeExternalKey, bIncludeText) { var oDimension; if (!sHierarchyDimensionName) { return; } // sHierarchyDimensionName is the name of a dimension property (and not e.g. of a // dimension's text property), findDimensionByName can be used instead of // findDimensionByPropertyName oDimension = this._oQueryResult.findDimensionByName(sHierarchyDimensionName); if (!oDimension) { throw new Error("'" + sHierarchyDimensionName + "' is not a dimension property"); } if (!oDimension.getHierarchy()) { throw new Error("Dimension '" + sHierarchyDimensionName + "' does not have a hierarchy"); } // reset previously compiled list of selected properties this._oSelectedPropertyNames = null; this._oDimensionHierarchies[sHierarchyDimensionName] = { externalKey : bIncludeExternalKey, id: true, text : bIncludeText }; }
javascript
function (sHierarchyDimensionName, bIncludeExternalKey, bIncludeText) { var oDimension; if (!sHierarchyDimensionName) { return; } // sHierarchyDimensionName is the name of a dimension property (and not e.g. of a // dimension's text property), findDimensionByName can be used instead of // findDimensionByPropertyName oDimension = this._oQueryResult.findDimensionByName(sHierarchyDimensionName); if (!oDimension) { throw new Error("'" + sHierarchyDimensionName + "' is not a dimension property"); } if (!oDimension.getHierarchy()) { throw new Error("Dimension '" + sHierarchyDimensionName + "' does not have a hierarchy"); } // reset previously compiled list of selected properties this._oSelectedPropertyNames = null; this._oDimensionHierarchies[sHierarchyDimensionName] = { externalKey : bIncludeExternalKey, id: true, text : bIncludeText }; }
[ "function", "(", "sHierarchyDimensionName", ",", "bIncludeExternalKey", ",", "bIncludeText", ")", "{", "var", "oDimension", ";", "if", "(", "!", "sHierarchyDimensionName", ")", "{", "return", ";", "}", "// sHierarchyDimensionName is the name of a dimension property (and not e.g. of a", "// dimension's text property), findDimensionByName can be used instead of", "// findDimensionByPropertyName", "oDimension", "=", "this", ".", "_oQueryResult", ".", "findDimensionByName", "(", "sHierarchyDimensionName", ")", ";", "if", "(", "!", "oDimension", ")", "{", "throw", "new", "Error", "(", "\"'\"", "+", "sHierarchyDimensionName", "+", "\"' is not a dimension property\"", ")", ";", "}", "if", "(", "!", "oDimension", ".", "getHierarchy", "(", ")", ")", "{", "throw", "new", "Error", "(", "\"Dimension '\"", "+", "sHierarchyDimensionName", "+", "\"' does not have a hierarchy\"", ")", ";", "}", "// reset previously compiled list of selected properties", "this", ".", "_oSelectedPropertyNames", "=", "null", ";", "this", ".", "_oDimensionHierarchies", "[", "sHierarchyDimensionName", "]", "=", "{", "externalKey", ":", "bIncludeExternalKey", ",", "id", ":", "true", ",", "text", ":", "bIncludeText", "}", ";", "}" ]
Adds a recursive hierarchy to the aggregation level. @param {string} sHierarchyDimensionName Name of dimension whose hierarchy shall be part of the aggregation level @param {boolean} bIncludeExternalKey Indicator whether or not to include the external node key (if available) in the query result @param {boolean} bIncludeText Indicator whether or not to include the node text (if available) in the query result @throws {Error} If the given name is not a name of a dimension or the corresponding dimension does not have a hierarchy. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#addRecursiveHierarchy
[ "Adds", "a", "recursive", "hierarchy", "to", "the", "aggregation", "level", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4065-L4091
3,744
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sResourcePath) { this._sResourcePath = sResourcePath; if (this._sResourcePath.indexOf("/") != 0) { throw "Missing leading / (slash) for resource path"; } if (this._oQueryResult.getParameterization()) { var iLastPathSep = sResourcePath.lastIndexOf("/"); if (iLastPathSep == -1) { throw "Missing navigation from parameter entity set to query result in resource path"; } var sNavPropName = sResourcePath.substring(iLastPathSep + 1); if (sNavPropName != this._oQueryResult.getParameterization().getNavigationPropertyToQueryResult()) { throw "Invalid navigation property from parameter entity set to query result in resource path"; } } }
javascript
function(sResourcePath) { this._sResourcePath = sResourcePath; if (this._sResourcePath.indexOf("/") != 0) { throw "Missing leading / (slash) for resource path"; } if (this._oQueryResult.getParameterization()) { var iLastPathSep = sResourcePath.lastIndexOf("/"); if (iLastPathSep == -1) { throw "Missing navigation from parameter entity set to query result in resource path"; } var sNavPropName = sResourcePath.substring(iLastPathSep + 1); if (sNavPropName != this._oQueryResult.getParameterization().getNavigationPropertyToQueryResult()) { throw "Invalid navigation property from parameter entity set to query result in resource path"; } } }
[ "function", "(", "sResourcePath", ")", "{", "this", ".", "_sResourcePath", "=", "sResourcePath", ";", "if", "(", "this", ".", "_sResourcePath", ".", "indexOf", "(", "\"/\"", ")", "!=", "0", ")", "{", "throw", "\"Missing leading / (slash) for resource path\"", ";", "}", "if", "(", "this", ".", "_oQueryResult", ".", "getParameterization", "(", ")", ")", "{", "var", "iLastPathSep", "=", "sResourcePath", ".", "lastIndexOf", "(", "\"/\"", ")", ";", "if", "(", "iLastPathSep", "==", "-", "1", ")", "{", "throw", "\"Missing navigation from parameter entity set to query result in resource path\"", ";", "}", "var", "sNavPropName", "=", "sResourcePath", ".", "substring", "(", "iLastPathSep", "+", "1", ")", ";", "if", "(", "sNavPropName", "!=", "this", ".", "_oQueryResult", ".", "getParameterization", "(", ")", ".", "getNavigationPropertyToQueryResult", "(", ")", ")", "{", "throw", "\"Invalid navigation property from parameter entity set to query result in resource path\"", ";", "}", "}", "}" ]
Set the resource path to be considered for the OData request URI of this query request object. This method provides an alternative way to assign a path comprising a parameterization. If a path is provided, it overwrites any parameterization object that might have been specified separately. @param {string} sResourcePath Resource path pointing to the entity set of the query result. Must include a valid parameterization if query contains parameters. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#setResourcePath
[ "Set", "the", "resource", "path", "to", "be", "considered", "for", "the", "OData", "request", "URI", "of", "this", "query", "request", "object", ".", "This", "method", "provides", "an", "alternative", "way", "to", "assign", "a", "path", "comprising", "a", "parameterization", ".", "If", "a", "path", "is", "provided", "it", "overwrites", "any", "parameterization", "object", "that", "might", "have", "been", "specified", "separately", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4123-L4138
3,745
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(aDimensionName) { this._oAggregationLevel = {}; if (!aDimensionName) { aDimensionName = this._oQueryResult.getAllDimensionNames(); } this.addToAggregationLevel(aDimensionName); this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties }
javascript
function(aDimensionName) { this._oAggregationLevel = {}; if (!aDimensionName) { aDimensionName = this._oQueryResult.getAllDimensionNames(); } this.addToAggregationLevel(aDimensionName); this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties }
[ "function", "(", "aDimensionName", ")", "{", "this", ".", "_oAggregationLevel", "=", "{", "}", ";", "if", "(", "!", "aDimensionName", ")", "{", "aDimensionName", "=", "this", ".", "_oQueryResult", ".", "getAllDimensionNames", "(", ")", ";", "}", "this", ".", "addToAggregationLevel", "(", "aDimensionName", ")", ";", "this", ".", "_oSelectedPropertyNames", "=", "null", ";", "// reset previously compiled list of selected properties", "}" ]
Set the aggregation level for the query result request. By default, the query result will include the properties holding the keys of the given dimensions. This setting can be changed using includeDimensionKeyTextAttributes. @param aDimensionName Array of dimension names to be part of the aggregation level. If null, the aggregation level includes all dimensions, if empty, no dimension is included. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#setAggregationLevel
[ "Set", "the", "aggregation", "level", "for", "the", "query", "result", "request", ".", "By", "default", "the", "query", "result", "will", "include", "the", "properties", "holding", "the", "keys", "of", "the", "given", "dimensions", ".", "This", "setting", "can", "be", "changed", "using", "includeDimensionKeyTextAttributes", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4180-L4187
3,746
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(aDimensionName) { if (!aDimensionName) { return; } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties for (var i = -1, sDimName; (sDimName = aDimensionName[++i]) !== undefined;) { if (!this._oQueryResult.findDimensionByName(sDimName)) { throw sDimName + " is not a valid dimension name"; // TODO } this._oAggregationLevel[sDimName] = { key : true, text : false, attributes : null }; } }
javascript
function(aDimensionName) { if (!aDimensionName) { return; } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties for (var i = -1, sDimName; (sDimName = aDimensionName[++i]) !== undefined;) { if (!this._oQueryResult.findDimensionByName(sDimName)) { throw sDimName + " is not a valid dimension name"; // TODO } this._oAggregationLevel[sDimName] = { key : true, text : false, attributes : null }; } }
[ "function", "(", "aDimensionName", ")", "{", "if", "(", "!", "aDimensionName", ")", "{", "return", ";", "}", "this", ".", "_oSelectedPropertyNames", "=", "null", ";", "// reset previously compiled list of selected properties", "for", "(", "var", "i", "=", "-", "1", ",", "sDimName", ";", "(", "sDimName", "=", "aDimensionName", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "!", "this", ".", "_oQueryResult", ".", "findDimensionByName", "(", "sDimName", ")", ")", "{", "throw", "sDimName", "+", "\" is not a valid dimension name\"", ";", "// TODO", "}", "this", ".", "_oAggregationLevel", "[", "sDimName", "]", "=", "{", "key", ":", "true", ",", "text", ":", "false", ",", "attributes", ":", "null", "}", ";", "}", "}" ]
Add one or more dimensions to the aggregation level @param aDimensionName Array of dimension names to be added to the already defined aggregation level. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#addToAggregationLevel
[ "Add", "one", "or", "more", "dimensions", "to", "the", "aggregation", "level" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4200-L4217
3,747
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(aDimensionName) { if (!aDimensionName) { return; } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties for (var i = -1, sDimName; (sDimName = aDimensionName[++i]) !== undefined;) { if (!this._oQueryResult.findDimensionByName(sDimName)) { throw sDimName + " is not a valid dimension name"; // TODO } if (this._oAggregationLevel[sDimName] != undefined) { delete this._oAggregationLevel[sDimName]; // remove potential sort expression on this dimension this.getSortExpression().removeSorter(sDimName); } } }
javascript
function(aDimensionName) { if (!aDimensionName) { return; } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties for (var i = -1, sDimName; (sDimName = aDimensionName[++i]) !== undefined;) { if (!this._oQueryResult.findDimensionByName(sDimName)) { throw sDimName + " is not a valid dimension name"; // TODO } if (this._oAggregationLevel[sDimName] != undefined) { delete this._oAggregationLevel[sDimName]; // remove potential sort expression on this dimension this.getSortExpression().removeSorter(sDimName); } } }
[ "function", "(", "aDimensionName", ")", "{", "if", "(", "!", "aDimensionName", ")", "{", "return", ";", "}", "this", ".", "_oSelectedPropertyNames", "=", "null", ";", "// reset previously compiled list of selected properties", "for", "(", "var", "i", "=", "-", "1", ",", "sDimName", ";", "(", "sDimName", "=", "aDimensionName", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "!", "this", ".", "_oQueryResult", ".", "findDimensionByName", "(", "sDimName", ")", ")", "{", "throw", "sDimName", "+", "\" is not a valid dimension name\"", ";", "// TODO", "}", "if", "(", "this", ".", "_oAggregationLevel", "[", "sDimName", "]", "!=", "undefined", ")", "{", "delete", "this", ".", "_oAggregationLevel", "[", "sDimName", "]", ";", "// remove potential sort expression on this dimension", "this", ".", "getSortExpression", "(", ")", ".", "removeSorter", "(", "sDimName", ")", ";", "}", "}", "}" ]
Remove one or more dimensions from the aggregation level. The method also removed a potential sort expression on the dimension. @param aDimensionName Array of dimension names to be removed from the already defined aggregation level. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#removeFromAggregationLevel
[ "Remove", "one", "or", "more", "dimensions", "from", "the", "aggregation", "level", ".", "The", "method", "also", "removed", "a", "potential", "sort", "expression", "on", "the", "dimension", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4230-L4247
3,748
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(aMeasureName) { if (!aMeasureName) { aMeasureName = this._oQueryResult.getAllMeasureNames(); } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties this._oMeasures = {}; for (var i = -1, sMeasName; (sMeasName = aMeasureName[++i]) !== undefined;) { if (!this._oQueryResult.findMeasureByName(sMeasName)) { throw sMeasName + " is not a valid measure name"; // TODO } this._oMeasures[sMeasName] = { value : true, text : false, unit : false }; } }
javascript
function(aMeasureName) { if (!aMeasureName) { aMeasureName = this._oQueryResult.getAllMeasureNames(); } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties this._oMeasures = {}; for (var i = -1, sMeasName; (sMeasName = aMeasureName[++i]) !== undefined;) { if (!this._oQueryResult.findMeasureByName(sMeasName)) { throw sMeasName + " is not a valid measure name"; // TODO } this._oMeasures[sMeasName] = { value : true, text : false, unit : false }; } }
[ "function", "(", "aMeasureName", ")", "{", "if", "(", "!", "aMeasureName", ")", "{", "aMeasureName", "=", "this", ".", "_oQueryResult", ".", "getAllMeasureNames", "(", ")", ";", "}", "this", ".", "_oSelectedPropertyNames", "=", "null", ";", "// reset previously compiled list of selected properties", "this", ".", "_oMeasures", "=", "{", "}", ";", "for", "(", "var", "i", "=", "-", "1", ",", "sMeasName", ";", "(", "sMeasName", "=", "aMeasureName", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "!", "this", ".", "_oQueryResult", ".", "findMeasureByName", "(", "sMeasName", ")", ")", "{", "throw", "sMeasName", "+", "\" is not a valid measure name\"", ";", "// TODO", "}", "this", ".", "_oMeasures", "[", "sMeasName", "]", "=", "{", "value", ":", "true", ",", "text", ":", "false", ",", "unit", ":", "false", "}", ";", "}", "}" ]
Set the measures to be included in the query result request. By default, the query result will include the properties holding the raw values of the given measures. This setting can be changed using includeMeasureRawFormattedValueUnit. @param aMeasureName Array of measure names to be part of the query result request. If null, the request includes all measures, if empty, no measure is included. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#setMeasures
[ "Set", "the", "measures", "to", "be", "included", "in", "the", "query", "result", "request", ".", "By", "default", "the", "query", "result", "will", "include", "the", "properties", "holding", "the", "raw", "values", "of", "the", "given", "measures", ".", "This", "setting", "can", "be", "changed", "using", "includeMeasureRawFormattedValueUnit", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4302-L4320
3,749
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sDimensionName, bIncludeKey, bIncludeText, aAttributeName) { this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties var aDimName = []; if (sDimensionName) { if (this._oAggregationLevel[sDimensionName] == undefined) { throw sDimensionName + " is not included in the aggregation level"; } aDimName.push(sDimensionName); } else { for ( var sName in this._oAggregationLevel) { aDimName.push(sName); } aAttributeName = null; } for (var i = -1, sDimName; (sDimName = aDimName[++i]) !== undefined;) { if (bIncludeKey != null) { this._oAggregationLevel[sDimName].key = bIncludeKey; } if (bIncludeText != null) { this._oAggregationLevel[sDimName].text = bIncludeText; } if (aAttributeName != null) { this._oAggregationLevel[sDimName].attributes = aAttributeName; } } }
javascript
function(sDimensionName, bIncludeKey, bIncludeText, aAttributeName) { this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties var aDimName = []; if (sDimensionName) { if (this._oAggregationLevel[sDimensionName] == undefined) { throw sDimensionName + " is not included in the aggregation level"; } aDimName.push(sDimensionName); } else { for ( var sName in this._oAggregationLevel) { aDimName.push(sName); } aAttributeName = null; } for (var i = -1, sDimName; (sDimName = aDimName[++i]) !== undefined;) { if (bIncludeKey != null) { this._oAggregationLevel[sDimName].key = bIncludeKey; } if (bIncludeText != null) { this._oAggregationLevel[sDimName].text = bIncludeText; } if (aAttributeName != null) { this._oAggregationLevel[sDimName].attributes = aAttributeName; } } }
[ "function", "(", "sDimensionName", ",", "bIncludeKey", ",", "bIncludeText", ",", "aAttributeName", ")", "{", "this", ".", "_oSelectedPropertyNames", "=", "null", ";", "// reset previously compiled list of selected properties", "var", "aDimName", "=", "[", "]", ";", "if", "(", "sDimensionName", ")", "{", "if", "(", "this", ".", "_oAggregationLevel", "[", "sDimensionName", "]", "==", "undefined", ")", "{", "throw", "sDimensionName", "+", "\" is not included in the aggregation level\"", ";", "}", "aDimName", ".", "push", "(", "sDimensionName", ")", ";", "}", "else", "{", "for", "(", "var", "sName", "in", "this", ".", "_oAggregationLevel", ")", "{", "aDimName", ".", "push", "(", "sName", ")", ";", "}", "aAttributeName", "=", "null", ";", "}", "for", "(", "var", "i", "=", "-", "1", ",", "sDimName", ";", "(", "sDimName", "=", "aDimName", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "bIncludeKey", "!=", "null", ")", "{", "this", ".", "_oAggregationLevel", "[", "sDimName", "]", ".", "key", "=", "bIncludeKey", ";", "}", "if", "(", "bIncludeText", "!=", "null", ")", "{", "this", ".", "_oAggregationLevel", "[", "sDimName", "]", ".", "text", "=", "bIncludeText", ";", "}", "if", "(", "aAttributeName", "!=", "null", ")", "{", "this", ".", "_oAggregationLevel", "[", "sDimName", "]", ".", "attributes", "=", "aAttributeName", ";", "}", "}", "}" ]
Specify which dimension components shall be included in the query result. The settings get applied to the currently defined aggregation level. @param {string} sDimensionName Name of the dimension for which the settings get applied. Specify null to apply the settings to all dimensions in the aggregation level. @param {boolean} bIncludeKey Indicator whether or not to include the dimension key in the query result. Pass null to keep current setting. @param {boolean} bIncludeText Indicator whether or not to include the dimension text (if available) in the query result. Pass null to keep current setting. @param aAttributeName Array of dimension attribute names to be included in the result. Pass null to keep current setting. This argument is ignored if sDimensionName is null. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#includeDimensionKeyTextAttributes
[ "Specify", "which", "dimension", "components", "shall", "be", "included", "in", "the", "query", "result", ".", "The", "settings", "get", "applied", "to", "the", "currently", "defined", "aggregation", "level", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4361-L4387
3,750
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sMeasureName, bIncludeRawValue, bIncludeFormattedValue, bIncludeUnit) { this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties var aMeasName = []; if (sMeasureName) { if (this._oMeasures[sMeasureName] == undefined) { throw sMeasureName + " is not part of the query result"; } aMeasName.push(sMeasureName); } else { for ( var sName in this._oMeasures) { aMeasName.push(sName); } } for (var i = -1, sMeasName; (sMeasName = aMeasName[++i]) !== undefined;) { if (bIncludeRawValue != null) { this._oMeasures[sMeasName].value = bIncludeRawValue; } if (bIncludeFormattedValue != null) { this._oMeasures[sMeasName].text = bIncludeFormattedValue; } if (bIncludeUnit != null) { this._oMeasures[sMeasName].unit = bIncludeUnit; } } }
javascript
function(sMeasureName, bIncludeRawValue, bIncludeFormattedValue, bIncludeUnit) { this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties var aMeasName = []; if (sMeasureName) { if (this._oMeasures[sMeasureName] == undefined) { throw sMeasureName + " is not part of the query result"; } aMeasName.push(sMeasureName); } else { for ( var sName in this._oMeasures) { aMeasName.push(sName); } } for (var i = -1, sMeasName; (sMeasName = aMeasName[++i]) !== undefined;) { if (bIncludeRawValue != null) { this._oMeasures[sMeasName].value = bIncludeRawValue; } if (bIncludeFormattedValue != null) { this._oMeasures[sMeasName].text = bIncludeFormattedValue; } if (bIncludeUnit != null) { this._oMeasures[sMeasName].unit = bIncludeUnit; } } }
[ "function", "(", "sMeasureName", ",", "bIncludeRawValue", ",", "bIncludeFormattedValue", ",", "bIncludeUnit", ")", "{", "this", ".", "_oSelectedPropertyNames", "=", "null", ";", "// reset previously compiled list of selected properties", "var", "aMeasName", "=", "[", "]", ";", "if", "(", "sMeasureName", ")", "{", "if", "(", "this", ".", "_oMeasures", "[", "sMeasureName", "]", "==", "undefined", ")", "{", "throw", "sMeasureName", "+", "\" is not part of the query result\"", ";", "}", "aMeasName", ".", "push", "(", "sMeasureName", ")", ";", "}", "else", "{", "for", "(", "var", "sName", "in", "this", ".", "_oMeasures", ")", "{", "aMeasName", ".", "push", "(", "sName", ")", ";", "}", "}", "for", "(", "var", "i", "=", "-", "1", ",", "sMeasName", ";", "(", "sMeasName", "=", "aMeasName", "[", "++", "i", "]", ")", "!==", "undefined", ";", ")", "{", "if", "(", "bIncludeRawValue", "!=", "null", ")", "{", "this", ".", "_oMeasures", "[", "sMeasName", "]", ".", "value", "=", "bIncludeRawValue", ";", "}", "if", "(", "bIncludeFormattedValue", "!=", "null", ")", "{", "this", ".", "_oMeasures", "[", "sMeasName", "]", ".", "text", "=", "bIncludeFormattedValue", ";", "}", "if", "(", "bIncludeUnit", "!=", "null", ")", "{", "this", ".", "_oMeasures", "[", "sMeasName", "]", ".", "unit", "=", "bIncludeUnit", ";", "}", "}", "}" ]
Specify which measure components shall be included in the query result. The settings get applied to the currently set measures. @param {string} sMeasureName Name of the measure for which the settings get applied. Specify null to apply the settings to all currently set measures. @param {boolean} bIncludeRawValue Indicator whether or not to include the raw value in the query result. Pass null to keep current setting. @param {boolean} bIncludeFormattedValue Indicator whether or not to include the formatted value (if available) in the query result. Pass null to keep current setting. @param {boolean} bIncludeUnit Indicator whether or not to include the unit (if available) in the query result. Pass null to keep current setting. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#includeMeasureRawFormattedValueUnit
[ "Specify", "which", "measure", "components", "shall", "be", "included", "in", "the", "query", "result", ".", "The", "settings", "get", "applied", "to", "the", "currently", "set", "measures", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4411-L4436
3,751
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(bIncludeEntityKey, bIncludeCount, bReturnNoEntities) { if (bIncludeEntityKey != null) { this._bIncludeEntityKey = bIncludeEntityKey; } if (bIncludeCount != null) { this._bIncludeCount = bIncludeCount; } if (bReturnNoEntities != null) { this._bReturnNoEntities = bReturnNoEntities; } }
javascript
function(bIncludeEntityKey, bIncludeCount, bReturnNoEntities) { if (bIncludeEntityKey != null) { this._bIncludeEntityKey = bIncludeEntityKey; } if (bIncludeCount != null) { this._bIncludeCount = bIncludeCount; } if (bReturnNoEntities != null) { this._bReturnNoEntities = bReturnNoEntities; } }
[ "function", "(", "bIncludeEntityKey", ",", "bIncludeCount", ",", "bReturnNoEntities", ")", "{", "if", "(", "bIncludeEntityKey", "!=", "null", ")", "{", "this", ".", "_bIncludeEntityKey", "=", "bIncludeEntityKey", ";", "}", "if", "(", "bIncludeCount", "!=", "null", ")", "{", "this", ".", "_bIncludeCount", "=", "bIncludeCount", ";", "}", "if", "(", "bReturnNoEntities", "!=", "null", ")", "{", "this", ".", "_bReturnNoEntities", "=", "bReturnNoEntities", ";", "}", "}" ]
Set further options to be applied for the OData request to fetch the query result @param {Boolean} bIncludeEntityKey Indicates whether or not the entity key should be returned for every entry in the query result. Default is not to include it. Pass null to keep current setting. @param {Boolean} bIncludeCount Indicates whether or not the result shall include a count for the returned entities. Default is not to include it. Pass null to keep current setting. @param {Boolean} bReturnNoEntities Indicates whether or not the result shall be empty. This will translate to $top=0 in the OData request and override any setting done with setResultPageBoundaries. The default is not to suppress entities in the result. Pass null to keep current setting. The main use case for this option is to create a request with $inlinecount returning an entity count. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#setRequestOptions
[ "Set", "further", "options", "to", "be", "applied", "for", "the", "OData", "request", "to", "fetch", "the", "query", "result" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4536-L4546
3,752
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(start, end) { if (start != null && typeof start !== "number") { throw "Start value must be null or numeric"; // TODO } if (end !== null && typeof end !== "number") { throw "End value must be null or numeric"; // TODO } if (start == null) { start = 1; } if (start < 1 || start > (end == null ? start : end)) { throw "Invalid values for requested page boundaries"; // TODO } this._iSkipRequestOption = (start > 1) ? start - 1 : null; this._iTopRequestOption = (end != null) ? (end - start + 1) : null; }
javascript
function(start, end) { if (start != null && typeof start !== "number") { throw "Start value must be null or numeric"; // TODO } if (end !== null && typeof end !== "number") { throw "End value must be null or numeric"; // TODO } if (start == null) { start = 1; } if (start < 1 || start > (end == null ? start : end)) { throw "Invalid values for requested page boundaries"; // TODO } this._iSkipRequestOption = (start > 1) ? start - 1 : null; this._iTopRequestOption = (end != null) ? (end - start + 1) : null; }
[ "function", "(", "start", ",", "end", ")", "{", "if", "(", "start", "!=", "null", "&&", "typeof", "start", "!==", "\"number\"", ")", "{", "throw", "\"Start value must be null or numeric\"", ";", "// TODO", "}", "if", "(", "end", "!==", "null", "&&", "typeof", "end", "!==", "\"number\"", ")", "{", "throw", "\"End value must be null or numeric\"", ";", "// TODO", "}", "if", "(", "start", "==", "null", ")", "{", "start", "=", "1", ";", "}", "if", "(", "start", "<", "1", "||", "start", ">", "(", "end", "==", "null", "?", "start", ":", "end", ")", ")", "{", "throw", "\"Invalid values for requested page boundaries\"", ";", "// TODO", "}", "this", ".", "_iSkipRequestOption", "=", "(", "start", ">", "1", ")", "?", "start", "-", "1", ":", "null", ";", "this", ".", "_iTopRequestOption", "=", "(", "end", "!=", "null", ")", "?", "(", "end", "-", "start", "+", "1", ")", ":", "null", ";", "}" ]
Specify that only a page of the query result shall be returned. A page is described by its boundaries, that are row numbers for the first and last rows in the query result to be returned. @param {Number} start The first row of the query result to be returned. Numbering starts at 1. Passing null is equivalent to start with the first row. @param {Number} end The last row of the query result to be returned. Passing null is equivalent to get all rows up to the end of the query result. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#setResultPageBoundaries
[ "Specify", "that", "only", "a", "page", "of", "the", "query", "result", "shall", "be", "returned", ".", "A", "page", "is", "described", "by", "its", "boundaries", "that", "are", "row", "numbers", "for", "the", "first", "and", "last", "rows", "in", "the", "query", "result", "to", "be", "returned", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4565-L4583
3,753
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sServiceRootURI) { var sURI = null; if (this._sResourcePath != null) { sURI = (sServiceRootURI ? sServiceRootURI : "") + this._sResourcePath; } else if (this._oQueryResult.getParameterization()) { if (!this._oParameterizationRequest) { throw "Missing parameterization request"; } else { sURI = this._oParameterizationRequest.getURIToParameterizationEntry(sServiceRootURI) + "/" + this._oQueryResult.getParameterization().getNavigationPropertyToQueryResult(); } } else { sURI = (sServiceRootURI ? sServiceRootURI : "") + "/" + this._oQueryResult.getEntitySet().getQName(); } return sURI; }
javascript
function(sServiceRootURI) { var sURI = null; if (this._sResourcePath != null) { sURI = (sServiceRootURI ? sServiceRootURI : "") + this._sResourcePath; } else if (this._oQueryResult.getParameterization()) { if (!this._oParameterizationRequest) { throw "Missing parameterization request"; } else { sURI = this._oParameterizationRequest.getURIToParameterizationEntry(sServiceRootURI) + "/" + this._oQueryResult.getParameterization().getNavigationPropertyToQueryResult(); } } else { sURI = (sServiceRootURI ? sServiceRootURI : "") + "/" + this._oQueryResult.getEntitySet().getQName(); } return sURI; }
[ "function", "(", "sServiceRootURI", ")", "{", "var", "sURI", "=", "null", ";", "if", "(", "this", ".", "_sResourcePath", "!=", "null", ")", "{", "sURI", "=", "(", "sServiceRootURI", "?", "sServiceRootURI", ":", "\"\"", ")", "+", "this", ".", "_sResourcePath", ";", "}", "else", "if", "(", "this", ".", "_oQueryResult", ".", "getParameterization", "(", ")", ")", "{", "if", "(", "!", "this", ".", "_oParameterizationRequest", ")", "{", "throw", "\"Missing parameterization request\"", ";", "}", "else", "{", "sURI", "=", "this", ".", "_oParameterizationRequest", ".", "getURIToParameterizationEntry", "(", "sServiceRootURI", ")", "+", "\"/\"", "+", "this", ".", "_oQueryResult", ".", "getParameterization", "(", ")", ".", "getNavigationPropertyToQueryResult", "(", ")", ";", "}", "}", "else", "{", "sURI", "=", "(", "sServiceRootURI", "?", "sServiceRootURI", ":", "\"\"", ")", "+", "\"/\"", "+", "this", ".", "_oQueryResult", ".", "getEntitySet", "(", ")", ".", "getQName", "(", ")", ";", "}", "return", "sURI", ";", "}" ]
Get the URI to locate the entity set for the query result. @param {String} sServiceRootURI (optional) Identifies the root of the OData service @returns {String} The resource path of the URI pointing to the entity set. It is a relative URI unless a service root is given, which would then prefixed in order to return a complete URL. @public @function @name sap.ui.model.analytics.odata4analytics.QueryResultRequest#getURIToQueryResultEntitySet
[ "Get", "the", "URI", "to", "locate", "the", "entity", "set", "for", "the", "query", "result", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4624-L4639
3,754
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sServiceRootURI) { // construct resource path var sResourcePath = null; sResourcePath = (sServiceRootURI ? sServiceRootURI : "") + "/" + this._oParameter.getContainingParameterization().getEntitySet().getQName(); // check if request is compliant with filter constraints expressed in // metadata this.getFilterExpression().checkValidity(); // construct query options var sSelectOption = this.getURIQueryOptionValue("$select"); var sFilterOption = this.getURIQueryOptionValue("$filter"); var sSortOption = this.getURIQueryOptionValue("$orderby"); var sURI = sResourcePath; var bQuestionmark = false; if (sSelectOption) { sURI += "?$select=" + sSelectOption; bQuestionmark = true; } if (this._oFilterExpression && sFilterOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$filter=" + sFilterOption; } if (this._oSortExpression && sSortOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$orderby=" + sSortOption; } return sURI; }
javascript
function(sServiceRootURI) { // construct resource path var sResourcePath = null; sResourcePath = (sServiceRootURI ? sServiceRootURI : "") + "/" + this._oParameter.getContainingParameterization().getEntitySet().getQName(); // check if request is compliant with filter constraints expressed in // metadata this.getFilterExpression().checkValidity(); // construct query options var sSelectOption = this.getURIQueryOptionValue("$select"); var sFilterOption = this.getURIQueryOptionValue("$filter"); var sSortOption = this.getURIQueryOptionValue("$orderby"); var sURI = sResourcePath; var bQuestionmark = false; if (sSelectOption) { sURI += "?$select=" + sSelectOption; bQuestionmark = true; } if (this._oFilterExpression && sFilterOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$filter=" + sFilterOption; } if (this._oSortExpression && sSortOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$orderby=" + sSortOption; } return sURI; }
[ "function", "(", "sServiceRootURI", ")", "{", "// construct resource path", "var", "sResourcePath", "=", "null", ";", "sResourcePath", "=", "(", "sServiceRootURI", "?", "sServiceRootURI", ":", "\"\"", ")", "+", "\"/\"", "+", "this", ".", "_oParameter", ".", "getContainingParameterization", "(", ")", ".", "getEntitySet", "(", ")", ".", "getQName", "(", ")", ";", "// check if request is compliant with filter constraints expressed in", "// metadata", "this", ".", "getFilterExpression", "(", ")", ".", "checkValidity", "(", ")", ";", "// construct query options", "var", "sSelectOption", "=", "this", ".", "getURIQueryOptionValue", "(", "\"$select\"", ")", ";", "var", "sFilterOption", "=", "this", ".", "getURIQueryOptionValue", "(", "\"$filter\"", ")", ";", "var", "sSortOption", "=", "this", ".", "getURIQueryOptionValue", "(", "\"$orderby\"", ")", ";", "var", "sURI", "=", "sResourcePath", ";", "var", "bQuestionmark", "=", "false", ";", "if", "(", "sSelectOption", ")", "{", "sURI", "+=", "\"?$select=\"", "+", "sSelectOption", ";", "bQuestionmark", "=", "true", ";", "}", "if", "(", "this", ".", "_oFilterExpression", "&&", "sFilterOption", ")", "{", "if", "(", "!", "bQuestionmark", ")", "{", "sURI", "+=", "\"?\"", ";", "bQuestionmark", "=", "true", ";", "}", "else", "{", "sURI", "+=", "\"&\"", ";", "}", "sURI", "+=", "\"$filter=\"", "+", "sFilterOption", ";", "}", "if", "(", "this", ".", "_oSortExpression", "&&", "sSortOption", ")", "{", "if", "(", "!", "bQuestionmark", ")", "{", "sURI", "+=", "\"?\"", ";", "bQuestionmark", "=", "true", ";", "}", "else", "{", "sURI", "+=", "\"&\"", ";", "}", "sURI", "+=", "\"$orderby=\"", "+", "sSortOption", ";", "}", "return", "sURI", ";", "}" ]
Get the unescaped URI to fetch the parameter value set. @param {String} sServiceRootURI (optional) Identifies the root of the OData service @returns {String} The unescaped URI that contains the OData resource path and OData system query options to express the request for the parameter value set.. @public @function @name sap.ui.model.analytics.odata4analytics.ParameterValueSetRequest#getURIToParameterValueSetEntries
[ "Get", "the", "unescaped", "URI", "to", "fetch", "the", "parameter", "value", "set", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L5100-L5143
3,755
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(bIncludeText, bIncludeAttributes) { this._oValueSetResult.text = { text : false, attributes : false }; if (bIncludeText == true) { this._oValueSetResult.text = true; } if (bIncludeAttributes == true) { this._oValueSetResult.attributes = true; } }
javascript
function(bIncludeText, bIncludeAttributes) { this._oValueSetResult.text = { text : false, attributes : false }; if (bIncludeText == true) { this._oValueSetResult.text = true; } if (bIncludeAttributes == true) { this._oValueSetResult.attributes = true; } }
[ "function", "(", "bIncludeText", ",", "bIncludeAttributes", ")", "{", "this", ".", "_oValueSetResult", ".", "text", "=", "{", "text", ":", "false", ",", "attributes", ":", "false", "}", ";", "if", "(", "bIncludeText", "==", "true", ")", "{", "this", ".", "_oValueSetResult", ".", "text", "=", "true", ";", "}", "if", "(", "bIncludeAttributes", "==", "true", ")", "{", "this", ".", "_oValueSetResult", ".", "attributes", "=", "true", ";", "}", "}" ]
Specify which components of the dimension shall be included in the value set. @param {boolean} bIncludeText Indicator whether or not to include the dimension text (if available) in the value set. @param {boolean} bIncludeAttributes Indicator whether or not to include all dimension attributes (if available) in the value set. @public @function @name sap.ui.model.analytics.odata4analytics.includeDimensionTextAttributes
[ "Specify", "which", "components", "of", "the", "dimension", "shall", "be", "included", "in", "the", "value", "set", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L5238-L5249
3,756
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sServiceRootURI) { var sResourcePath = null; if (!this._bUseMasterData && this._oParameterizationRequest) { sResourcePath = this._oParameterizationRequest.getURIToParameterizationEntry(sServiceRootURI) + "/" + this._oDimension.getContainingQueryResult().getParameterization().getNavigationPropertyToQueryResult(); } else { sResourcePath = (sServiceRootURI ? sServiceRootURI : "") + "/" + this._oEntitySet.getQName(); } return sResourcePath; }
javascript
function(sServiceRootURI) { var sResourcePath = null; if (!this._bUseMasterData && this._oParameterizationRequest) { sResourcePath = this._oParameterizationRequest.getURIToParameterizationEntry(sServiceRootURI) + "/" + this._oDimension.getContainingQueryResult().getParameterization().getNavigationPropertyToQueryResult(); } else { sResourcePath = (sServiceRootURI ? sServiceRootURI : "") + "/" + this._oEntitySet.getQName(); } return sResourcePath; }
[ "function", "(", "sServiceRootURI", ")", "{", "var", "sResourcePath", "=", "null", ";", "if", "(", "!", "this", ".", "_bUseMasterData", "&&", "this", ".", "_oParameterizationRequest", ")", "{", "sResourcePath", "=", "this", ".", "_oParameterizationRequest", ".", "getURIToParameterizationEntry", "(", "sServiceRootURI", ")", "+", "\"/\"", "+", "this", ".", "_oDimension", ".", "getContainingQueryResult", "(", ")", ".", "getParameterization", "(", ")", ".", "getNavigationPropertyToQueryResult", "(", ")", ";", "}", "else", "{", "sResourcePath", "=", "(", "sServiceRootURI", "?", "sServiceRootURI", ":", "\"\"", ")", "+", "\"/\"", "+", "this", ".", "_oEntitySet", ".", "getQName", "(", ")", ";", "}", "return", "sResourcePath", ";", "}" ]
Get the URI to locate the entity set for the dimension memebers. @param {String} sServiceRootURI (optional) Identifies the root of the OData service @returns {String} The resource path of the URI pointing to the entity set. It is a relative URI unless a service root is given, which would then prefixed in order to return a complete URL. @public @function @name sap.ui.model.analytics.odata4analytics.DimensionMemberSetRequest#getURIToDimensionMemberEntitySet
[ "Get", "the", "URI", "to", "locate", "the", "entity", "set", "for", "the", "dimension", "memebers", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L5536-L5545
3,757
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sServiceRootURI) { // construct resource path var sResourcePath = this.getURIToDimensionMemberEntitySet(sServiceRootURI); // check if request is compliant with filter constraints expressed in // metadata this.getFilterExpression().checkValidity(); // construct query options var sSelectOption = this.getURIQueryOptionValue("$select"); var sFilterOption = this.getURIQueryOptionValue("$filter"); var sSortOption = this.getURIQueryOptionValue("$orderby"); var sTopOption = this.getURIQueryOptionValue("$top"); var sSkipOption = this.getURIQueryOptionValue("$skip"); var sInlineCountOption = this.getURIQueryOptionValue("$inlinecount"); var sURI = sResourcePath; var bQuestionmark = false; if (sSelectOption) { sURI += "?$select=" + sSelectOption; bQuestionmark = true; } if (this._oFilterExpression && sFilterOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$filter=" + sFilterOption; } if (this._oSortExpression && sSortOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$orderby=" + sSortOption; } if (this._iTopRequestOption && sTopOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$top=" + sTopOption; } if (this._iSkipRequestOption && sSkipOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$skip=" + sSkipOption; } if (this._bIncludeCount && sInlineCountOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$inlinecount=" + sInlineCountOption; } return sURI; }
javascript
function(sServiceRootURI) { // construct resource path var sResourcePath = this.getURIToDimensionMemberEntitySet(sServiceRootURI); // check if request is compliant with filter constraints expressed in // metadata this.getFilterExpression().checkValidity(); // construct query options var sSelectOption = this.getURIQueryOptionValue("$select"); var sFilterOption = this.getURIQueryOptionValue("$filter"); var sSortOption = this.getURIQueryOptionValue("$orderby"); var sTopOption = this.getURIQueryOptionValue("$top"); var sSkipOption = this.getURIQueryOptionValue("$skip"); var sInlineCountOption = this.getURIQueryOptionValue("$inlinecount"); var sURI = sResourcePath; var bQuestionmark = false; if (sSelectOption) { sURI += "?$select=" + sSelectOption; bQuestionmark = true; } if (this._oFilterExpression && sFilterOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$filter=" + sFilterOption; } if (this._oSortExpression && sSortOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$orderby=" + sSortOption; } if (this._iTopRequestOption && sTopOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$top=" + sTopOption; } if (this._iSkipRequestOption && sSkipOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$skip=" + sSkipOption; } if (this._bIncludeCount && sInlineCountOption) { if (!bQuestionmark) { sURI += "?"; bQuestionmark = true; } else { sURI += "&"; } sURI += "$inlinecount=" + sInlineCountOption; } return sURI; }
[ "function", "(", "sServiceRootURI", ")", "{", "// construct resource path", "var", "sResourcePath", "=", "this", ".", "getURIToDimensionMemberEntitySet", "(", "sServiceRootURI", ")", ";", "// check if request is compliant with filter constraints expressed in", "// metadata", "this", ".", "getFilterExpression", "(", ")", ".", "checkValidity", "(", ")", ";", "// construct query options", "var", "sSelectOption", "=", "this", ".", "getURIQueryOptionValue", "(", "\"$select\"", ")", ";", "var", "sFilterOption", "=", "this", ".", "getURIQueryOptionValue", "(", "\"$filter\"", ")", ";", "var", "sSortOption", "=", "this", ".", "getURIQueryOptionValue", "(", "\"$orderby\"", ")", ";", "var", "sTopOption", "=", "this", ".", "getURIQueryOptionValue", "(", "\"$top\"", ")", ";", "var", "sSkipOption", "=", "this", ".", "getURIQueryOptionValue", "(", "\"$skip\"", ")", ";", "var", "sInlineCountOption", "=", "this", ".", "getURIQueryOptionValue", "(", "\"$inlinecount\"", ")", ";", "var", "sURI", "=", "sResourcePath", ";", "var", "bQuestionmark", "=", "false", ";", "if", "(", "sSelectOption", ")", "{", "sURI", "+=", "\"?$select=\"", "+", "sSelectOption", ";", "bQuestionmark", "=", "true", ";", "}", "if", "(", "this", ".", "_oFilterExpression", "&&", "sFilterOption", ")", "{", "if", "(", "!", "bQuestionmark", ")", "{", "sURI", "+=", "\"?\"", ";", "bQuestionmark", "=", "true", ";", "}", "else", "{", "sURI", "+=", "\"&\"", ";", "}", "sURI", "+=", "\"$filter=\"", "+", "sFilterOption", ";", "}", "if", "(", "this", ".", "_oSortExpression", "&&", "sSortOption", ")", "{", "if", "(", "!", "bQuestionmark", ")", "{", "sURI", "+=", "\"?\"", ";", "bQuestionmark", "=", "true", ";", "}", "else", "{", "sURI", "+=", "\"&\"", ";", "}", "sURI", "+=", "\"$orderby=\"", "+", "sSortOption", ";", "}", "if", "(", "this", ".", "_iTopRequestOption", "&&", "sTopOption", ")", "{", "if", "(", "!", "bQuestionmark", ")", "{", "sURI", "+=", "\"?\"", ";", "bQuestionmark", "=", "true", ";", "}", "else", "{", "sURI", "+=", "\"&\"", ";", "}", "sURI", "+=", "\"$top=\"", "+", "sTopOption", ";", "}", "if", "(", "this", ".", "_iSkipRequestOption", "&&", "sSkipOption", ")", "{", "if", "(", "!", "bQuestionmark", ")", "{", "sURI", "+=", "\"?\"", ";", "bQuestionmark", "=", "true", ";", "}", "else", "{", "sURI", "+=", "\"&\"", ";", "}", "sURI", "+=", "\"$skip=\"", "+", "sSkipOption", ";", "}", "if", "(", "this", ".", "_bIncludeCount", "&&", "sInlineCountOption", ")", "{", "if", "(", "!", "bQuestionmark", ")", "{", "sURI", "+=", "\"?\"", ";", "bQuestionmark", "=", "true", ";", "}", "else", "{", "sURI", "+=", "\"&\"", ";", "}", "sURI", "+=", "\"$inlinecount=\"", "+", "sInlineCountOption", ";", "}", "return", "sURI", ";", "}" ]
Get the unescaped URI to fetch the dimension members, optionally augmented by text and attributes. @param {String} sServiceRootURI (optional) Identifies the root of the OData service @returns {String} The unescaped URI that contains the OData resource path and OData system query options to express the request for the parameter value set.. @public @function @name sap.ui.model.analytics.odata4analytics.DimensionMemberSetRequest#getURIToDimensionMemberEntries
[ "Get", "the", "unescaped", "URI", "to", "fetch", "the", "dimension", "members", "optionally", "augmented", "by", "text", "and", "attributes", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L5561-L5631
3,758
SAP/openui5
src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js
flattenBindings
function flattenBindings(oBinding, oParentDefaultModel) { var aBindings = []; var sModelName = oBinding.getMetadata().getName(); if (sModelName === "sap.ui.model.CompositeBinding") { oBinding.getBindings().forEach(function (oBinding) { aBindings = aBindings.concat(flattenBindings(oBinding, oParentDefaultModel)); }); } else if ( ( sModelName === "sap.ui.model.odata.ODataPropertyBinding" || sModelName === "sap.ui.model.odata.v2.ODataPropertyBinding" || sModelName === "sap.ui.model.odata.v4.ODataPropertyBinding" || sModelName === "sap.ui.model.json.JSONPropertyBinding" || sModelName === "sap.ui.model.json.XMLPropertyBinding" || sModelName === "sap.ui.model.resource.ResourcePropertyBinding" ) && oBinding.getModel() === oParentDefaultModel && oBinding.isRelative() && jQuery.isFunction(oBinding.getPath) && oBinding.getPath() ) { aBindings.push(oBinding); } return aBindings; }
javascript
function flattenBindings(oBinding, oParentDefaultModel) { var aBindings = []; var sModelName = oBinding.getMetadata().getName(); if (sModelName === "sap.ui.model.CompositeBinding") { oBinding.getBindings().forEach(function (oBinding) { aBindings = aBindings.concat(flattenBindings(oBinding, oParentDefaultModel)); }); } else if ( ( sModelName === "sap.ui.model.odata.ODataPropertyBinding" || sModelName === "sap.ui.model.odata.v2.ODataPropertyBinding" || sModelName === "sap.ui.model.odata.v4.ODataPropertyBinding" || sModelName === "sap.ui.model.json.JSONPropertyBinding" || sModelName === "sap.ui.model.json.XMLPropertyBinding" || sModelName === "sap.ui.model.resource.ResourcePropertyBinding" ) && oBinding.getModel() === oParentDefaultModel && oBinding.isRelative() && jQuery.isFunction(oBinding.getPath) && oBinding.getPath() ) { aBindings.push(oBinding); } return aBindings; }
[ "function", "flattenBindings", "(", "oBinding", ",", "oParentDefaultModel", ")", "{", "var", "aBindings", "=", "[", "]", ";", "var", "sModelName", "=", "oBinding", ".", "getMetadata", "(", ")", ".", "getName", "(", ")", ";", "if", "(", "sModelName", "===", "\"sap.ui.model.CompositeBinding\"", ")", "{", "oBinding", ".", "getBindings", "(", ")", ".", "forEach", "(", "function", "(", "oBinding", ")", "{", "aBindings", "=", "aBindings", ".", "concat", "(", "flattenBindings", "(", "oBinding", ",", "oParentDefaultModel", ")", ")", ";", "}", ")", ";", "}", "else", "if", "(", "(", "sModelName", "===", "\"sap.ui.model.odata.ODataPropertyBinding\"", "||", "sModelName", "===", "\"sap.ui.model.odata.v2.ODataPropertyBinding\"", "||", "sModelName", "===", "\"sap.ui.model.odata.v4.ODataPropertyBinding\"", "||", "sModelName", "===", "\"sap.ui.model.json.JSONPropertyBinding\"", "||", "sModelName", "===", "\"sap.ui.model.json.XMLPropertyBinding\"", "||", "sModelName", "===", "\"sap.ui.model.resource.ResourcePropertyBinding\"", ")", "&&", "oBinding", ".", "getModel", "(", ")", "===", "oParentDefaultModel", "&&", "oBinding", ".", "isRelative", "(", ")", "&&", "jQuery", ".", "isFunction", "(", "oBinding", ".", "getPath", ")", "&&", "oBinding", ".", "getPath", "(", ")", ")", "{", "aBindings", ".", "push", "(", "oBinding", ")", ";", "}", "return", "aBindings", ";", "}" ]
Fetches all bindings for a specified binding model @param {sap.ui.model.PropertyBinding} oBinding - Binding model to get paths from @param {sap.ui.model.odata.XX.ODataModel} oParentDefaultModel - Data model (XX = '', v2, v4...) @returns {Array} - Returns a flattened array of found bindings @private
[ "Fetches", "all", "bindings", "for", "a", "specified", "binding", "model" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js#L137-L163
3,759
SAP/openui5
src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js
flattenBindingsFromTemplate
function flattenBindingsFromTemplate(mBinding) { var aBindings = []; var aParts = mBinding.parts; // TODO: check if we need to filter bindings by modelName, relative indicator ("/") aParts.forEach(function (mPart) { aBindings.push({ parts: [mPart] }); }); return aBindings; }
javascript
function flattenBindingsFromTemplate(mBinding) { var aBindings = []; var aParts = mBinding.parts; // TODO: check if we need to filter bindings by modelName, relative indicator ("/") aParts.forEach(function (mPart) { aBindings.push({ parts: [mPart] }); }); return aBindings; }
[ "function", "flattenBindingsFromTemplate", "(", "mBinding", ")", "{", "var", "aBindings", "=", "[", "]", ";", "var", "aParts", "=", "mBinding", ".", "parts", ";", "// TODO: check if we need to filter bindings by modelName, relative indicator (\"/\")", "aParts", ".", "forEach", "(", "function", "(", "mPart", ")", "{", "aBindings", ".", "push", "(", "{", "parts", ":", "[", "mPart", "]", "}", ")", ";", "}", ")", ";", "return", "aBindings", ";", "}" ]
Fetches all bindings from template @param {object} mBinding - map of bindings from Control (mBindingsInfo) @returns {Array} - Returns a flattened array of found bindings @private
[ "Fetches", "all", "bindings", "from", "template" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js#L172-L184
3,760
SAP/openui5
src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js
getBindingsFromProperties
function getBindingsFromProperties(oElement, oParentDefaultModel) { var aPropertiesKeys = Object.keys(oElement.getMetadata().getAllProperties()); return aPropertiesKeys // filter properties which are not bound .filter(oElement.getBinding.bind(oElement)) .reduce(function (aBindings, sPropertyName) { return aBindings.concat( flattenBindings( oElement.getBinding(sPropertyName), oParentDefaultModel ) ); }, []); }
javascript
function getBindingsFromProperties(oElement, oParentDefaultModel) { var aPropertiesKeys = Object.keys(oElement.getMetadata().getAllProperties()); return aPropertiesKeys // filter properties which are not bound .filter(oElement.getBinding.bind(oElement)) .reduce(function (aBindings, sPropertyName) { return aBindings.concat( flattenBindings( oElement.getBinding(sPropertyName), oParentDefaultModel ) ); }, []); }
[ "function", "getBindingsFromProperties", "(", "oElement", ",", "oParentDefaultModel", ")", "{", "var", "aPropertiesKeys", "=", "Object", ".", "keys", "(", "oElement", ".", "getMetadata", "(", ")", ".", "getAllProperties", "(", ")", ")", ";", "return", "aPropertiesKeys", "// filter properties which are not bound", ".", "filter", "(", "oElement", ".", "getBinding", ".", "bind", "(", "oElement", ")", ")", ".", "reduce", "(", "function", "(", "aBindings", ",", "sPropertyName", ")", "{", "return", "aBindings", ".", "concat", "(", "flattenBindings", "(", "oElement", ".", "getBinding", "(", "sPropertyName", ")", ",", "oParentDefaultModel", ")", ")", ";", "}", ",", "[", "]", ")", ";", "}" ]
Retrieving all bindings from all available properties for a specified element @param {sap.ui.core.Control} oElement - element to get bindings from @param {sap.ui.model.Model} oParentDefaultModel - parent model to filter irrelevant bindings @return {Array} - returns found bindings @private
[ "Retrieving", "all", "bindings", "from", "all", "available", "properties", "for", "a", "specified", "element" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js#L196-L210
3,761
SAP/openui5
src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js
getBindingsFromTemplateProperties
function getBindingsFromTemplateProperties(oElement) { var aPropertiesKeys = Object.keys(oElement.getMetadata().getAllProperties()); return aPropertiesKeys .filter(function (sPropertyName) { return sPropertyName in oElement.mBindingInfos; }) .reduce(function (aBindings, sPropertyName) { return aBindings.concat( flattenBindingsFromTemplate( oElement.mBindingInfos[sPropertyName] ) ); }, []); }
javascript
function getBindingsFromTemplateProperties(oElement) { var aPropertiesKeys = Object.keys(oElement.getMetadata().getAllProperties()); return aPropertiesKeys .filter(function (sPropertyName) { return sPropertyName in oElement.mBindingInfos; }) .reduce(function (aBindings, sPropertyName) { return aBindings.concat( flattenBindingsFromTemplate( oElement.mBindingInfos[sPropertyName] ) ); }, []); }
[ "function", "getBindingsFromTemplateProperties", "(", "oElement", ")", "{", "var", "aPropertiesKeys", "=", "Object", ".", "keys", "(", "oElement", ".", "getMetadata", "(", ")", ".", "getAllProperties", "(", ")", ")", ";", "return", "aPropertiesKeys", ".", "filter", "(", "function", "(", "sPropertyName", ")", "{", "return", "sPropertyName", "in", "oElement", ".", "mBindingInfos", ";", "}", ")", ".", "reduce", "(", "function", "(", "aBindings", ",", "sPropertyName", ")", "{", "return", "aBindings", ".", "concat", "(", "flattenBindingsFromTemplate", "(", "oElement", ".", "mBindingInfos", "[", "sPropertyName", "]", ")", ")", ";", "}", ",", "[", "]", ")", ";", "}" ]
Retrieving all bindings from all available properties for a specified element of template @param {sap.ui.core.Control} oElement - element to get bindings from @return {Array} - returns found bindings @private
[ "Retrieving", "all", "bindings", "from", "all", "available", "properties", "for", "a", "specified", "element", "of", "template" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js#L219-L233
3,762
SAP/openui5
src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js
getBindingContextPath
function getBindingContextPath(oElement) { if (oElement.getBindingContext() && oElement.getBindingContext().getPath) { return oElement.getBindingContext().getPath(); } return undefined; }
javascript
function getBindingContextPath(oElement) { if (oElement.getBindingContext() && oElement.getBindingContext().getPath) { return oElement.getBindingContext().getPath(); } return undefined; }
[ "function", "getBindingContextPath", "(", "oElement", ")", "{", "if", "(", "oElement", ".", "getBindingContext", "(", ")", "&&", "oElement", ".", "getBindingContext", "(", ")", ".", "getPath", ")", "{", "return", "oElement", ".", "getBindingContext", "(", ")", ".", "getPath", "(", ")", ";", "}", "return", "undefined", ";", "}" ]
Retrieving context binding path from element @param {sap.ui.core.Control} oElement - element to get context binding paths from @return {boolean|string} - Returns the binding context path string from element. If not available <code>false</code> is returned. @private
[ "Retrieving", "context", "binding", "path", "from", "element" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js#L242-L247
3,763
SAP/openui5
src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/ReleaseNotes.controller.js
function (sVersionA, sVersionB) { var oVA = Version(sVersionA), oVB = Version(sVersionB); return (oVA.getMajor() + "." + oVA.getMinor()) === (oVB.getMajor() + "." + oVB.getMinor()); }
javascript
function (sVersionA, sVersionB) { var oVA = Version(sVersionA), oVB = Version(sVersionB); return (oVA.getMajor() + "." + oVA.getMinor()) === (oVB.getMajor() + "." + oVB.getMinor()); }
[ "function", "(", "sVersionA", ",", "sVersionB", ")", "{", "var", "oVA", "=", "Version", "(", "sVersionA", ")", ",", "oVB", "=", "Version", "(", "sVersionB", ")", ";", "return", "(", "oVA", ".", "getMajor", "(", ")", "+", "\".\"", "+", "oVA", ".", "getMinor", "(", ")", ")", "===", "(", "oVB", ".", "getMajor", "(", ")", "+", "\".\"", "+", "oVB", ".", "getMinor", "(", ")", ")", ";", "}" ]
Compares 2 UI5 version strings taking into account only major and minor version info @returns {boolean}
[ "Compares", "2", "UI5", "version", "strings", "taking", "into", "account", "only", "major", "and", "minor", "version", "info" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/ReleaseNotes.controller.js#L139-L144
3,764
SAP/openui5
src/sap.ui.core/src/sap/ui/core/dnd/DragAndDrop.js
addStyleClass
function addStyleClass(oElement, sStyleClass) { if (!oElement) { return; } if (oElement.addStyleClass) { oElement.addStyleClass(sStyleClass); } else { oElement.$().addClass(sStyleClass); } }
javascript
function addStyleClass(oElement, sStyleClass) { if (!oElement) { return; } if (oElement.addStyleClass) { oElement.addStyleClass(sStyleClass); } else { oElement.$().addClass(sStyleClass); } }
[ "function", "addStyleClass", "(", "oElement", ",", "sStyleClass", ")", "{", "if", "(", "!", "oElement", ")", "{", "return", ";", "}", "if", "(", "oElement", ".", "addStyleClass", ")", "{", "oElement", ".", "addStyleClass", "(", "sStyleClass", ")", ";", "}", "else", "{", "oElement", ".", "$", "(", ")", ".", "addClass", "(", "sStyleClass", ")", ";", "}", "}" ]
timestamp of drag enter
[ "timestamp", "of", "drag", "enter" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/dnd/DragAndDrop.js#L36-L46
3,765
SAP/openui5
src/sap.ui.dt/src/sap/ui/dt/enablement/report/Table.js
function(sFilter) { var oModel = this._getTable().getModel(); if (oModel) { if (sFilter.length > 0) { // As UI5 does not support filtering on first level, we have to do it on our own var aData = this.getData(); var aFilteredData = aData.children.filter(function(oEntry) { if (sFilter.indexOf("status=") != -1) { return oEntry.status.value == sFilter.substring(sFilter.indexOf("=") + 1); } else { return oEntry.name.toLowerCase().indexOf(sFilter.toLowerCase()) != -1; } }); oModel.setData(aFilteredData); } else { oModel.setData(this.getData()); } } }
javascript
function(sFilter) { var oModel = this._getTable().getModel(); if (oModel) { if (sFilter.length > 0) { // As UI5 does not support filtering on first level, we have to do it on our own var aData = this.getData(); var aFilteredData = aData.children.filter(function(oEntry) { if (sFilter.indexOf("status=") != -1) { return oEntry.status.value == sFilter.substring(sFilter.indexOf("=") + 1); } else { return oEntry.name.toLowerCase().indexOf(sFilter.toLowerCase()) != -1; } }); oModel.setData(aFilteredData); } else { oModel.setData(this.getData()); } } }
[ "function", "(", "sFilter", ")", "{", "var", "oModel", "=", "this", ".", "_getTable", "(", ")", ".", "getModel", "(", ")", ";", "if", "(", "oModel", ")", "{", "if", "(", "sFilter", ".", "length", ">", "0", ")", "{", "// As UI5 does not support filtering on first level, we have to do it on our own", "var", "aData", "=", "this", ".", "getData", "(", ")", ";", "var", "aFilteredData", "=", "aData", ".", "children", ".", "filter", "(", "function", "(", "oEntry", ")", "{", "if", "(", "sFilter", ".", "indexOf", "(", "\"status=\"", ")", "!=", "-", "1", ")", "{", "return", "oEntry", ".", "status", ".", "value", "==", "sFilter", ".", "substring", "(", "sFilter", ".", "indexOf", "(", "\"=\"", ")", "+", "1", ")", ";", "}", "else", "{", "return", "oEntry", ".", "name", ".", "toLowerCase", "(", ")", ".", "indexOf", "(", "sFilter", ".", "toLowerCase", "(", ")", ")", "!=", "-", "1", ";", "}", "}", ")", ";", "oModel", ".", "setData", "(", "aFilteredData", ")", ";", "}", "else", "{", "oModel", ".", "setData", "(", "this", ".", "getData", "(", ")", ")", ";", "}", "}", "}" ]
Filters the table. @param {sString} sFilter The filter string. @public
[ "Filters", "the", "table", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/enablement/report/Table.js#L124-L143
3,766
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/less.js
function(isRule) { var elements, e, index = i, option, extendList, extend; if (!(isRule ? $re(/^&:extend\(/) : $re(/^:extend\(/))) { return; } do { option = null; elements = null; while (! (option = $re(/^(all)(?=\s*(\)|,))/))) { e = this.element(); if (!e) { break; } if (elements) { elements.push(e); } else { elements = [ e ]; } } option = option && option[1]; extend = new(tree.Extend)(new(tree.Selector)(elements), option, index); if (extendList) { extendList.push(extend); } else { extendList = [ extend ]; } } while($char(",")); expect(/^\)/); if (isRule) { expect(/^;/); } return extendList; }
javascript
function(isRule) { var elements, e, index = i, option, extendList, extend; if (!(isRule ? $re(/^&:extend\(/) : $re(/^:extend\(/))) { return; } do { option = null; elements = null; while (! (option = $re(/^(all)(?=\s*(\)|,))/))) { e = this.element(); if (!e) { break; } if (elements) { elements.push(e); } else { elements = [ e ]; } } option = option && option[1]; extend = new(tree.Extend)(new(tree.Selector)(elements), option, index); if (extendList) { extendList.push(extend); } else { extendList = [ extend ]; } } while($char(",")); expect(/^\)/); if (isRule) { expect(/^;/); } return extendList; }
[ "function", "(", "isRule", ")", "{", "var", "elements", ",", "e", ",", "index", "=", "i", ",", "option", ",", "extendList", ",", "extend", ";", "if", "(", "!", "(", "isRule", "?", "$re", "(", "/", "^&:extend\\(", "/", ")", ":", "$re", "(", "/", "^:extend\\(", "/", ")", ")", ")", "{", "return", ";", "}", "do", "{", "option", "=", "null", ";", "elements", "=", "null", ";", "while", "(", "!", "(", "option", "=", "$re", "(", "/", "^(all)(?=\\s*(\\)|,))", "/", ")", ")", ")", "{", "e", "=", "this", ".", "element", "(", ")", ";", "if", "(", "!", "e", ")", "{", "break", ";", "}", "if", "(", "elements", ")", "{", "elements", ".", "push", "(", "e", ")", ";", "}", "else", "{", "elements", "=", "[", "e", "]", ";", "}", "}", "option", "=", "option", "&&", "option", "[", "1", "]", ";", "extend", "=", "new", "(", "tree", ".", "Extend", ")", "(", "new", "(", "tree", ".", "Selector", ")", "(", "elements", ")", ",", "option", ",", "index", ")", ";", "if", "(", "extendList", ")", "{", "extendList", ".", "push", "(", "extend", ")", ";", "}", "else", "{", "extendList", "=", "[", "extend", "]", ";", "}", "}", "while", "(", "$char", "(", "\",\"", ")", ")", ";", "expect", "(", "/", "^\\)", "/", ")", ";", "if", "(", "isRule", ")", "{", "expect", "(", "/", "^;", "/", ")", ";", "}", "return", "extendList", ";", "}" ]
extend syntax - used to extend selectors
[ "extend", "syntax", "-", "used", "to", "extend", "selectors" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/less.js#L1060-L1088
3,767
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/less.js
function () { var entities = [], e, delim; do { e = this.addition() || this.entity(); if (e) { entities.push(e); // operations do not allow keyword "/" dimension (e.g. small/20px) so we support that here if (!peek(/^\/[\/*]/)) { delim = $char('/'); if (delim) { entities.push(new(tree.Anonymous)(delim)); } } } } while (e); if (entities.length > 0) { return new(tree.Expression)(entities); } }
javascript
function () { var entities = [], e, delim; do { e = this.addition() || this.entity(); if (e) { entities.push(e); // operations do not allow keyword "/" dimension (e.g. small/20px) so we support that here if (!peek(/^\/[\/*]/)) { delim = $char('/'); if (delim) { entities.push(new(tree.Anonymous)(delim)); } } } } while (e); if (entities.length > 0) { return new(tree.Expression)(entities); } }
[ "function", "(", ")", "{", "var", "entities", "=", "[", "]", ",", "e", ",", "delim", ";", "do", "{", "e", "=", "this", ".", "addition", "(", ")", "||", "this", ".", "entity", "(", ")", ";", "if", "(", "e", ")", "{", "entities", ".", "push", "(", "e", ")", ";", "// operations do not allow keyword \"/\" dimension (e.g. small/20px) so we support that here", "if", "(", "!", "peek", "(", "/", "^\\/[\\/*]", "/", ")", ")", "{", "delim", "=", "$char", "(", "'/'", ")", ";", "if", "(", "delim", ")", "{", "entities", ".", "push", "(", "new", "(", "tree", ".", "Anonymous", ")", "(", "delim", ")", ")", ";", "}", "}", "}", "}", "while", "(", "e", ")", ";", "if", "(", "entities", ".", "length", ">", "0", ")", "{", "return", "new", "(", "tree", ".", "Expression", ")", "(", "entities", ")", ";", "}", "}" ]
Expressions either represent mathematical operations, or white-space delimited Entities. 1px solid black @var * 2
[ "Expressions", "either", "represent", "mathematical", "operations", "or", "white", "-", "space", "delimited", "Entities", ".", "1px", "solid", "black" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/less.js#L1933-L1952
3,768
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/less.js
function (env, op, other) { /*jshint noempty:false */ var value = tree.operate(env, op, this.value, other.value), unit = this.unit.clone(); if (op === '+' || op === '-') { if (unit.numerator.length === 0 && unit.denominator.length === 0) { unit.numerator = other.unit.numerator.slice(0); unit.denominator = other.unit.denominator.slice(0); } else if (other.unit.numerator.length === 0 && unit.denominator.length === 0) { // do nothing } else { other = other.convertTo(this.unit.usedUnits()); if(env.strictUnits && other.unit.toString() !== unit.toString()) { throw new Error("Incompatible units. Change the units or use the unit function. Bad units: '" + unit.toString() + "' and '" + other.unit.toString() + "'."); } value = tree.operate(env, op, this.value, other.value); } } else if (op === '*') { unit.numerator = unit.numerator.concat(other.unit.numerator).sort(); unit.denominator = unit.denominator.concat(other.unit.denominator).sort(); unit.cancel(); } else if (op === '/') { unit.numerator = unit.numerator.concat(other.unit.denominator).sort(); unit.denominator = unit.denominator.concat(other.unit.numerator).sort(); unit.cancel(); } return new(tree.Dimension)(value, unit); }
javascript
function (env, op, other) { /*jshint noempty:false */ var value = tree.operate(env, op, this.value, other.value), unit = this.unit.clone(); if (op === '+' || op === '-') { if (unit.numerator.length === 0 && unit.denominator.length === 0) { unit.numerator = other.unit.numerator.slice(0); unit.denominator = other.unit.denominator.slice(0); } else if (other.unit.numerator.length === 0 && unit.denominator.length === 0) { // do nothing } else { other = other.convertTo(this.unit.usedUnits()); if(env.strictUnits && other.unit.toString() !== unit.toString()) { throw new Error("Incompatible units. Change the units or use the unit function. Bad units: '" + unit.toString() + "' and '" + other.unit.toString() + "'."); } value = tree.operate(env, op, this.value, other.value); } } else if (op === '*') { unit.numerator = unit.numerator.concat(other.unit.numerator).sort(); unit.denominator = unit.denominator.concat(other.unit.denominator).sort(); unit.cancel(); } else if (op === '/') { unit.numerator = unit.numerator.concat(other.unit.denominator).sort(); unit.denominator = unit.denominator.concat(other.unit.numerator).sort(); unit.cancel(); } return new(tree.Dimension)(value, unit); }
[ "function", "(", "env", ",", "op", ",", "other", ")", "{", "/*jshint noempty:false */", "var", "value", "=", "tree", ".", "operate", "(", "env", ",", "op", ",", "this", ".", "value", ",", "other", ".", "value", ")", ",", "unit", "=", "this", ".", "unit", ".", "clone", "(", ")", ";", "if", "(", "op", "===", "'+'", "||", "op", "===", "'-'", ")", "{", "if", "(", "unit", ".", "numerator", ".", "length", "===", "0", "&&", "unit", ".", "denominator", ".", "length", "===", "0", ")", "{", "unit", ".", "numerator", "=", "other", ".", "unit", ".", "numerator", ".", "slice", "(", "0", ")", ";", "unit", ".", "denominator", "=", "other", ".", "unit", ".", "denominator", ".", "slice", "(", "0", ")", ";", "}", "else", "if", "(", "other", ".", "unit", ".", "numerator", ".", "length", "===", "0", "&&", "unit", ".", "denominator", ".", "length", "===", "0", ")", "{", "// do nothing", "}", "else", "{", "other", "=", "other", ".", "convertTo", "(", "this", ".", "unit", ".", "usedUnits", "(", ")", ")", ";", "if", "(", "env", ".", "strictUnits", "&&", "other", ".", "unit", ".", "toString", "(", ")", "!==", "unit", ".", "toString", "(", ")", ")", "{", "throw", "new", "Error", "(", "\"Incompatible units. Change the units or use the unit function. Bad units: '\"", "+", "unit", ".", "toString", "(", ")", "+", "\"' and '\"", "+", "other", ".", "unit", ".", "toString", "(", ")", "+", "\"'.\"", ")", ";", "}", "value", "=", "tree", ".", "operate", "(", "env", ",", "op", ",", "this", ".", "value", ",", "other", ".", "value", ")", ";", "}", "}", "else", "if", "(", "op", "===", "'*'", ")", "{", "unit", ".", "numerator", "=", "unit", ".", "numerator", ".", "concat", "(", "other", ".", "unit", ".", "numerator", ")", ".", "sort", "(", ")", ";", "unit", ".", "denominator", "=", "unit", ".", "denominator", ".", "concat", "(", "other", ".", "unit", ".", "denominator", ")", ".", "sort", "(", ")", ";", "unit", ".", "cancel", "(", ")", ";", "}", "else", "if", "(", "op", "===", "'/'", ")", "{", "unit", ".", "numerator", "=", "unit", ".", "numerator", ".", "concat", "(", "other", ".", "unit", ".", "denominator", ")", ".", "sort", "(", ")", ";", "unit", ".", "denominator", "=", "unit", ".", "denominator", ".", "concat", "(", "other", ".", "unit", ".", "numerator", ")", ".", "sort", "(", ")", ";", "unit", ".", "cancel", "(", ")", ";", "}", "return", "new", "(", "tree", ".", "Dimension", ")", "(", "value", ",", "unit", ")", ";", "}" ]
In an operation between two Dimensions, we default to the first Dimension's unit, so `1px + 2` will yield `3px`.
[ "In", "an", "operation", "between", "two", "Dimensions", "we", "default", "to", "the", "first", "Dimension", "s", "unit", "so", "1px", "+", "2", "will", "yield", "3px", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/less.js#L3480-L3511
3,769
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/less.js
function (args, env) { var lastSelector = this.selectors[this.selectors.length-1]; if (!lastSelector.evaldCondition) { return false; } if (lastSelector.condition && !lastSelector.condition.eval( new(tree.evalEnv)(env, env.frames))) { return false; } return true; }
javascript
function (args, env) { var lastSelector = this.selectors[this.selectors.length-1]; if (!lastSelector.evaldCondition) { return false; } if (lastSelector.condition && !lastSelector.condition.eval( new(tree.evalEnv)(env, env.frames))) { return false; } return true; }
[ "function", "(", "args", ",", "env", ")", "{", "var", "lastSelector", "=", "this", ".", "selectors", "[", "this", ".", "selectors", ".", "length", "-", "1", "]", ";", "if", "(", "!", "lastSelector", ".", "evaldCondition", ")", "{", "return", "false", ";", "}", "if", "(", "lastSelector", ".", "condition", "&&", "!", "lastSelector", ".", "condition", ".", "eval", "(", "new", "(", "tree", ".", "evalEnv", ")", "(", "env", ",", "env", ".", "frames", ")", ")", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}" ]
lets you call a css selector with a guard
[ "lets", "you", "call", "a", "css", "selector", "with", "a", "guard" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/less.js#L5089-L5101
3,770
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/type/Time.js
getErrorMessage
function getErrorMessage(oType) { return sap.ui.getCore().getLibraryResourceBundle().getText("EnterTime", [oType.formatValue(oDemoTime, "string")]); }
javascript
function getErrorMessage(oType) { return sap.ui.getCore().getLibraryResourceBundle().getText("EnterTime", [oType.formatValue(oDemoTime, "string")]); }
[ "function", "getErrorMessage", "(", "oType", ")", "{", "return", "sap", ".", "ui", ".", "getCore", "(", ")", ".", "getLibraryResourceBundle", "(", ")", ".", "getText", "(", "\"EnterTime\"", ",", "[", "oType", ".", "formatValue", "(", "oDemoTime", ",", "\"string\"", ")", "]", ")", ";", "}" ]
Returns the locale-dependent error message. @param {sap.ui.model.odata.type.Time} oType the type @returns {string} the locale-dependent error message @private
[ "Returns", "the", "locale", "-", "dependent", "error", "message", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/type/Time.js#L36-L39
3,771
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/type/Time.js
toDate
function toDate(oTime) { if (!isTime(oTime)) { throw new FormatException("Illegal sap.ui.model.odata.type.Time value: " + toString(oTime)); } return new Date(oTime.ms); }
javascript
function toDate(oTime) { if (!isTime(oTime)) { throw new FormatException("Illegal sap.ui.model.odata.type.Time value: " + toString(oTime)); } return new Date(oTime.ms); }
[ "function", "toDate", "(", "oTime", ")", "{", "if", "(", "!", "isTime", "(", "oTime", ")", ")", "{", "throw", "new", "FormatException", "(", "\"Illegal sap.ui.model.odata.type.Time value: \"", "+", "toString", "(", "oTime", ")", ")", ";", "}", "return", "new", "Date", "(", "oTime", ".", "ms", ")", ";", "}" ]
Converts the given time object to a Date. @param {object} oTime the <code>Time</code> object @returns {Date} a Date with hour, minute, second and milliseconds set according to the time object. @throws FormatException if the time object's format does not match
[ "Converts", "the", "given", "time", "object", "to", "a", "Date", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/type/Time.js#L100-L106
3,772
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/type/Time.js
toModel
function toModel(oDate) { return { __edmType : "Edm.Time", ms : ((oDate.getUTCHours() * 60 + oDate.getUTCMinutes()) * 60 + oDate.getUTCSeconds()) * 1000 + oDate.getUTCMilliseconds() }; }
javascript
function toModel(oDate) { return { __edmType : "Edm.Time", ms : ((oDate.getUTCHours() * 60 + oDate.getUTCMinutes()) * 60 + oDate.getUTCSeconds()) * 1000 + oDate.getUTCMilliseconds() }; }
[ "function", "toModel", "(", "oDate", ")", "{", "return", "{", "__edmType", ":", "\"Edm.Time\"", ",", "ms", ":", "(", "(", "oDate", ".", "getUTCHours", "(", ")", "*", "60", "+", "oDate", ".", "getUTCMinutes", "(", ")", ")", "*", "60", "+", "oDate", ".", "getUTCSeconds", "(", ")", ")", "*", "1000", "+", "oDate", ".", "getUTCMilliseconds", "(", ")", "}", ";", "}" ]
Converts the given Date to a time object. @param {Date} oDate the date (day, month and year are ignored) @returns {object} a time object with __edmType and ms
[ "Converts", "the", "given", "Date", "to", "a", "time", "object", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/type/Time.js#L115-L121
3,773
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function() { this._oDialog.close(); this._oDialog.destroy(); this._oDialog = null; if (this._oAssistantPopover) { this._oAssistantPopover.destroy(); this._oAssistantPopover = null; } if (this._oDebugPopover) { this._oDebugPopover.destroy(); this._oDebugPopover = null; } }
javascript
function() { this._oDialog.close(); this._oDialog.destroy(); this._oDialog = null; if (this._oAssistantPopover) { this._oAssistantPopover.destroy(); this._oAssistantPopover = null; } if (this._oDebugPopover) { this._oDebugPopover.destroy(); this._oDebugPopover = null; } }
[ "function", "(", ")", "{", "this", ".", "_oDialog", ".", "close", "(", ")", ";", "this", ".", "_oDialog", ".", "destroy", "(", ")", ";", "this", ".", "_oDialog", "=", "null", ";", "if", "(", "this", ".", "_oAssistantPopover", ")", "{", "this", ".", "_oAssistantPopover", ".", "destroy", "(", ")", ";", "this", ".", "_oAssistantPopover", "=", "null", ";", "}", "if", "(", "this", ".", "_oDebugPopover", ")", "{", "this", ".", "_oDebugPopover", ".", "destroy", "(", ")", ";", "this", ".", "_oDebugPopover", "=", "null", ";", "}", "}" ]
Closes the technical information dialog
[ "Closes", "the", "technical", "information", "dialog" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L90-L104
3,774
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { var oModel = this._oDialog.getModel("view"), oTree = oModel.getProperty("/DebugModules")[0], sString = "sap-ui-debug=" + this._treeHelper.toDebugInfo(oTree); this._copyToClipboard(sString, "TechInfo.DebugModulesCopyToClipboard"); }
javascript
function () { var oModel = this._oDialog.getModel("view"), oTree = oModel.getProperty("/DebugModules")[0], sString = "sap-ui-debug=" + this._treeHelper.toDebugInfo(oTree); this._copyToClipboard(sString, "TechInfo.DebugModulesCopyToClipboard"); }
[ "function", "(", ")", "{", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "oTree", "=", "oModel", ".", "getProperty", "(", "\"/DebugModules\"", ")", "[", "0", "]", ",", "sString", "=", "\"sap-ui-debug=\"", "+", "this", ".", "_treeHelper", ".", "toDebugInfo", "(", "oTree", ")", ";", "this", ".", "_copyToClipboard", "(", "sString", ",", "\"TechInfo.DebugModulesCopyToClipboard\"", ")", ";", "}" ]
Copies the custom sap-ui-debug value to the clipboard
[ "Copies", "the", "custom", "sap", "-", "ui", "-", "debug", "value", "to", "the", "clipboard" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L146-L152
3,775
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { var oModel = this._oDialog.getModel("view"), oTreeResults; // early out if already open if (this._oDebugPopover && this._oDebugPopover.isOpen()) { return; } // fill and bind the tree structure from the currently loaded modules oTreeResults = this._treeHelper.toTreeModel(this._oModuleSystemInfo); oModel.setProperty("/DebugModules", [oTreeResults.tree]); this._updateTreeInfos(); // create dialog lazily if (!this._oDebugPopover) { this._oDebugPopover = sap.ui.xmlfragment(this._DEBUG_MODULES_ID, "sap.ui.core.support.techinfo.TechnicalInfoDebugDialog", this); this._oDialog.addDependent(this._oDebugPopover); syncStyleClass(this._getContentDensityClass(), this._oDialog, this._oDebugPopover); var oControl = this._getControl("customDebugValue", this._DEBUG_MODULES_ID); try { this._validateCustomDebugValue(oControl.getValue()); } catch (oException) { this._showError(oControl, oException.message); return; } } // adopt tree depth to the deepest currently selected module this._getControl("tree", this._DEBUG_MODULES_ID).expandToLevel(Math.max(this._MIN_EXPAND_LEVEL_DEBUG_MODULES, oTreeResults.depth)); // open dialog this._oDebugPopover.open(); }
javascript
function () { var oModel = this._oDialog.getModel("view"), oTreeResults; // early out if already open if (this._oDebugPopover && this._oDebugPopover.isOpen()) { return; } // fill and bind the tree structure from the currently loaded modules oTreeResults = this._treeHelper.toTreeModel(this._oModuleSystemInfo); oModel.setProperty("/DebugModules", [oTreeResults.tree]); this._updateTreeInfos(); // create dialog lazily if (!this._oDebugPopover) { this._oDebugPopover = sap.ui.xmlfragment(this._DEBUG_MODULES_ID, "sap.ui.core.support.techinfo.TechnicalInfoDebugDialog", this); this._oDialog.addDependent(this._oDebugPopover); syncStyleClass(this._getContentDensityClass(), this._oDialog, this._oDebugPopover); var oControl = this._getControl("customDebugValue", this._DEBUG_MODULES_ID); try { this._validateCustomDebugValue(oControl.getValue()); } catch (oException) { this._showError(oControl, oException.message); return; } } // adopt tree depth to the deepest currently selected module this._getControl("tree", this._DEBUG_MODULES_ID).expandToLevel(Math.max(this._MIN_EXPAND_LEVEL_DEBUG_MODULES, oTreeResults.depth)); // open dialog this._oDebugPopover.open(); }
[ "function", "(", ")", "{", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "oTreeResults", ";", "// early out if already open", "if", "(", "this", ".", "_oDebugPopover", "&&", "this", ".", "_oDebugPopover", ".", "isOpen", "(", ")", ")", "{", "return", ";", "}", "// fill and bind the tree structure from the currently loaded modules", "oTreeResults", "=", "this", ".", "_treeHelper", ".", "toTreeModel", "(", "this", ".", "_oModuleSystemInfo", ")", ";", "oModel", ".", "setProperty", "(", "\"/DebugModules\"", ",", "[", "oTreeResults", ".", "tree", "]", ")", ";", "this", ".", "_updateTreeInfos", "(", ")", ";", "// create dialog lazily", "if", "(", "!", "this", ".", "_oDebugPopover", ")", "{", "this", ".", "_oDebugPopover", "=", "sap", ".", "ui", ".", "xmlfragment", "(", "this", ".", "_DEBUG_MODULES_ID", ",", "\"sap.ui.core.support.techinfo.TechnicalInfoDebugDialog\"", ",", "this", ")", ";", "this", ".", "_oDialog", ".", "addDependent", "(", "this", ".", "_oDebugPopover", ")", ";", "syncStyleClass", "(", "this", ".", "_getContentDensityClass", "(", ")", ",", "this", ".", "_oDialog", ",", "this", ".", "_oDebugPopover", ")", ";", "var", "oControl", "=", "this", ".", "_getControl", "(", "\"customDebugValue\"", ",", "this", ".", "_DEBUG_MODULES_ID", ")", ";", "try", "{", "this", ".", "_validateCustomDebugValue", "(", "oControl", ".", "getValue", "(", ")", ")", ";", "}", "catch", "(", "oException", ")", "{", "this", ".", "_showError", "(", "oControl", ",", "oException", ".", "message", ")", ";", "return", ";", "}", "}", "// adopt tree depth to the deepest currently selected module", "this", ".", "_getControl", "(", "\"tree\"", ",", "this", ".", "_DEBUG_MODULES_ID", ")", ".", "expandToLevel", "(", "Math", ".", "max", "(", "this", ".", "_MIN_EXPAND_LEVEL_DEBUG_MODULES", ",", "oTreeResults", ".", "depth", ")", ")", ";", "// open dialog", "this", ".", "_oDebugPopover", ".", "open", "(", ")", ";", "}" ]
Opens a dialog with debug package selection options
[ "Opens", "a", "dialog", "with", "debug", "package", "selection", "options" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L171-L204
3,776
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { var oModel = this._oDialog.getModel("view"), oControl = this._getControl("customDebugValue", this._DEBUG_MODULES_ID), oTreeResults; try { this._validateCustomDebugValue(oControl.getValue()); } catch (oException) { this._showError(oControl, oException.message); return; } // convert boolean string to boolean value if (oModel.getProperty("/CustomDebugMode") === "true") { oModel.setProperty("/CustomDebugMode", true); } if (oModel.getProperty("/CustomDebugMode") === "false") { oModel.setProperty("/CustomDebugMode", false); } // set validated value and update tree accordingly window["sap-ui-debug"] = oModel.getProperty("/CustomDebugMode"); oTreeResults = this._treeHelper.toTreeModel(this._oModuleSystemInfo); oModel.setProperty("/DebugModules", [oTreeResults.tree]); // adopt tree depth to the deepest currently selected module this._getControl("tree", this._DEBUG_MODULES_ID).expandToLevel(Math.max(this._MIN_EXPAND_LEVEL_DEBUG_MODULES, oTreeResults.depth)); this._updateTreeInfos(); }
javascript
function () { var oModel = this._oDialog.getModel("view"), oControl = this._getControl("customDebugValue", this._DEBUG_MODULES_ID), oTreeResults; try { this._validateCustomDebugValue(oControl.getValue()); } catch (oException) { this._showError(oControl, oException.message); return; } // convert boolean string to boolean value if (oModel.getProperty("/CustomDebugMode") === "true") { oModel.setProperty("/CustomDebugMode", true); } if (oModel.getProperty("/CustomDebugMode") === "false") { oModel.setProperty("/CustomDebugMode", false); } // set validated value and update tree accordingly window["sap-ui-debug"] = oModel.getProperty("/CustomDebugMode"); oTreeResults = this._treeHelper.toTreeModel(this._oModuleSystemInfo); oModel.setProperty("/DebugModules", [oTreeResults.tree]); // adopt tree depth to the deepest currently selected module this._getControl("tree", this._DEBUG_MODULES_ID).expandToLevel(Math.max(this._MIN_EXPAND_LEVEL_DEBUG_MODULES, oTreeResults.depth)); this._updateTreeInfos(); }
[ "function", "(", ")", "{", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "oControl", "=", "this", ".", "_getControl", "(", "\"customDebugValue\"", ",", "this", ".", "_DEBUG_MODULES_ID", ")", ",", "oTreeResults", ";", "try", "{", "this", ".", "_validateCustomDebugValue", "(", "oControl", ".", "getValue", "(", ")", ")", ";", "}", "catch", "(", "oException", ")", "{", "this", ".", "_showError", "(", "oControl", ",", "oException", ".", "message", ")", ";", "return", ";", "}", "// convert boolean string to boolean value", "if", "(", "oModel", ".", "getProperty", "(", "\"/CustomDebugMode\"", ")", "===", "\"true\"", ")", "{", "oModel", ".", "setProperty", "(", "\"/CustomDebugMode\"", ",", "true", ")", ";", "}", "if", "(", "oModel", ".", "getProperty", "(", "\"/CustomDebugMode\"", ")", "===", "\"false\"", ")", "{", "oModel", ".", "setProperty", "(", "\"/CustomDebugMode\"", ",", "false", ")", ";", "}", "// set validated value and update tree accordingly", "window", "[", "\"sap-ui-debug\"", "]", "=", "oModel", ".", "getProperty", "(", "\"/CustomDebugMode\"", ")", ";", "oTreeResults", "=", "this", ".", "_treeHelper", ".", "toTreeModel", "(", "this", ".", "_oModuleSystemInfo", ")", ";", "oModel", ".", "setProperty", "(", "\"/DebugModules\"", ",", "[", "oTreeResults", ".", "tree", "]", ")", ";", "// adopt tree depth to the deepest currently selected module", "this", ".", "_getControl", "(", "\"tree\"", ",", "this", ".", "_DEBUG_MODULES_ID", ")", ".", "expandToLevel", "(", "Math", ".", "max", "(", "this", ".", "_MIN_EXPAND_LEVEL_DEBUG_MODULES", ",", "oTreeResults", ".", "depth", ")", ")", ";", "this", ".", "_updateTreeInfos", "(", ")", ";", "}" ]
Sets the validated value from the input field and re-evaluates the module tree according to the input
[ "Sets", "the", "validated", "value", "from", "the", "input", "field", "and", "re", "-", "evaluates", "the", "module", "tree", "according", "to", "the", "input" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L245-L274
3,777
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { var oModel = this._oDialog.getModel("view"), oTreeData = oModel.getProperty("/DebugModules")[0]; this._treeHelper.recursiveSelect(oTreeData, false); this._updateTreeInfos(); }
javascript
function () { var oModel = this._oDialog.getModel("view"), oTreeData = oModel.getProperty("/DebugModules")[0]; this._treeHelper.recursiveSelect(oTreeData, false); this._updateTreeInfos(); }
[ "function", "(", ")", "{", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "oTreeData", "=", "oModel", ".", "getProperty", "(", "\"/DebugModules\"", ")", "[", "0", "]", ";", "this", ".", "_treeHelper", ".", "recursiveSelect", "(", "oTreeData", ",", "false", ")", ";", "this", ".", "_updateTreeInfos", "(", ")", ";", "}" ]
Resets the debug module tree
[ "Resets", "the", "debug", "module", "tree" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L279-L285
3,778
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { var oSupport = Support.getStub(); if (oSupport.getType() != Support.StubType.APPLICATION) { return; } oSupport.openSupportTool(); this.close(); }
javascript
function () { var oSupport = Support.getStub(); if (oSupport.getType() != Support.StubType.APPLICATION) { return; } oSupport.openSupportTool(); this.close(); }
[ "function", "(", ")", "{", "var", "oSupport", "=", "Support", ".", "getStub", "(", ")", ";", "if", "(", "oSupport", ".", "getType", "(", ")", "!=", "Support", ".", "StubType", ".", "APPLICATION", ")", "{", "return", ";", "}", "oSupport", ".", "openSupportTool", "(", ")", ";", "this", ".", "close", "(", ")", ";", "}" ]
Opens the diagnostics window
[ "Opens", "the", "diagnostics", "window" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L290-L297
3,779
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { var oModel = this._oDialog.getModel("view"), sSelectedLocation = oModel.getProperty("/SelectedLocation"), sStandardUrl = oModel.getProperty("/StandardBootstrapURL"), sCustomUrl = oModel.getProperty("/CustomBootstrapURL"), aSupportedUrls = [], sBootstrapURL; oModel.getProperty("/SupportAssistantPopoverURLs").forEach(function (element) { aSupportedUrls.push(element.Value); }); if (aSupportedUrls.indexOf(sStandardUrl) === -1 && sSelectedLocation === "standard") { sSelectedLocation = "custom"; sCustomUrl = sStandardUrl; oModel.setProperty("/SelectedLocation", sSelectedLocation); this._storage.put(this._LOCAL_STORAGE_KEYS.STANDARD_URL, aSupportedUrls[0]); oModel.setProperty("/StandardBootstrapURL", this._storage.get(this._LOCAL_STORAGE_KEYS.STANDARD_URL)); } if (sSelectedLocation === "standard") { sBootstrapURL = sStandardUrl; } else if (sCustomUrl) { // this checks if selected location is custom and CustomBootstrapURL is filed if (!sCustomUrl.match(/\/$/)) { // checks if custom URL is missing / at the end and adds it if missing sCustomUrl += "/"; } this._storage.put(this._LOCAL_STORAGE_KEYS.CUSTOM_URL, sCustomUrl); oModel.setProperty("/CustomBootstrapURL", this._storage.get(this._LOCAL_STORAGE_KEYS.CUSTOM_URL)); sBootstrapURL = sCustomUrl; } this._startAssistant(sBootstrapURL); }
javascript
function () { var oModel = this._oDialog.getModel("view"), sSelectedLocation = oModel.getProperty("/SelectedLocation"), sStandardUrl = oModel.getProperty("/StandardBootstrapURL"), sCustomUrl = oModel.getProperty("/CustomBootstrapURL"), aSupportedUrls = [], sBootstrapURL; oModel.getProperty("/SupportAssistantPopoverURLs").forEach(function (element) { aSupportedUrls.push(element.Value); }); if (aSupportedUrls.indexOf(sStandardUrl) === -1 && sSelectedLocation === "standard") { sSelectedLocation = "custom"; sCustomUrl = sStandardUrl; oModel.setProperty("/SelectedLocation", sSelectedLocation); this._storage.put(this._LOCAL_STORAGE_KEYS.STANDARD_URL, aSupportedUrls[0]); oModel.setProperty("/StandardBootstrapURL", this._storage.get(this._LOCAL_STORAGE_KEYS.STANDARD_URL)); } if (sSelectedLocation === "standard") { sBootstrapURL = sStandardUrl; } else if (sCustomUrl) { // this checks if selected location is custom and CustomBootstrapURL is filed if (!sCustomUrl.match(/\/$/)) { // checks if custom URL is missing / at the end and adds it if missing sCustomUrl += "/"; } this._storage.put(this._LOCAL_STORAGE_KEYS.CUSTOM_URL, sCustomUrl); oModel.setProperty("/CustomBootstrapURL", this._storage.get(this._LOCAL_STORAGE_KEYS.CUSTOM_URL)); sBootstrapURL = sCustomUrl; } this._startAssistant(sBootstrapURL); }
[ "function", "(", ")", "{", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "sSelectedLocation", "=", "oModel", ".", "getProperty", "(", "\"/SelectedLocation\"", ")", ",", "sStandardUrl", "=", "oModel", ".", "getProperty", "(", "\"/StandardBootstrapURL\"", ")", ",", "sCustomUrl", "=", "oModel", ".", "getProperty", "(", "\"/CustomBootstrapURL\"", ")", ",", "aSupportedUrls", "=", "[", "]", ",", "sBootstrapURL", ";", "oModel", ".", "getProperty", "(", "\"/SupportAssistantPopoverURLs\"", ")", ".", "forEach", "(", "function", "(", "element", ")", "{", "aSupportedUrls", ".", "push", "(", "element", ".", "Value", ")", ";", "}", ")", ";", "if", "(", "aSupportedUrls", ".", "indexOf", "(", "sStandardUrl", ")", "===", "-", "1", "&&", "sSelectedLocation", "===", "\"standard\"", ")", "{", "sSelectedLocation", "=", "\"custom\"", ";", "sCustomUrl", "=", "sStandardUrl", ";", "oModel", ".", "setProperty", "(", "\"/SelectedLocation\"", ",", "sSelectedLocation", ")", ";", "this", ".", "_storage", ".", "put", "(", "this", ".", "_LOCAL_STORAGE_KEYS", ".", "STANDARD_URL", ",", "aSupportedUrls", "[", "0", "]", ")", ";", "oModel", ".", "setProperty", "(", "\"/StandardBootstrapURL\"", ",", "this", ".", "_storage", ".", "get", "(", "this", ".", "_LOCAL_STORAGE_KEYS", ".", "STANDARD_URL", ")", ")", ";", "}", "if", "(", "sSelectedLocation", "===", "\"standard\"", ")", "{", "sBootstrapURL", "=", "sStandardUrl", ";", "}", "else", "if", "(", "sCustomUrl", ")", "{", "// this checks if selected location is custom and CustomBootstrapURL is filed", "if", "(", "!", "sCustomUrl", ".", "match", "(", "/", "\\/$", "/", ")", ")", "{", "// checks if custom URL is missing / at the end and adds it if missing", "sCustomUrl", "+=", "\"/\"", ";", "}", "this", ".", "_storage", ".", "put", "(", "this", ".", "_LOCAL_STORAGE_KEYS", ".", "CUSTOM_URL", ",", "sCustomUrl", ")", ";", "oModel", ".", "setProperty", "(", "\"/CustomBootstrapURL\"", ",", "this", ".", "_storage", ".", "get", "(", "this", ".", "_LOCAL_STORAGE_KEYS", ".", "CUSTOM_URL", ")", ")", ";", "sBootstrapURL", "=", "sCustomUrl", ";", "}", "this", ".", "_startAssistant", "(", "sBootstrapURL", ")", ";", "}" ]
Opens the support assistant with the given configuration
[ "Opens", "the", "support", "assistant", "with", "the", "given", "configuration" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L302-L335
3,780
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function (oEvent) { var sValue = oEvent.getParameter("selectedItem").getKey(), oControl = oEvent.getSource(); this._storage.put(this._LOCAL_STORAGE_KEYS.STANDARD_URL, sValue); this._resetValueState(oControl); this._pingUrl(sValue, oControl) .then(function success() { oControl.setValueState("Success"); }, function error() { var sMessage = this._getText("TechInfo.SupportAssistantConfigPopup.NotAvailableAtTheMoment"); this._showError(oControl, sMessage); Log.error("Support Assistant could not be loaded from the URL you entered"); }); }
javascript
function (oEvent) { var sValue = oEvent.getParameter("selectedItem").getKey(), oControl = oEvent.getSource(); this._storage.put(this._LOCAL_STORAGE_KEYS.STANDARD_URL, sValue); this._resetValueState(oControl); this._pingUrl(sValue, oControl) .then(function success() { oControl.setValueState("Success"); }, function error() { var sMessage = this._getText("TechInfo.SupportAssistantConfigPopup.NotAvailableAtTheMoment"); this._showError(oControl, sMessage); Log.error("Support Assistant could not be loaded from the URL you entered"); }); }
[ "function", "(", "oEvent", ")", "{", "var", "sValue", "=", "oEvent", ".", "getParameter", "(", "\"selectedItem\"", ")", ".", "getKey", "(", ")", ",", "oControl", "=", "oEvent", ".", "getSource", "(", ")", ";", "this", ".", "_storage", ".", "put", "(", "this", ".", "_LOCAL_STORAGE_KEYS", ".", "STANDARD_URL", ",", "sValue", ")", ";", "this", ".", "_resetValueState", "(", "oControl", ")", ";", "this", ".", "_pingUrl", "(", "sValue", ",", "oControl", ")", ".", "then", "(", "function", "success", "(", ")", "{", "oControl", ".", "setValueState", "(", "\"Success\"", ")", ";", "}", ",", "function", "error", "(", ")", "{", "var", "sMessage", "=", "this", ".", "_getText", "(", "\"TechInfo.SupportAssistantConfigPopup.NotAvailableAtTheMoment\"", ")", ";", "this", ".", "_showError", "(", "oControl", ",", "sMessage", ")", ";", "Log", ".", "error", "(", "\"Support Assistant could not be loaded from the URL you entered\"", ")", ";", "}", ")", ";", "}" ]
Writes the custom bootstrap URL to local storage @param {sap.ui.base.Event} oEvent The select change event
[ "Writes", "the", "custom", "bootstrap", "URL", "to", "local", "storage" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L350-L363
3,781
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function (oEvent) { var sValue = oEvent.getParameter("value"), oControl = oEvent.getSource(); this._storage.put(this._LOCAL_STORAGE_KEYS.CUSTOM_URL, sValue); try { this._validateValue(oControl.getValue()); this._resetValueState(oControl); } catch (oException) { this._showError(oControl, oException.message); } }
javascript
function (oEvent) { var sValue = oEvent.getParameter("value"), oControl = oEvent.getSource(); this._storage.put(this._LOCAL_STORAGE_KEYS.CUSTOM_URL, sValue); try { this._validateValue(oControl.getValue()); this._resetValueState(oControl); } catch (oException) { this._showError(oControl, oException.message); } }
[ "function", "(", "oEvent", ")", "{", "var", "sValue", "=", "oEvent", ".", "getParameter", "(", "\"value\"", ")", ",", "oControl", "=", "oEvent", ".", "getSource", "(", ")", ";", "this", ".", "_storage", ".", "put", "(", "this", ".", "_LOCAL_STORAGE_KEYS", ".", "CUSTOM_URL", ",", "sValue", ")", ";", "try", "{", "this", ".", "_validateValue", "(", "oControl", ".", "getValue", "(", ")", ")", ";", "this", ".", "_resetValueState", "(", "oControl", ")", ";", "}", "catch", "(", "oException", ")", "{", "this", ".", "_showError", "(", "oControl", ",", "oException", ".", "message", ")", ";", "}", "}" ]
Handler for liveChange event fired by custom bootstrap URL. @param oEvent
[ "Handler", "for", "liveChange", "event", "fired", "by", "custom", "bootstrap", "URL", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L369-L379
3,782
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function (oEvent) { // early out if already open if (this._oAssistantPopover && this._oAssistantPopover.isOpen()) { return; } // create dialog lazily if (!this._oAssistantPopover) { this._oAssistantPopover = sap.ui.xmlfragment(this._SUPPORT_ASSISTANT_POPOVER_ID, "sap.ui.core.support.techinfo.TechnicalInfoAssistantPopover", this); this._oAssistantPopover.attachAfterOpen(this._onAssistantPopoverOpened, this); this._oDialog.addDependent(this._oAssistantPopover); syncStyleClass(this._getContentDensityClass(), this._oDialog, this._oAssistantPopover); // register message validation and trigger it once to validate the value coming from local storage var oCustomBootstrapURL = this._getControl("customBootstrapURL", this._SUPPORT_ASSISTANT_POPOVER_ID); sap.ui.getCore().getMessageManager().registerObject(oCustomBootstrapURL, true); } // enable or disable default option for version >= 1.48 var oCurrentItem = this._getControl("standardBootstrapURL", this._SUPPORT_ASSISTANT_POPOVER_ID).getItems()[0]; if (this._isVersionBiggerThanMinSupported()) { var sAppVersion = sap.ui.getCore().getConfiguration().getVersion().toString(); oCurrentItem.setText(oCurrentItem.getText().replace("[[version]]", sAppVersion)); oCurrentItem.setEnabled(true); } else { oCurrentItem.setText(oCurrentItem.getText().replace("[[version]]", "not supported")); oCurrentItem.setEnabled(false); } var oModel = this._oDialog.getModel("view"), sSelectedLocation = oModel.getProperty("/SelectedLocation"); this._setActiveLocations(sSelectedLocation); var oSupportAssistantSettingsButton = this._getControl("supportAssistantSettingsButton", this._TECHNICAL_INFO_DIALOG_ID); this._oAssistantPopover.openBy(oSupportAssistantSettingsButton); }
javascript
function (oEvent) { // early out if already open if (this._oAssistantPopover && this._oAssistantPopover.isOpen()) { return; } // create dialog lazily if (!this._oAssistantPopover) { this._oAssistantPopover = sap.ui.xmlfragment(this._SUPPORT_ASSISTANT_POPOVER_ID, "sap.ui.core.support.techinfo.TechnicalInfoAssistantPopover", this); this._oAssistantPopover.attachAfterOpen(this._onAssistantPopoverOpened, this); this._oDialog.addDependent(this._oAssistantPopover); syncStyleClass(this._getContentDensityClass(), this._oDialog, this._oAssistantPopover); // register message validation and trigger it once to validate the value coming from local storage var oCustomBootstrapURL = this._getControl("customBootstrapURL", this._SUPPORT_ASSISTANT_POPOVER_ID); sap.ui.getCore().getMessageManager().registerObject(oCustomBootstrapURL, true); } // enable or disable default option for version >= 1.48 var oCurrentItem = this._getControl("standardBootstrapURL", this._SUPPORT_ASSISTANT_POPOVER_ID).getItems()[0]; if (this._isVersionBiggerThanMinSupported()) { var sAppVersion = sap.ui.getCore().getConfiguration().getVersion().toString(); oCurrentItem.setText(oCurrentItem.getText().replace("[[version]]", sAppVersion)); oCurrentItem.setEnabled(true); } else { oCurrentItem.setText(oCurrentItem.getText().replace("[[version]]", "not supported")); oCurrentItem.setEnabled(false); } var oModel = this._oDialog.getModel("view"), sSelectedLocation = oModel.getProperty("/SelectedLocation"); this._setActiveLocations(sSelectedLocation); var oSupportAssistantSettingsButton = this._getControl("supportAssistantSettingsButton", this._TECHNICAL_INFO_DIALOG_ID); this._oAssistantPopover.openBy(oSupportAssistantSettingsButton); }
[ "function", "(", "oEvent", ")", "{", "// early out if already open", "if", "(", "this", ".", "_oAssistantPopover", "&&", "this", ".", "_oAssistantPopover", ".", "isOpen", "(", ")", ")", "{", "return", ";", "}", "// create dialog lazily", "if", "(", "!", "this", ".", "_oAssistantPopover", ")", "{", "this", ".", "_oAssistantPopover", "=", "sap", ".", "ui", ".", "xmlfragment", "(", "this", ".", "_SUPPORT_ASSISTANT_POPOVER_ID", ",", "\"sap.ui.core.support.techinfo.TechnicalInfoAssistantPopover\"", ",", "this", ")", ";", "this", ".", "_oAssistantPopover", ".", "attachAfterOpen", "(", "this", ".", "_onAssistantPopoverOpened", ",", "this", ")", ";", "this", ".", "_oDialog", ".", "addDependent", "(", "this", ".", "_oAssistantPopover", ")", ";", "syncStyleClass", "(", "this", ".", "_getContentDensityClass", "(", ")", ",", "this", ".", "_oDialog", ",", "this", ".", "_oAssistantPopover", ")", ";", "// register message validation and trigger it once to validate the value coming from local storage", "var", "oCustomBootstrapURL", "=", "this", ".", "_getControl", "(", "\"customBootstrapURL\"", ",", "this", ".", "_SUPPORT_ASSISTANT_POPOVER_ID", ")", ";", "sap", ".", "ui", ".", "getCore", "(", ")", ".", "getMessageManager", "(", ")", ".", "registerObject", "(", "oCustomBootstrapURL", ",", "true", ")", ";", "}", "// enable or disable default option for version >= 1.48", "var", "oCurrentItem", "=", "this", ".", "_getControl", "(", "\"standardBootstrapURL\"", ",", "this", ".", "_SUPPORT_ASSISTANT_POPOVER_ID", ")", ".", "getItems", "(", ")", "[", "0", "]", ";", "if", "(", "this", ".", "_isVersionBiggerThanMinSupported", "(", ")", ")", "{", "var", "sAppVersion", "=", "sap", ".", "ui", ".", "getCore", "(", ")", ".", "getConfiguration", "(", ")", ".", "getVersion", "(", ")", ".", "toString", "(", ")", ";", "oCurrentItem", ".", "setText", "(", "oCurrentItem", ".", "getText", "(", ")", ".", "replace", "(", "\"[[version]]\"", ",", "sAppVersion", ")", ")", ";", "oCurrentItem", ".", "setEnabled", "(", "true", ")", ";", "}", "else", "{", "oCurrentItem", ".", "setText", "(", "oCurrentItem", ".", "getText", "(", ")", ".", "replace", "(", "\"[[version]]\"", ",", "\"not supported\"", ")", ")", ";", "oCurrentItem", ".", "setEnabled", "(", "false", ")", ";", "}", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "sSelectedLocation", "=", "oModel", ".", "getProperty", "(", "\"/SelectedLocation\"", ")", ";", "this", ".", "_setActiveLocations", "(", "sSelectedLocation", ")", ";", "var", "oSupportAssistantSettingsButton", "=", "this", ".", "_getControl", "(", "\"supportAssistantSettingsButton\"", ",", "this", ".", "_TECHNICAL_INFO_DIALOG_ID", ")", ";", "this", ".", "_oAssistantPopover", ".", "openBy", "(", "oSupportAssistantSettingsButton", ")", ";", "}" ]
Opens a popover with extended configuration options @param {sap.ui.base.Event} oEvent The button press event
[ "Opens", "a", "popover", "with", "extended", "configuration", "options" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L394-L430
3,783
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function (sBootstrapURL) { var oModel = this._oDialog.getModel("view"), oSettings = { // start the application in support mode support: "true", // open in new window window: oModel.getProperty("/OpenSupportAssistantInNewWindow") }; this._loadAssistant(sBootstrapURL, oSettings); }
javascript
function (sBootstrapURL) { var oModel = this._oDialog.getModel("view"), oSettings = { // start the application in support mode support: "true", // open in new window window: oModel.getProperty("/OpenSupportAssistantInNewWindow") }; this._loadAssistant(sBootstrapURL, oSettings); }
[ "function", "(", "sBootstrapURL", ")", "{", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "oSettings", "=", "{", "// start the application in support mode", "support", ":", "\"true\"", ",", "// open in new window", "window", ":", "oModel", ".", "getProperty", "(", "\"/OpenSupportAssistantInNewWindow\"", ")", "}", ";", "this", ".", "_loadAssistant", "(", "sBootstrapURL", ",", "oSettings", ")", ";", "}" ]
Start the support assistant with the given bootstrap URL By default, it is started with the current version for >=1.48 release or SAPUI5 CDN version for lower releases. This behavior can be overridden by specifying a custom bootstrap URL where the support assistant is loaded from @param {string} [sBootstrapURL] If specified, the support assistant will be started with a custom bootstrap URL. @private
[ "Start", "the", "support", "assistant", "with", "the", "given", "bootstrap", "URL", "By", "default", "it", "is", "started", "with", "the", "current", "version", "for", ">", "=", "1", ".", "48", "release", "or", "SAPUI5", "CDN", "version", "for", "lower", "releases", ".", "This", "behavior", "can", "be", "overridden", "by", "specifying", "a", "custom", "bootstrap", "URL", "where", "the", "support", "assistant", "is", "loaded", "from" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L511-L521
3,784
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function (sUrl, oSettings) { this._pingUrl(sUrl) .then(function success() { this.close(); var aSettings = [oSettings.support]; sap.ui.getCore().loadLibrary("sap.ui.support", { async: true, url: sUrl }) .then(function () { if (oSettings.window) { aSettings.push("window"); } if (aSettings[0].toLowerCase() === "true" || aSettings[0].toLowerCase() === "silent") { sap.ui.require(["sap/ui/support/Bootstrap"], function (oBootstrap) { oBootstrap.initSupportRules(aSettings); }); } }); }, function error(jqXHR, exception) { var msg = this._getText("TechInfo.SupportAssistantConfigPopup.SupportAssistantNotFound"); if (jqXHR.status === 0) { msg += this._getText("TechInfo.SupportAssistantConfigPopup.ErrorTryingToGetRecourse"); } else if (jqXHR.status === 404) { msg += this._getText("TechInfo.SupportAssistantConfigPopup.ErrorNotFound"); } else if (jqXHR.status === 500) { msg += this._getText("TechInfo.SupportAssistantConfigPopup.InternalServerError"); } else if (exception === 'parsererror') { msg += this._getText("TechInfo.SupportAssistantConfigPopup.ErrorOnJsonParse"); } else if (exception === 'timeout') { msg += this._getText("TechInfo.SupportAssistantConfigPopup.ErrorOnTimeout"); } else if (exception === 'abort') { msg += this._getText("TechInfo.SupportAssistantConfigPopup.ErrorWhenAborted"); } else { msg += this._getText("TechInfo.SupportAssistantConfigPopup.UncaughtError") + jqXHR.responseText; } this._sErrorMessage = msg; this.onConfigureAssistantBootstrap(); Log.error("Support Assistant could not be loaded from the URL you entered"); }); }
javascript
function (sUrl, oSettings) { this._pingUrl(sUrl) .then(function success() { this.close(); var aSettings = [oSettings.support]; sap.ui.getCore().loadLibrary("sap.ui.support", { async: true, url: sUrl }) .then(function () { if (oSettings.window) { aSettings.push("window"); } if (aSettings[0].toLowerCase() === "true" || aSettings[0].toLowerCase() === "silent") { sap.ui.require(["sap/ui/support/Bootstrap"], function (oBootstrap) { oBootstrap.initSupportRules(aSettings); }); } }); }, function error(jqXHR, exception) { var msg = this._getText("TechInfo.SupportAssistantConfigPopup.SupportAssistantNotFound"); if (jqXHR.status === 0) { msg += this._getText("TechInfo.SupportAssistantConfigPopup.ErrorTryingToGetRecourse"); } else if (jqXHR.status === 404) { msg += this._getText("TechInfo.SupportAssistantConfigPopup.ErrorNotFound"); } else if (jqXHR.status === 500) { msg += this._getText("TechInfo.SupportAssistantConfigPopup.InternalServerError"); } else if (exception === 'parsererror') { msg += this._getText("TechInfo.SupportAssistantConfigPopup.ErrorOnJsonParse"); } else if (exception === 'timeout') { msg += this._getText("TechInfo.SupportAssistantConfigPopup.ErrorOnTimeout"); } else if (exception === 'abort') { msg += this._getText("TechInfo.SupportAssistantConfigPopup.ErrorWhenAborted"); } else { msg += this._getText("TechInfo.SupportAssistantConfigPopup.UncaughtError") + jqXHR.responseText; } this._sErrorMessage = msg; this.onConfigureAssistantBootstrap(); Log.error("Support Assistant could not be loaded from the URL you entered"); }); }
[ "function", "(", "sUrl", ",", "oSettings", ")", "{", "this", ".", "_pingUrl", "(", "sUrl", ")", ".", "then", "(", "function", "success", "(", ")", "{", "this", ".", "close", "(", ")", ";", "var", "aSettings", "=", "[", "oSettings", ".", "support", "]", ";", "sap", ".", "ui", ".", "getCore", "(", ")", ".", "loadLibrary", "(", "\"sap.ui.support\"", ",", "{", "async", ":", "true", ",", "url", ":", "sUrl", "}", ")", ".", "then", "(", "function", "(", ")", "{", "if", "(", "oSettings", ".", "window", ")", "{", "aSettings", ".", "push", "(", "\"window\"", ")", ";", "}", "if", "(", "aSettings", "[", "0", "]", ".", "toLowerCase", "(", ")", "===", "\"true\"", "||", "aSettings", "[", "0", "]", ".", "toLowerCase", "(", ")", "===", "\"silent\"", ")", "{", "sap", ".", "ui", ".", "require", "(", "[", "\"sap/ui/support/Bootstrap\"", "]", ",", "function", "(", "oBootstrap", ")", "{", "oBootstrap", ".", "initSupportRules", "(", "aSettings", ")", ";", "}", ")", ";", "}", "}", ")", ";", "}", ",", "function", "error", "(", "jqXHR", ",", "exception", ")", "{", "var", "msg", "=", "this", ".", "_getText", "(", "\"TechInfo.SupportAssistantConfigPopup.SupportAssistantNotFound\"", ")", ";", "if", "(", "jqXHR", ".", "status", "===", "0", ")", "{", "msg", "+=", "this", ".", "_getText", "(", "\"TechInfo.SupportAssistantConfigPopup.ErrorTryingToGetRecourse\"", ")", ";", "}", "else", "if", "(", "jqXHR", ".", "status", "===", "404", ")", "{", "msg", "+=", "this", ".", "_getText", "(", "\"TechInfo.SupportAssistantConfigPopup.ErrorNotFound\"", ")", ";", "}", "else", "if", "(", "jqXHR", ".", "status", "===", "500", ")", "{", "msg", "+=", "this", ".", "_getText", "(", "\"TechInfo.SupportAssistantConfigPopup.InternalServerError\"", ")", ";", "}", "else", "if", "(", "exception", "===", "'parsererror'", ")", "{", "msg", "+=", "this", ".", "_getText", "(", "\"TechInfo.SupportAssistantConfigPopup.ErrorOnJsonParse\"", ")", ";", "}", "else", "if", "(", "exception", "===", "'timeout'", ")", "{", "msg", "+=", "this", ".", "_getText", "(", "\"TechInfo.SupportAssistantConfigPopup.ErrorOnTimeout\"", ")", ";", "}", "else", "if", "(", "exception", "===", "'abort'", ")", "{", "msg", "+=", "this", ".", "_getText", "(", "\"TechInfo.SupportAssistantConfigPopup.ErrorWhenAborted\"", ")", ";", "}", "else", "{", "msg", "+=", "this", ".", "_getText", "(", "\"TechInfo.SupportAssistantConfigPopup.UncaughtError\"", ")", "+", "jqXHR", ".", "responseText", ";", "}", "this", ".", "_sErrorMessage", "=", "msg", ";", "this", ".", "onConfigureAssistantBootstrap", "(", ")", ";", "Log", ".", "error", "(", "\"Support Assistant could not be loaded from the URL you entered\"", ")", ";", "}", ")", ";", "}" ]
Try to load Support Assistant with passed sUrl and aParams by making ajax request to Bootstrap.js. If Bootsrap.js is missing error occurs in the console otherwise starts Support Assistant. @param {string} sUrl Url where to load Support Assistant from. @param {object} oSettings Parameters that needs to be passed to Support Assistant. @private
[ "Try", "to", "load", "Support", "Assistant", "with", "passed", "sUrl", "and", "aParams", "by", "making", "ajax", "request", "to", "Bootstrap", ".", "js", ".", "If", "Bootsrap", ".", "js", "is", "missing", "error", "occurs", "in", "the", "console", "otherwise", "starts", "Support", "Assistant", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L530-L568
3,785
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { // create i18n model var oI18nModel = new ResourceModel({ bundleName: "sap.ui.core.messagebundle" }); this._oDialog.setModel(oI18nModel, "i18n"); this._oDialog.setModel(this._createViewModel(), "view"); // set compact/cozy style class this._oDialog.addStyleClass(this._getContentDensityClass()); }
javascript
function () { // create i18n model var oI18nModel = new ResourceModel({ bundleName: "sap.ui.core.messagebundle" }); this._oDialog.setModel(oI18nModel, "i18n"); this._oDialog.setModel(this._createViewModel(), "view"); // set compact/cozy style class this._oDialog.addStyleClass(this._getContentDensityClass()); }
[ "function", "(", ")", "{", "// create i18n model", "var", "oI18nModel", "=", "new", "ResourceModel", "(", "{", "bundleName", ":", "\"sap.ui.core.messagebundle\"", "}", ")", ";", "this", ".", "_oDialog", ".", "setModel", "(", "oI18nModel", ",", "\"i18n\"", ")", ";", "this", ".", "_oDialog", ".", "setModel", "(", "this", ".", "_createViewModel", "(", ")", ",", "\"view\"", ")", ";", "// set compact/cozy style class", "this", ".", "_oDialog", ".", "addStyleClass", "(", "this", ".", "_getContentDensityClass", "(", ")", ")", ";", "}" ]
Initalizes the technical information dialog @private
[ "Initalizes", "the", "technical", "information", "dialog" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L574-L584
3,786
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { var oVersion = sap.ui.getCore().getConfiguration().getVersion(); if (oVersion && oVersion.compareTo(this._MIN_UI5VERSION_SUPPORT_ASSISTANT) >= 0) { return true; } return false; }
javascript
function () { var oVersion = sap.ui.getCore().getConfiguration().getVersion(); if (oVersion && oVersion.compareTo(this._MIN_UI5VERSION_SUPPORT_ASSISTANT) >= 0) { return true; } return false; }
[ "function", "(", ")", "{", "var", "oVersion", "=", "sap", ".", "ui", ".", "getCore", "(", ")", ".", "getConfiguration", "(", ")", ".", "getVersion", "(", ")", ";", "if", "(", "oVersion", "&&", "oVersion", ".", "compareTo", "(", "this", ".", "_MIN_UI5VERSION_SUPPORT_ASSISTANT", ")", ">=", "0", ")", "{", "return", "true", ";", "}", "return", "false", ";", "}" ]
Checks if current version of UI5 is equal or higher than minimum UI5 version that Support Assistant is available at. @returns {boolean} @private
[ "Checks", "if", "current", "version", "of", "UI5", "is", "equal", "or", "higher", "than", "minimum", "UI5", "version", "that", "Support", "Assistant", "is", "available", "at", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L703-L709
3,787
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function (sBuildTimestamp) { var oDateFormat = sap.ui.core.format.DateFormat.getDateInstance({pattern: "dd.MM.yyyy HH:mm:ss"}), sBuildDate = oDateFormat.format(this._convertBuildDate(sBuildTimestamp)); return this._getText("TechInfo.VersionBuildTime.Text", sBuildDate); }
javascript
function (sBuildTimestamp) { var oDateFormat = sap.ui.core.format.DateFormat.getDateInstance({pattern: "dd.MM.yyyy HH:mm:ss"}), sBuildDate = oDateFormat.format(this._convertBuildDate(sBuildTimestamp)); return this._getText("TechInfo.VersionBuildTime.Text", sBuildDate); }
[ "function", "(", "sBuildTimestamp", ")", "{", "var", "oDateFormat", "=", "sap", ".", "ui", ".", "core", ".", "format", ".", "DateFormat", ".", "getDateInstance", "(", "{", "pattern", ":", "\"dd.MM.yyyy HH:mm:ss\"", "}", ")", ",", "sBuildDate", "=", "oDateFormat", ".", "format", "(", "this", ".", "_convertBuildDate", "(", "sBuildTimestamp", ")", ")", ";", "return", "this", ".", "_getText", "(", "\"TechInfo.VersionBuildTime.Text\"", ",", "sBuildDate", ")", ";", "}" ]
Generates formatted and localized text from passed timestamp @param {string} sBuildTimestamp Timestamp as string @private
[ "Generates", "formatted", "and", "localized", "text", "from", "passed", "timestamp" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L716-L721
3,788
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function (sValue) { var oModel = this._oDialog.getModel("view"), oRadioBtnStandart = this._getControl("standard", this._SUPPORT_ASSISTANT_POPOVER_ID), oRadioBtnCustom = this._getControl("custom", this._SUPPORT_ASSISTANT_POPOVER_ID), oCustom = this._getControl("customBootstrapURL", this._SUPPORT_ASSISTANT_POPOVER_ID), oStandard = this._getControl("standardBootstrapURL", this._SUPPORT_ASSISTANT_POPOVER_ID), bStandardLocationEnabled; this._resetValueState(oCustom); this._resetValueState(oStandard); if (sValue === "standard") { bStandardLocationEnabled = true; oModel.setProperty("/StandardBootstrapURL", this._storage.get(this._LOCAL_STORAGE_KEYS.STANDARD_URL)); oStandard.setSelectedKey(oModel.getProperty("/StandardBootstrapURL")); } else { bStandardLocationEnabled = false; } oStandard.setEnabled(bStandardLocationEnabled); oRadioBtnStandart.setSelected(bStandardLocationEnabled); oCustom.setEnabled(!bStandardLocationEnabled); oRadioBtnCustom.setSelected(!bStandardLocationEnabled); this._storage.put(this._LOCAL_STORAGE_KEYS.LOCATION, sValue); oModel.setProperty("/SelectedLocation", this._storage.get(this._LOCAL_STORAGE_KEYS.LOCATION)); }
javascript
function (sValue) { var oModel = this._oDialog.getModel("view"), oRadioBtnStandart = this._getControl("standard", this._SUPPORT_ASSISTANT_POPOVER_ID), oRadioBtnCustom = this._getControl("custom", this._SUPPORT_ASSISTANT_POPOVER_ID), oCustom = this._getControl("customBootstrapURL", this._SUPPORT_ASSISTANT_POPOVER_ID), oStandard = this._getControl("standardBootstrapURL", this._SUPPORT_ASSISTANT_POPOVER_ID), bStandardLocationEnabled; this._resetValueState(oCustom); this._resetValueState(oStandard); if (sValue === "standard") { bStandardLocationEnabled = true; oModel.setProperty("/StandardBootstrapURL", this._storage.get(this._LOCAL_STORAGE_KEYS.STANDARD_URL)); oStandard.setSelectedKey(oModel.getProperty("/StandardBootstrapURL")); } else { bStandardLocationEnabled = false; } oStandard.setEnabled(bStandardLocationEnabled); oRadioBtnStandart.setSelected(bStandardLocationEnabled); oCustom.setEnabled(!bStandardLocationEnabled); oRadioBtnCustom.setSelected(!bStandardLocationEnabled); this._storage.put(this._LOCAL_STORAGE_KEYS.LOCATION, sValue); oModel.setProperty("/SelectedLocation", this._storage.get(this._LOCAL_STORAGE_KEYS.LOCATION)); }
[ "function", "(", "sValue", ")", "{", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "oRadioBtnStandart", "=", "this", ".", "_getControl", "(", "\"standard\"", ",", "this", ".", "_SUPPORT_ASSISTANT_POPOVER_ID", ")", ",", "oRadioBtnCustom", "=", "this", ".", "_getControl", "(", "\"custom\"", ",", "this", ".", "_SUPPORT_ASSISTANT_POPOVER_ID", ")", ",", "oCustom", "=", "this", ".", "_getControl", "(", "\"customBootstrapURL\"", ",", "this", ".", "_SUPPORT_ASSISTANT_POPOVER_ID", ")", ",", "oStandard", "=", "this", ".", "_getControl", "(", "\"standardBootstrapURL\"", ",", "this", ".", "_SUPPORT_ASSISTANT_POPOVER_ID", ")", ",", "bStandardLocationEnabled", ";", "this", ".", "_resetValueState", "(", "oCustom", ")", ";", "this", ".", "_resetValueState", "(", "oStandard", ")", ";", "if", "(", "sValue", "===", "\"standard\"", ")", "{", "bStandardLocationEnabled", "=", "true", ";", "oModel", ".", "setProperty", "(", "\"/StandardBootstrapURL\"", ",", "this", ".", "_storage", ".", "get", "(", "this", ".", "_LOCAL_STORAGE_KEYS", ".", "STANDARD_URL", ")", ")", ";", "oStandard", ".", "setSelectedKey", "(", "oModel", ".", "getProperty", "(", "\"/StandardBootstrapURL\"", ")", ")", ";", "}", "else", "{", "bStandardLocationEnabled", "=", "false", ";", "}", "oStandard", ".", "setEnabled", "(", "bStandardLocationEnabled", ")", ";", "oRadioBtnStandart", ".", "setSelected", "(", "bStandardLocationEnabled", ")", ";", "oCustom", ".", "setEnabled", "(", "!", "bStandardLocationEnabled", ")", ";", "oRadioBtnCustom", ".", "setSelected", "(", "!", "bStandardLocationEnabled", ")", ";", "this", ".", "_storage", ".", "put", "(", "this", ".", "_LOCAL_STORAGE_KEYS", ".", "LOCATION", ",", "sValue", ")", ";", "oModel", ".", "setProperty", "(", "\"/SelectedLocation\"", ",", "this", ".", "_storage", ".", "get", "(", "this", ".", "_LOCAL_STORAGE_KEYS", ".", "LOCATION", ")", ")", ";", "}" ]
Sets active location and toggle between "standard" and "custom" locations. Saves last active location. @param {string} sValue Possible values "standard" or "custom" @private
[ "Sets", "active", "location", "and", "toggle", "between", "standard", "and", "custom", "locations", ".", "Saves", "last", "active", "location", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L729-L755
3,789
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function (fnConfirm, fnCancel) { MessageBox.confirm( this._getText("TechInfo.DebugSources.ConfirmMessage"), { title: this._getText("TechInfo.DebugSources.ConfirmTitle"), onClose: function (oAction) { if (oAction === MessageBox.Action.OK) { fnConfirm(); } else if (fnCancel) { fnCancel(); } } } ); }
javascript
function (fnConfirm, fnCancel) { MessageBox.confirm( this._getText("TechInfo.DebugSources.ConfirmMessage"), { title: this._getText("TechInfo.DebugSources.ConfirmTitle"), onClose: function (oAction) { if (oAction === MessageBox.Action.OK) { fnConfirm(); } else if (fnCancel) { fnCancel(); } } } ); }
[ "function", "(", "fnConfirm", ",", "fnCancel", ")", "{", "MessageBox", ".", "confirm", "(", "this", ".", "_getText", "(", "\"TechInfo.DebugSources.ConfirmMessage\"", ")", ",", "{", "title", ":", "this", ".", "_getText", "(", "\"TechInfo.DebugSources.ConfirmTitle\"", ")", ",", "onClose", ":", "function", "(", "oAction", ")", "{", "if", "(", "oAction", "===", "MessageBox", ".", "Action", ".", "OK", ")", "{", "fnConfirm", "(", ")", ";", "}", "else", "if", "(", "fnCancel", ")", "{", "fnCancel", "(", ")", ";", "}", "}", "}", ")", ";", "}" ]
Called after CANCEL action is triggered @name cancelActionCallback @function @private Displays a confirmation message to reload the current page @param {confirmActionCallback} fnConfirm Callback function to be executed after the "ok" action is triggered @param {cancelActionCallback} [fnCancel] Callback function to be executed after the "cancel" action is triggered @private
[ "Called", "after", "CANCEL", "action", "is", "triggered" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L777-L790
3,790
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { var oModel = this._oDialog.getModel("view"), sSelectedLocation = oModel.getProperty("/SelectedLocation"), oControl; if (sSelectedLocation === "custom") { oControl = this._getControl("customBootstrapURL",this._SUPPORT_ASSISTANT_POPOVER_ID); var sValue = oControl.getValue(); try { this._validateValue(sValue); } catch (oException) { this._showError(oControl, oException.message); if (this._sErrorMessage) { this._sErrorMessage = null; } return; } } else { oControl = this._getControl("standardBootstrapURL", this._SUPPORT_ASSISTANT_POPOVER_ID); } if (this._sErrorMessage) { this._showError(oControl, this._sErrorMessage); this._sErrorMessage = null; } }
javascript
function () { var oModel = this._oDialog.getModel("view"), sSelectedLocation = oModel.getProperty("/SelectedLocation"), oControl; if (sSelectedLocation === "custom") { oControl = this._getControl("customBootstrapURL",this._SUPPORT_ASSISTANT_POPOVER_ID); var sValue = oControl.getValue(); try { this._validateValue(sValue); } catch (oException) { this._showError(oControl, oException.message); if (this._sErrorMessage) { this._sErrorMessage = null; } return; } } else { oControl = this._getControl("standardBootstrapURL", this._SUPPORT_ASSISTANT_POPOVER_ID); } if (this._sErrorMessage) { this._showError(oControl, this._sErrorMessage); this._sErrorMessage = null; } }
[ "function", "(", ")", "{", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "sSelectedLocation", "=", "oModel", ".", "getProperty", "(", "\"/SelectedLocation\"", ")", ",", "oControl", ";", "if", "(", "sSelectedLocation", "===", "\"custom\"", ")", "{", "oControl", "=", "this", ".", "_getControl", "(", "\"customBootstrapURL\"", ",", "this", ".", "_SUPPORT_ASSISTANT_POPOVER_ID", ")", ";", "var", "sValue", "=", "oControl", ".", "getValue", "(", ")", ";", "try", "{", "this", ".", "_validateValue", "(", "sValue", ")", ";", "}", "catch", "(", "oException", ")", "{", "this", ".", "_showError", "(", "oControl", ",", "oException", ".", "message", ")", ";", "if", "(", "this", ".", "_sErrorMessage", ")", "{", "this", ".", "_sErrorMessage", "=", "null", ";", "}", "return", ";", "}", "}", "else", "{", "oControl", "=", "this", ".", "_getControl", "(", "\"standardBootstrapURL\"", ",", "this", ".", "_SUPPORT_ASSISTANT_POPOVER_ID", ")", ";", "}", "if", "(", "this", ".", "_sErrorMessage", ")", "{", "this", ".", "_showError", "(", "oControl", ",", "this", ".", "_sErrorMessage", ")", ";", "this", ".", "_sErrorMessage", "=", "null", ";", "}", "}" ]
Handler for onAfterOpen event from popover @private
[ "Handler", "for", "onAfterOpen", "event", "from", "popover" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L795-L820
3,791
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function (sControlId, sFragmentId) { if (sFragmentId) { return sap.ui.getCore().byId(sFragmentId + "--" + sControlId); } return sap.ui.getCore().byId(sControlId); }
javascript
function (sControlId, sFragmentId) { if (sFragmentId) { return sap.ui.getCore().byId(sFragmentId + "--" + sControlId); } return sap.ui.getCore().byId(sControlId); }
[ "function", "(", "sControlId", ",", "sFragmentId", ")", "{", "if", "(", "sFragmentId", ")", "{", "return", "sap", ".", "ui", ".", "getCore", "(", ")", ".", "byId", "(", "sFragmentId", "+", "\"--\"", "+", "sControlId", ")", ";", "}", "return", "sap", ".", "ui", ".", "getCore", "(", ")", ".", "byId", "(", "sControlId", ")", ";", "}" ]
Gets the instance of the control. If context such as fragment is provided the function will search for id in provided context. If context is not provided the standard @param {string} sControlId The id of the searched control. @param {string} sFragmentId The id of the context where the searched control is located. @private
[ "Gets", "the", "instance", "of", "the", "control", ".", "If", "context", "such", "as", "fragment", "is", "provided", "the", "function", "will", "search", "for", "id", "in", "provided", "context", ".", "If", "context", "is", "not", "provided", "the", "standard" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L863-L868
3,792
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function(sParameter, vValue) { // fetch current parameters from URL var sSearch = window.location.search, sURLParameter = sParameter + "=" + vValue; /// replace or append the new URL parameter if (sSearch && sSearch !== "?") { var oRegExp = new RegExp("(?:^|\\?|&)" + sParameter + "=[^&]+"); if (sSearch.match(oRegExp)) { sSearch = sSearch.replace(oRegExp, sURLParameter); } else { sSearch += "&" + sURLParameter; } } else { sSearch = "?" + sURLParameter; } // reload the page by setting the new parameters window.location.search = sSearch; }
javascript
function(sParameter, vValue) { // fetch current parameters from URL var sSearch = window.location.search, sURLParameter = sParameter + "=" + vValue; /// replace or append the new URL parameter if (sSearch && sSearch !== "?") { var oRegExp = new RegExp("(?:^|\\?|&)" + sParameter + "=[^&]+"); if (sSearch.match(oRegExp)) { sSearch = sSearch.replace(oRegExp, sURLParameter); } else { sSearch += "&" + sURLParameter; } } else { sSearch = "?" + sURLParameter; } // reload the page by setting the new parameters window.location.search = sSearch; }
[ "function", "(", "sParameter", ",", "vValue", ")", "{", "// fetch current parameters from URL", "var", "sSearch", "=", "window", ".", "location", ".", "search", ",", "sURLParameter", "=", "sParameter", "+", "\"=\"", "+", "vValue", ";", "/// replace or append the new URL parameter", "if", "(", "sSearch", "&&", "sSearch", "!==", "\"?\"", ")", "{", "var", "oRegExp", "=", "new", "RegExp", "(", "\"(?:^|\\\\?|&)\"", "+", "sParameter", "+", "\"=[^&]+\"", ")", ";", "if", "(", "sSearch", ".", "match", "(", "oRegExp", ")", ")", "{", "sSearch", "=", "sSearch", ".", "replace", "(", "oRegExp", ",", "sURLParameter", ")", ";", "}", "else", "{", "sSearch", "+=", "\"&\"", "+", "sURLParameter", ";", "}", "}", "else", "{", "sSearch", "=", "\"?\"", "+", "sURLParameter", ";", "}", "// reload the page by setting the new parameters", "window", ".", "location", ".", "search", "=", "sSearch", ";", "}" ]
Replaces the URL parameter and triggers a reload of the current page @param {string} sParameter Parameter name @param {any} vValue Parameter value @private
[ "Replaces", "the", "URL", "parameter", "and", "triggers", "a", "reload", "of", "the", "current", "page" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L876-L895
3,793
SAP/openui5
src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js
function () { var oModel = this._oDialog.getModel("view"), oTreeData = oModel.getProperty("/DebugModules")[0], sDisplayCount; oModel.setProperty("/CustomDebugMode", this._treeHelper.toDebugInfo(oTreeData)); oModel.setProperty("/DebugModuleSelectionCount", this._treeHelper.getSelectionCount(oTreeData)); sDisplayCount = oModel.getProperty("/DebugModuleSelectionCount").toString(); oModel.setProperty("/DebugModulesTitle", this._getText("TechInfo.DebugModulesConfigPopup.SelectionCounter", sDisplayCount)); }
javascript
function () { var oModel = this._oDialog.getModel("view"), oTreeData = oModel.getProperty("/DebugModules")[0], sDisplayCount; oModel.setProperty("/CustomDebugMode", this._treeHelper.toDebugInfo(oTreeData)); oModel.setProperty("/DebugModuleSelectionCount", this._treeHelper.getSelectionCount(oTreeData)); sDisplayCount = oModel.getProperty("/DebugModuleSelectionCount").toString(); oModel.setProperty("/DebugModulesTitle", this._getText("TechInfo.DebugModulesConfigPopup.SelectionCounter", sDisplayCount)); }
[ "function", "(", ")", "{", "var", "oModel", "=", "this", ".", "_oDialog", ".", "getModel", "(", "\"view\"", ")", ",", "oTreeData", "=", "oModel", ".", "getProperty", "(", "\"/DebugModules\"", ")", "[", "0", "]", ",", "sDisplayCount", ";", "oModel", ".", "setProperty", "(", "\"/CustomDebugMode\"", ",", "this", ".", "_treeHelper", ".", "toDebugInfo", "(", "oTreeData", ")", ")", ";", "oModel", ".", "setProperty", "(", "\"/DebugModuleSelectionCount\"", ",", "this", ".", "_treeHelper", ".", "getSelectionCount", "(", "oTreeData", ")", ")", ";", "sDisplayCount", "=", "oModel", ".", "getProperty", "(", "\"/DebugModuleSelectionCount\"", ")", ".", "toString", "(", ")", ";", "oModel", ".", "setProperty", "(", "\"/DebugModulesTitle\"", ",", "this", ".", "_getText", "(", "\"TechInfo.DebugModulesConfigPopup.SelectionCounter\"", ",", "sDisplayCount", ")", ")", ";", "}" ]
Updates the debug mode input field and the number of selected debug modules @private
[ "Updates", "the", "debug", "mode", "input", "field", "and", "the", "number", "of", "selected", "debug", "modules" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L921-L929
3,794
SAP/openui5
src/sap.ui.layout/src/sap/ui/layout/Splitter.js
_preventTextSelection
function _preventTextSelection(bTouch) { var fnPreventSelection = function(oEvent) { oEvent.preventDefault(); }; var fnAllowSelection = null; fnAllowSelection = function() { document.removeEventListener("touchend", fnAllowSelection); document.removeEventListener("touchmove", fnPreventSelection); document.removeEventListener("mouseup", fnAllowSelection); document.removeEventListener("mousemove", fnPreventSelection); }; if (bTouch) { this._ignoreMouse = true; // Ignore mouse-events until touch is done document.addEventListener("touchend", fnAllowSelection); document.addEventListener("touchmove", fnPreventSelection); } else { document.addEventListener("mouseup", fnAllowSelection); document.addEventListener("mousemove", fnPreventSelection); } }
javascript
function _preventTextSelection(bTouch) { var fnPreventSelection = function(oEvent) { oEvent.preventDefault(); }; var fnAllowSelection = null; fnAllowSelection = function() { document.removeEventListener("touchend", fnAllowSelection); document.removeEventListener("touchmove", fnPreventSelection); document.removeEventListener("mouseup", fnAllowSelection); document.removeEventListener("mousemove", fnPreventSelection); }; if (bTouch) { this._ignoreMouse = true; // Ignore mouse-events until touch is done document.addEventListener("touchend", fnAllowSelection); document.addEventListener("touchmove", fnPreventSelection); } else { document.addEventListener("mouseup", fnAllowSelection); document.addEventListener("mousemove", fnPreventSelection); } }
[ "function", "_preventTextSelection", "(", "bTouch", ")", "{", "var", "fnPreventSelection", "=", "function", "(", "oEvent", ")", "{", "oEvent", ".", "preventDefault", "(", ")", ";", "}", ";", "var", "fnAllowSelection", "=", "null", ";", "fnAllowSelection", "=", "function", "(", ")", "{", "document", ".", "removeEventListener", "(", "\"touchend\"", ",", "fnAllowSelection", ")", ";", "document", ".", "removeEventListener", "(", "\"touchmove\"", ",", "fnPreventSelection", ")", ";", "document", ".", "removeEventListener", "(", "\"mouseup\"", ",", "fnAllowSelection", ")", ";", "document", ".", "removeEventListener", "(", "\"mousemove\"", ",", "fnPreventSelection", ")", ";", "}", ";", "if", "(", "bTouch", ")", "{", "this", ".", "_ignoreMouse", "=", "true", ";", "// Ignore mouse-events until touch is done", "document", ".", "addEventListener", "(", "\"touchend\"", ",", "fnAllowSelection", ")", ";", "document", ".", "addEventListener", "(", "\"touchmove\"", ",", "fnPreventSelection", ")", ";", "}", "else", "{", "document", ".", "addEventListener", "(", "\"mouseup\"", ",", "fnAllowSelection", ")", ";", "document", ".", "addEventListener", "(", "\"mousemove\"", ",", "fnPreventSelection", ")", ";", "}", "}" ]
Prevents the selection of text while the mouse is moving when pressed @param {boolean} [bTouch] If set to true, touch events instead of mouse events are captured
[ "Prevents", "the", "selection", "of", "text", "while", "the", "mouse", "is", "moving", "when", "pressed" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.layout/src/sap/ui/layout/Splitter.js#L1076-L1096
3,795
SAP/openui5
src/sap.ui.layout/src/sap/ui/layout/Splitter.js
_ensureLayoutData
function _ensureLayoutData(oContent) { var oLd = oContent.getLayoutData(); // Make sure LayoutData is set on the content // But this approach has the advantage that "compatible" LayoutData can be used. if (oLd && (!oLd.getResizable || !oLd.getSize || !oLd.getMinSize)) { Log.warning( "Content \"" + oContent.getId() + "\" for the Splitter contained wrong LayoutData. " + "The LayoutData has been replaced with default values." ); oLd = null; } if (!oLd) { oContent.setLayoutData(new sap.ui.layout.SplitterLayoutData()); } }
javascript
function _ensureLayoutData(oContent) { var oLd = oContent.getLayoutData(); // Make sure LayoutData is set on the content // But this approach has the advantage that "compatible" LayoutData can be used. if (oLd && (!oLd.getResizable || !oLd.getSize || !oLd.getMinSize)) { Log.warning( "Content \"" + oContent.getId() + "\" for the Splitter contained wrong LayoutData. " + "The LayoutData has been replaced with default values." ); oLd = null; } if (!oLd) { oContent.setLayoutData(new sap.ui.layout.SplitterLayoutData()); } }
[ "function", "_ensureLayoutData", "(", "oContent", ")", "{", "var", "oLd", "=", "oContent", ".", "getLayoutData", "(", ")", ";", "// Make sure LayoutData is set on the content", "// But this approach has the advantage that \"compatible\" LayoutData can be used.", "if", "(", "oLd", "&&", "(", "!", "oLd", ".", "getResizable", "||", "!", "oLd", ".", "getSize", "||", "!", "oLd", ".", "getMinSize", ")", ")", "{", "Log", ".", "warning", "(", "\"Content \\\"\"", "+", "oContent", ".", "getId", "(", ")", "+", "\"\\\" for the Splitter contained wrong LayoutData. \"", "+", "\"The LayoutData has been replaced with default values.\"", ")", ";", "oLd", "=", "null", ";", "}", "if", "(", "!", "oLd", ")", "{", "oContent", ".", "setLayoutData", "(", "new", "sap", ".", "ui", ".", "layout", ".", "SplitterLayoutData", "(", ")", ")", ";", "}", "}" ]
Makes sure the LayoutData for the given control is set and compatible. In case nothing is set, a default sap.ui.layout.SplitterLayoutData is set on the Element @param {sap.ui.core.Element} [oContent] The Element for which the existance of LayoutData should be ensured @private
[ "Makes", "sure", "the", "LayoutData", "for", "the", "given", "control", "is", "set", "and", "compatible", ".", "In", "case", "nothing", "is", "set", "a", "default", "sap", ".", "ui", ".", "layout", ".", "SplitterLayoutData", "is", "set", "on", "the", "Element" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.layout/src/sap/ui/layout/Splitter.js#L1105-L1119
3,796
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v4/ODataUtils.js
function (vValue1, vValue2, vEdmType) { if (vEdmType === true || vEdmType === "Decimal") { return BaseODataUtils.compare(vValue1, vValue2, true); } if (vEdmType === "DateTime") { return BaseODataUtils.compare( ODataUtils.parseDateTimeOffset(vValue1), ODataUtils.parseDateTimeOffset(vValue2)); } return BaseODataUtils.compare(vValue1, vValue2); }
javascript
function (vValue1, vValue2, vEdmType) { if (vEdmType === true || vEdmType === "Decimal") { return BaseODataUtils.compare(vValue1, vValue2, true); } if (vEdmType === "DateTime") { return BaseODataUtils.compare( ODataUtils.parseDateTimeOffset(vValue1), ODataUtils.parseDateTimeOffset(vValue2)); } return BaseODataUtils.compare(vValue1, vValue2); }
[ "function", "(", "vValue1", ",", "vValue2", ",", "vEdmType", ")", "{", "if", "(", "vEdmType", "===", "true", "||", "vEdmType", "===", "\"Decimal\"", ")", "{", "return", "BaseODataUtils", ".", "compare", "(", "vValue1", ",", "vValue2", ",", "true", ")", ";", "}", "if", "(", "vEdmType", "===", "\"DateTime\"", ")", "{", "return", "BaseODataUtils", ".", "compare", "(", "ODataUtils", ".", "parseDateTimeOffset", "(", "vValue1", ")", ",", "ODataUtils", ".", "parseDateTimeOffset", "(", "vValue2", ")", ")", ";", "}", "return", "BaseODataUtils", ".", "compare", "(", "vValue1", ",", "vValue2", ")", ";", "}" ]
Compares the given OData values. @param {any} vValue1 The first value to compare @param {any} vValue2 The second value to compare @param {boolean|string} [vEdmType] If <code>true</code> or "Decimal", the string values <code>vValue1</code> and <code>vValue2</code> are assumed to be valid "Edm.Decimal" or "Edm.Int64" values and are compared as a decimal number (only sign, integer and fraction digits; no exponential format). If "DateTime", the string values <code>vValue1</code> and <code>vValue2</code> are assumed to be valid "Edm.DateTimeOffset" values and are compared based on the corresponding number of milliseconds since 1 January, 1970 UTC. Otherwise the values are compared with the JavaScript operators <code>===</code> and <code>></code>. @return {number} The result of the comparison: <code>0</code> if the values are equal, <code>1</code> if the first value is larger, <code>-1</code> if the second value is larger, <code>NaN</code> if they cannot be compared @public @since 1.43.0
[ "Compares", "the", "given", "OData", "values", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataUtils.js#L55-L65
3,797
SAP/openui5
src/sap.m/src/sap/m/IconTabBarDragAndDropUtil.js
function (context, sDropPosition, oDraggedControl, oDroppedControl, bIgnoreRTL) { var iBeginDragIndex = context.indexOfItem(oDraggedControl), iDropIndex = context.indexOfItem(oDroppedControl), $DraggedControl = oDraggedControl.$(), $DroppedControl = oDroppedControl.$(), iAggregationDropIndex = 0, bRtl = sap.ui.getCore().getConfiguration().getRTL(), bIsDropPositionBefore = sDropPosition === INSERT_POSITION_BEFORE; if (bRtl && !bIgnoreRTL) { if (bIsDropPositionBefore) { iAggregationDropIndex = iBeginDragIndex < iDropIndex ? iDropIndex : iDropIndex + 1; sInsertAfterBeforePosition = INSERT_AFTER; } else { iAggregationDropIndex = iBeginDragIndex < iDropIndex ? iDropIndex - 1 : iDropIndex; sInsertAfterBeforePosition = INSERT_BEFORE; } } else { if (bIsDropPositionBefore) { iAggregationDropIndex = iBeginDragIndex < iDropIndex ? iDropIndex - 1 : iDropIndex; sInsertAfterBeforePosition = INSERT_BEFORE; } else { iAggregationDropIndex = iBeginDragIndex < iDropIndex ? iDropIndex : iDropIndex + 1; sInsertAfterBeforePosition = INSERT_AFTER; } } IconTabBarDragAndDropUtil._insertControl(sInsertAfterBeforePosition, $DraggedControl, $DroppedControl); IconTabBarDragAndDropUtil._handleConfigurationAfterDragAndDrop.call(context, oDraggedControl, iAggregationDropIndex); }
javascript
function (context, sDropPosition, oDraggedControl, oDroppedControl, bIgnoreRTL) { var iBeginDragIndex = context.indexOfItem(oDraggedControl), iDropIndex = context.indexOfItem(oDroppedControl), $DraggedControl = oDraggedControl.$(), $DroppedControl = oDroppedControl.$(), iAggregationDropIndex = 0, bRtl = sap.ui.getCore().getConfiguration().getRTL(), bIsDropPositionBefore = sDropPosition === INSERT_POSITION_BEFORE; if (bRtl && !bIgnoreRTL) { if (bIsDropPositionBefore) { iAggregationDropIndex = iBeginDragIndex < iDropIndex ? iDropIndex : iDropIndex + 1; sInsertAfterBeforePosition = INSERT_AFTER; } else { iAggregationDropIndex = iBeginDragIndex < iDropIndex ? iDropIndex - 1 : iDropIndex; sInsertAfterBeforePosition = INSERT_BEFORE; } } else { if (bIsDropPositionBefore) { iAggregationDropIndex = iBeginDragIndex < iDropIndex ? iDropIndex - 1 : iDropIndex; sInsertAfterBeforePosition = INSERT_BEFORE; } else { iAggregationDropIndex = iBeginDragIndex < iDropIndex ? iDropIndex : iDropIndex + 1; sInsertAfterBeforePosition = INSERT_AFTER; } } IconTabBarDragAndDropUtil._insertControl(sInsertAfterBeforePosition, $DraggedControl, $DroppedControl); IconTabBarDragAndDropUtil._handleConfigurationAfterDragAndDrop.call(context, oDraggedControl, iAggregationDropIndex); }
[ "function", "(", "context", ",", "sDropPosition", ",", "oDraggedControl", ",", "oDroppedControl", ",", "bIgnoreRTL", ")", "{", "var", "iBeginDragIndex", "=", "context", ".", "indexOfItem", "(", "oDraggedControl", ")", ",", "iDropIndex", "=", "context", ".", "indexOfItem", "(", "oDroppedControl", ")", ",", "$DraggedControl", "=", "oDraggedControl", ".", "$", "(", ")", ",", "$DroppedControl", "=", "oDroppedControl", ".", "$", "(", ")", ",", "iAggregationDropIndex", "=", "0", ",", "bRtl", "=", "sap", ".", "ui", ".", "getCore", "(", ")", ".", "getConfiguration", "(", ")", ".", "getRTL", "(", ")", ",", "bIsDropPositionBefore", "=", "sDropPosition", "===", "INSERT_POSITION_BEFORE", ";", "if", "(", "bRtl", "&&", "!", "bIgnoreRTL", ")", "{", "if", "(", "bIsDropPositionBefore", ")", "{", "iAggregationDropIndex", "=", "iBeginDragIndex", "<", "iDropIndex", "?", "iDropIndex", ":", "iDropIndex", "+", "1", ";", "sInsertAfterBeforePosition", "=", "INSERT_AFTER", ";", "}", "else", "{", "iAggregationDropIndex", "=", "iBeginDragIndex", "<", "iDropIndex", "?", "iDropIndex", "-", "1", ":", "iDropIndex", ";", "sInsertAfterBeforePosition", "=", "INSERT_BEFORE", ";", "}", "}", "else", "{", "if", "(", "bIsDropPositionBefore", ")", "{", "iAggregationDropIndex", "=", "iBeginDragIndex", "<", "iDropIndex", "?", "iDropIndex", "-", "1", ":", "iDropIndex", ";", "sInsertAfterBeforePosition", "=", "INSERT_BEFORE", ";", "}", "else", "{", "iAggregationDropIndex", "=", "iBeginDragIndex", "<", "iDropIndex", "?", "iDropIndex", ":", "iDropIndex", "+", "1", ";", "sInsertAfterBeforePosition", "=", "INSERT_AFTER", ";", "}", "}", "IconTabBarDragAndDropUtil", ".", "_insertControl", "(", "sInsertAfterBeforePosition", ",", "$DraggedControl", ",", "$DroppedControl", ")", ";", "IconTabBarDragAndDropUtil", ".", "_handleConfigurationAfterDragAndDrop", ".", "call", "(", "context", ",", "oDraggedControl", ",", "iAggregationDropIndex", ")", ";", "}" ]
Handles drop event. @param {object} context from which context function is called (sap.m.IconTabHeader or sap.m.IconTabSelectList) @param {String} sDropPosition comes from drop event, it can be "Before" or "After" @param {object} oDraggedControl control that is being dragged @param {object} oDroppedControl control that the dragged control will be dropped on @param {boolean} bIgnoreRTL should RTL configuration be ignored for drag and drop logic
[ "Handles", "drop", "event", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/IconTabBarDragAndDropUtil.js#L47-L76
3,798
SAP/openui5
src/sap.m/src/sap/m/IconTabBarDragAndDropUtil.js
function () { var oIconTabHeaderItems = this.getItems(), iAriaPointSet = 1, oItemDom; oIconTabHeaderItems.forEach(function (oItem) { oItemDom = oItem.getDomRef(); if (oItemDom && oItemDom.getAttribute("aria-posinset") !== null) { oItemDom.setAttribute("aria-posinset", iAriaPointSet++); } }); }
javascript
function () { var oIconTabHeaderItems = this.getItems(), iAriaPointSet = 1, oItemDom; oIconTabHeaderItems.forEach(function (oItem) { oItemDom = oItem.getDomRef(); if (oItemDom && oItemDom.getAttribute("aria-posinset") !== null) { oItemDom.setAttribute("aria-posinset", iAriaPointSet++); } }); }
[ "function", "(", ")", "{", "var", "oIconTabHeaderItems", "=", "this", ".", "getItems", "(", ")", ",", "iAriaPointSet", "=", "1", ",", "oItemDom", ";", "oIconTabHeaderItems", ".", "forEach", "(", "function", "(", "oItem", ")", "{", "oItemDom", "=", "oItem", ".", "getDomRef", "(", ")", ";", "if", "(", "oItemDom", "&&", "oItemDom", ".", "getAttribute", "(", "\"aria-posinset\"", ")", "!==", "null", ")", "{", "oItemDom", ".", "setAttribute", "(", "\"aria-posinset\"", ",", "iAriaPointSet", "++", ")", ";", "}", "}", ")", ";", "}" ]
Recalculates and sets the correct aria-posinset attribute value. @private
[ "Recalculates", "and", "sets", "the", "correct", "aria", "-", "posinset", "attribute", "value", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/IconTabBarDragAndDropUtil.js#L82-L93
3,799
SAP/openui5
src/sap.m/src/sap/m/IconTabBarDragAndDropUtil.js
function (oDraggedControl, iDropIndex) { this.removeAggregation('items', oDraggedControl, true); this.insertAggregation('items', oDraggedControl, iDropIndex, true); IconTabBarDragAndDropUtil._updateAccessibilityInfo.call(this); }
javascript
function (oDraggedControl, iDropIndex) { this.removeAggregation('items', oDraggedControl, true); this.insertAggregation('items', oDraggedControl, iDropIndex, true); IconTabBarDragAndDropUtil._updateAccessibilityInfo.call(this); }
[ "function", "(", "oDraggedControl", ",", "iDropIndex", ")", "{", "this", ".", "removeAggregation", "(", "'items'", ",", "oDraggedControl", ",", "true", ")", ";", "this", ".", "insertAggregation", "(", "'items'", ",", "oDraggedControl", ",", "iDropIndex", ",", "true", ")", ";", "IconTabBarDragAndDropUtil", ".", "_updateAccessibilityInfo", ".", "call", "(", "this", ")", ";", "}" ]
Handles aggregation of control after drag and drop. @param {object} oDraggedControl Dragged control @param {number} iDropIndex Drop index @private
[ "Handles", "aggregation", "of", "control", "after", "drag", "and", "drop", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/IconTabBarDragAndDropUtil.js#L101-L105