UNPKG

@sap/odata-v4

Version:

OData V4.0 server library

43 lines (36 loc) 1.37 kB
'use strict'; const CsdlAnnotationExpression = require('../../csdl/annotationExpression/CsdlAnnotationExpression'); const EdmAnnotationExpression = require('./EdmAnnotationExpression'); const IllegalArgumentError = require('../../errors/IllegalArgumentError'); /** * * <a href="./../ODataSpecification/odata-v4.0-errata03-os/complete/part3-csdl/odata-v4.0-errata03-os-part3-csdl-complete.html#_Toc453752657"> * OData CSDL # 14.5.8 Expression edm:NavigationPropertyPath * </a> * * @extends EdmAnnotationExpression * @hideconstructor */ class EdmNavigationPropertyPathExpression extends EdmAnnotationExpression { /** * * @param {CsdlNavigationPropertyPathExpression} navigationPropertyPath */ constructor(navigationPropertyPath) { if (!navigationPropertyPath) { throw IllegalArgumentError.createForIllegalInstance('navigationPropertyPath', 'CsdlNavigationPropertyPathExpression'); } super(CsdlAnnotationExpression.kinds.NavigationPropertyPath); this._navigationPropertyPath = navigationPropertyPath; } /** * Returns the path to the navigation property * * @returns {string} */ getNavigationPropertyPath() { return this._navigationPropertyPath.navigationPropertyPath; } } module.exports = EdmNavigationPropertyPathExpression;