src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js
function (oAnnotations, oData, oMetaModel) {
			var aSchemas = oData.dataServices.schema;

			if (!aSchemas) {
				return;
			}
			aSchemas.forEach(function (oSchema, i) {
				var sSchemaVersion;

				// remove datajs artefact for inline annotations in $metadata
				delete oSchema.annotations;

				Utils.liftSAPData(oSchema);
				oSchema.$path = "/dataServices/schema/" + i;
				sSchemaVersion = oSchema["sap:schema-version"];
				if (sSchemaVersion) {
					oSchema["Org.Odata.Core.V1.SchemaVersion"] = {
						String : sSchemaVersion
					};
				}
				jQuery.extend(oSchema, oAnnotations[oSchema.namespace]);

				Utils.visitParents(oSchema, oAnnotations, "association",
					function (oAssociation, mChildAnnotations) {
						Utils.visitChildren(oAssociation.end, mChildAnnotations);
					});

				Utils.visitParents(oSchema, oAnnotations, "complexType",
					function (oComplexType, mChildAnnotations) {
						Utils.visitChildren(oComplexType.property, mChildAnnotations, "Property");
						Utils.addSapSemantics(oComplexType);
					});

				// visit all entity types before visiting the entity sets to ensure that V2
				// annotations are already lifted up and can be used for calculating entity
				// set annotations which are based on V2 annotations on entity properties
				Utils.visitParents(oSchema, oAnnotations, "entityType", Utils.visitEntityType);

				Utils.visitParents(oSchema, oAnnotations, "entityContainer",
					function (oEntityContainer, mChildAnnotations) {
						Utils.visitChildren(oEntityContainer.associationSet, mChildAnnotations);
						Utils.visitChildren(oEntityContainer.entitySet, mChildAnnotations,
							"EntitySet", aSchemas);
						Utils.visitChildren(oEntityContainer.functionImport, mChildAnnotations,
							"", null, Utils.visitParameters.bind(this,
								oAnnotations, oSchema, oEntityContainer));
					});
			});
			Utils.addUnitAnnotations(aSchemas, oMetaModel);
		}
function (oAnnotations, oData, oMetaModel) {
			var aSchemas = oData.dataServices.schema;

			if (!aSchemas) {
				return;
			}
			aSchemas.forEach(function (oSchema, i) {
				var sSchemaVersion;

				// remove datajs artefact for inline annotations in $metadata
				delete oSchema.annotations;

				Utils.liftSAPData(oSchema);
				oSchema.$path = "/dataServices/schema/" + i;
				sSchemaVersion = oSchema["sap:schema-version"];
				if (sSchemaVersion) {
					oSchema["Org.Odata.Core.V1.SchemaVersion"] = {
						String : sSchemaVersion
					};
				}
				jQuery.extend(oSchema, oAnnotations[oSchema.namespace]);

				Utils.visitParents(oSchema, oAnnotations, "association",
					function (oAssociation, mChildAnnotations) {
						Utils.visitChildren(oAssociation.end, mChildAnnotations);
					});

				Utils.visitParents(oSchema, oAnnotations, "complexType",
					function (oComplexType, mChildAnnotations) {
						Utils.visitChildren(oComplexType.property, mChildAnnotations, "Property");
						Utils.addSapSemantics(oComplexType);
					});

				// visit all entity types before visiting the entity sets to ensure that V2
				// annotations are already lifted up and can be used for calculating entity
				// set annotations which are based on V2 annotations on entity properties
				Utils.visitParents(oSchema, oAnnotations, "entityType", Utils.visitEntityType);

				Utils.visitParents(oSchema, oAnnotations, "entityContainer",
					function (oEntityContainer, mChildAnnotations) {
						Utils.visitChildren(oEntityContainer.associationSet, mChildAnnotations);
						Utils.visitChildren(oEntityContainer.entitySet, mChildAnnotations,
							"EntitySet", aSchemas);
						Utils.visitChildren(oEntityContainer.functionImport, mChildAnnotations,
							"", null, Utils.visitParameters.bind(this,
								oAnnotations, oSchema, oEntityContainer));
					});
			});
			Utils.addUnitAnnotations(aSchemas, oMetaModel);
		}
function ( oAnnotations , oData , oMetaModel ) { var aSchemas = oData . dataServices . schema ; if ( ! aSchemas ) { return ; } aSchemas . forEach ( function ( oSchema , i ) { var sSchemaVersion ; // remove datajs artefact for inline annotations in $metadata delete oSchema . annotations ; Utils . liftSAPData ( oSchema ) ; oSchema . $path = "/dataServices/schema/" + i ; sSchemaVersion = oSchema [ "sap:schema-version" ] ; if ( sSchemaVersion ) { oSchema [ "Org.Odata.Core.V1.SchemaVersion" ] = { String : sSchemaVersion } ; } jQuery . extend ( oSchema , oAnnotations [ oSchema . namespace ] ) ; Utils . visitParents ( oSchema , oAnnotations , "association" , function ( oAssociation , mChildAnnotations ) { Utils . visitChildren ( oAssociation . end , mChildAnnotations ) ; } ) ; Utils . visitParents ( oSchema , oAnnotations , "complexType" , function ( oComplexType , mChildAnnotations ) { Utils . visitChildren ( oComplexType . property , mChildAnnotations , "Property" ) ; Utils . addSapSemantics ( oComplexType ) ; } ) ; // visit all entity types before visiting the entity sets to ensure that V2 // annotations are already lifted up and can be used for calculating entity // set annotations which are based on V2 annotations on entity properties Utils . visitParents ( oSchema , oAnnotations , "entityType" , Utils . visitEntityType ) ; Utils . visitParents ( oSchema , oAnnotations , "entityContainer" , function ( oEntityContainer , mChildAnnotations ) { Utils . visitChildren ( oEntityContainer . associationSet , mChildAnnotations ) ; Utils . visitChildren ( oEntityContainer . entitySet , mChildAnnotations , "EntitySet" , aSchemas ) ; Utils . visitChildren ( oEntityContainer . functionImport , mChildAnnotations , "" , null , Utils . visitParameters . bind ( this , oAnnotations , oSchema , oEntityContainer ) ) ; } ) ; } ) ; Utils . addUnitAnnotations ( aSchemas , oMetaModel ) ; }
Merges the given annotation data into the given metadata and lifts SAPData extensions.

@param {object} oAnnotations
annotations "JSON"
@param {object} oData
metadata "JSON"
@param {sap.ui.model.odata.ODataMetaModel} oMetaModel
the metamodel
Merges the given annotation data into the given metadata and lifts SAPData extensions .