UNPKG

@sap/odata-v4

Version:

OData V4.0 server library

43 lines (35 loc) 1.21 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#_Toc453752659"> * OData CSDL # 14.5.13 Expression edm:PropertyPath * </a> * * @extends EdmAnnotationExpression * @hideconstructor */ class EdmPropertyPathExpression extends EdmAnnotationExpression { /** * @param {CsdlPropertyPathExpression} propertyPath */ constructor(propertyPath) { if (!propertyPath) { throw IllegalArgumentError.createForIllegalInstance('propertyPath', 'CsdlPropertyPathExpression'); } super(CsdlAnnotationExpression.kinds.PropertyPath); this._propertyPath = propertyPath; } /** * Returns the path to the referenced property * * @returns {string} */ getPropertyPath() { return this._propertyPath.propertyPath; } } module.exports = EdmPropertyPathExpression;