function fetchExpandedTypes(sBaseMetaPath, mQueryOptions) {
			if (mQueryOptions && mQueryOptions.$expand) {
				Object.keys(mQueryOptions.$expand).forEach(function (sNavigationPath) {
					var sMetaPath = sBaseMetaPath;

					sNavigationPath.split("/").forEach(function (sSegment) {
						sMetaPath += "/" + sSegment;
						fetchType(sMetaPath);
					});
					fetchExpandedTypes(sMetaPath, mQueryOptions.$expand[sNavigationPath]);
				});
			}
		}
function fetchExpandedTypes(sBaseMetaPath, mQueryOptions) {
			if (mQueryOptions && mQueryOptions.$expand) {
				Object.keys(mQueryOptions.$expand).forEach(function (sNavigationPath) {
					var sMetaPath = sBaseMetaPath;

					sNavigationPath.split("/").forEach(function (sSegment) {
						sMetaPath += "/" + sSegment;
						fetchType(sMetaPath);
					});
					fetchExpandedTypes(sMetaPath, mQueryOptions.$expand[sNavigationPath]);
				});
			}
		}
function fetchExpandedTypes ( sBaseMetaPath , mQueryOptions ) { if ( mQueryOptions && mQueryOptions . $expand ) { Object . keys ( mQueryOptions . $expand ) . forEach ( function ( sNavigationPath ) { var sMetaPath = sBaseMetaPath ; sNavigationPath . split ( "/" ) . forEach ( function ( sSegment ) { sMetaPath += "/" + sSegment ; fetchType ( sMetaPath ) ; } ) ; fetchExpandedTypes ( sMetaPath , mQueryOptions . $expand [ sNavigationPath ] ) ; } ) ; } }
/*
Recursively calls fetchType for all (sub)paths in $expand.
@param {string} sBaseMetaPath The resource meta path + entity path
@param {object} [mQueryOptions] The corresponding query options
/ * Recursively calls fetchType for all ( sub ) paths in $expand .
Fetch all the expanded types