src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js
function (o, oExtension, sTypeClass) {
			switch (oExtension.name) {
				case "aggregation-role":
					if (oExtension.value === "dimension") {
						o["com.sap.vocabularies.Analytics.v1.Dimension"] = oBoolTrue;
					} else if (oExtension.value === "measure") {
						o["com.sap.vocabularies.Analytics.v1.Measure"] = oBoolTrue;
					}
					break;
				case "display-format":
					if (oExtension.value === "NonNegative") {
						o["com.sap.vocabularies.Common.v1.IsDigitSequence"] = oBoolTrue;
					} else if (oExtension.value === "UpperCase") {
						o["com.sap.vocabularies.Common.v1.IsUpperCase"] = oBoolTrue;
					}
					break;
				case "pageable":
				case "topable":
					Utils.addEntitySetAnnotation(o, oExtension, sTypeClass, "false", false);
					break;
				case "creatable":
					Utils.addEntitySetAnnotation(o, oExtension, sTypeClass, "false", true);
					break;
				case "deletable":
				case "deletable-path":
					Utils.handleXableAndXablePath(o, oExtension, sTypeClass,
						"Org.OData.Capabilities.V1.DeleteRestrictions", "Deletable");
					break;
				case "updatable":
				case "updatable-path":
					Utils.handleXableAndXablePath(o, oExtension, sTypeClass,
						"Org.OData.Capabilities.V1.UpdateRestrictions", "Updatable");
					break;
				case "requires-filter":
					Utils.addEntitySetAnnotation(o, oExtension, sTypeClass, "true", true);
					break;
				case "field-control":
					o["com.sap.vocabularies.Common.v1.FieldControl"]
						= { "Path" : oExtension.value };
					break;
				case "heading":
					o["com.sap.vocabularies.Common.v1.Heading"] = { "String" : oExtension.value };
					break;
				case "label":
					o["com.sap.vocabularies.Common.v1.Label"] = { "String" : oExtension.value };
					break;
				case "precision":
					o["Org.OData.Measures.V1.Scale"] = { "Path" : oExtension.value };
					break;
				case "quickinfo":
					o["com.sap.vocabularies.Common.v1.QuickInfo"] =
						{ "String" : oExtension.value };
					break;
				case "text":
					o["com.sap.vocabularies.Common.v1.Text"] = { "Path" : oExtension.value };
					break;
				case "visible":
					if (oExtension.value === "false") {
						o["com.sap.vocabularies.Common.v1.FieldControl"] = {
							"EnumMember" : "com.sap.vocabularies.Common.v1.FieldControlType/Hidden"
						};
						o["com.sap.vocabularies.UI.v1.Hidden"] = oBoolTrue;
					}
					break;
				default:
					// no transformation for V2 annotation supported or necessary
			}
		}
function (o, oExtension, sTypeClass) {
			switch (oExtension.name) {
				case "aggregation-role":
					if (oExtension.value === "dimension") {
						o["com.sap.vocabularies.Analytics.v1.Dimension"] = oBoolTrue;
					} else if (oExtension.value === "measure") {
						o["com.sap.vocabularies.Analytics.v1.Measure"] = oBoolTrue;
					}
					break;
				case "display-format":
					if (oExtension.value === "NonNegative") {
						o["com.sap.vocabularies.Common.v1.IsDigitSequence"] = oBoolTrue;
					} else if (oExtension.value === "UpperCase") {
						o["com.sap.vocabularies.Common.v1.IsUpperCase"] = oBoolTrue;
					}
					break;
				case "pageable":
				case "topable":
					Utils.addEntitySetAnnotation(o, oExtension, sTypeClass, "false", false);
					break;
				case "creatable":
					Utils.addEntitySetAnnotation(o, oExtension, sTypeClass, "false", true);
					break;
				case "deletable":
				case "deletable-path":
					Utils.handleXableAndXablePath(o, oExtension, sTypeClass,
						"Org.OData.Capabilities.V1.DeleteRestrictions", "Deletable");
					break;
				case "updatable":
				case "updatable-path":
					Utils.handleXableAndXablePath(o, oExtension, sTypeClass,
						"Org.OData.Capabilities.V1.UpdateRestrictions", "Updatable");
					break;
				case "requires-filter":
					Utils.addEntitySetAnnotation(o, oExtension, sTypeClass, "true", true);
					break;
				case "field-control":
					o["com.sap.vocabularies.Common.v1.FieldControl"]
						= { "Path" : oExtension.value };
					break;
				case "heading":
					o["com.sap.vocabularies.Common.v1.Heading"] = { "String" : oExtension.value };
					break;
				case "label":
					o["com.sap.vocabularies.Common.v1.Label"] = { "String" : oExtension.value };
					break;
				case "precision":
					o["Org.OData.Measures.V1.Scale"] = { "Path" : oExtension.value };
					break;
				case "quickinfo":
					o["com.sap.vocabularies.Common.v1.QuickInfo"] =
						{ "String" : oExtension.value };
					break;
				case "text":
					o["com.sap.vocabularies.Common.v1.Text"] = { "Path" : oExtension.value };
					break;
				case "visible":
					if (oExtension.value === "false") {
						o["com.sap.vocabularies.Common.v1.FieldControl"] = {
							"EnumMember" : "com.sap.vocabularies.Common.v1.FieldControlType/Hidden"
						};
						o["com.sap.vocabularies.UI.v1.Hidden"] = oBoolTrue;
					}
					break;
				default:
					// no transformation for V2 annotation supported or necessary
			}
		}
function ( o , oExtension , sTypeClass ) { switch ( oExtension . name ) { case "aggregation-role" : if ( oExtension . value === "dimension" ) { o [ "com.sap.vocabularies.Analytics.v1.Dimension" ] = oBoolTrue ; } else if ( oExtension . value === "measure" ) { o [ "com.sap.vocabularies.Analytics.v1.Measure" ] = oBoolTrue ; } break ; case "display-format" : if ( oExtension . value === "NonNegative" ) { o [ "com.sap.vocabularies.Common.v1.IsDigitSequence" ] = oBoolTrue ; } else if ( oExtension . value === "UpperCase" ) { o [ "com.sap.vocabularies.Common.v1.IsUpperCase" ] = oBoolTrue ; } break ; case "pageable" : case "topable" : Utils . addEntitySetAnnotation ( o , oExtension , sTypeClass , "false" , false ) ; break ; case "creatable" : Utils . addEntitySetAnnotation ( o , oExtension , sTypeClass , "false" , true ) ; break ; case "deletable" : case "deletable-path" : Utils . handleXableAndXablePath ( o , oExtension , sTypeClass , "Org.OData.Capabilities.V1.DeleteRestrictions" , "Deletable" ) ; break ; case "updatable" : case "updatable-path" : Utils . handleXableAndXablePath ( o , oExtension , sTypeClass , "Org.OData.Capabilities.V1.UpdateRestrictions" , "Updatable" ) ; break ; case "requires-filter" : Utils . addEntitySetAnnotation ( o , oExtension , sTypeClass , "true" , true ) ; break ; case "field-control" : o [ "com.sap.vocabularies.Common.v1.FieldControl" ] = { "Path" : oExtension . value } ; break ; case "heading" : o [ "com.sap.vocabularies.Common.v1.Heading" ] = { "String" : oExtension . value } ; break ; case "label" : o [ "com.sap.vocabularies.Common.v1.Label" ] = { "String" : oExtension . value } ; break ; case "precision" : o [ "Org.OData.Measures.V1.Scale" ] = { "Path" : oExtension . value } ; break ; case "quickinfo" : o [ "com.sap.vocabularies.Common.v1.QuickInfo" ] = { "String" : oExtension . value } ; break ; case "text" : o [ "com.sap.vocabularies.Common.v1.Text" ] = { "Path" : oExtension . value } ; break ; case "visible" : if ( oExtension . value === "false" ) { o [ "com.sap.vocabularies.Common.v1.FieldControl" ] = { "EnumMember" : "com.sap.vocabularies.Common.v1.FieldControlType/Hidden" } ; o [ "com.sap.vocabularies.UI.v1.Hidden" ] = oBoolTrue ; } break ; default : // no transformation for V2 annotation supported or necessary } }
Adds the corresponding V4 annotation to the given object based on the given SAP
extension.

@param {object} o
any object
@param {object} oExtension
the SAP Annotation (OData Version 2.0) for which a V4 annotation needs to be added
@param {string} sTypeClass
the type class of the given object; supported type classes are "Property" and
"EntitySet"
Adds the corresponding V4 annotation to the given object based on the given SAP extension .