@doc>
An object containing information about a %PROD% model
(c) SAP AG 2003-2006. All rights reserved.
#INCLUDE[gml:defs.inc]
Class ModelInfo;
<@doc>
Creates a new ModelInfo object
The model urn
The model display name
The model's status
The model's type, the production kit url
constructor (modelUrn, modelName, modelStatus, modelType, isDTRModel, isCheckedOut, isSynced)
this.modelUrn = modelUrn;
this.modelName = modelName || '';
this.modelStatus = modelStatus || '';
this.modelType = modelType || '';
this.isDTRModel = isDTRModel || false;
this.isCheckedOut = isCheckedOut || false;
this.isSynced = isSynced || false;
this.normalize();
end
<@doc>Gets the model urn
readonly property modelUrn = '';
<@doc>Gets the model display name
readonly property modelName = '';
<@doc>Gets the model's status
readonly property modelStatus = '';
<@doc>Gets the model's type
readonly property modelType = '';
<@doc>Normalizes the model information
method normalize() {
if (!this.modelUrn) return;
this.modelUrn = this.modelUrn.replace(/^gkb\:/i,'');
if (!this.modelName) this.modelName = this.modelUrn.replace(/Local development\./gim, '').replace(/DTR\.[\w\-\!\~\$]+\./gim, '').replace(/\.\w+$/,'').replace(/0x([0-9][a-f])/gim,function(g1, g2) {return unescape('%'+g2);});
if (!this.modelStatus) this.modelStatus = #[LOCAL];
}