import { IAggregationGetterStrategy } from "../interfaces/IAggregationGetterStrategy" ; import { SAPNodeDAO } from "ui5plugin-parser/dist/classes/librarydata/SAPNodeDAO" ; import { SAPNode } from "ui5plugin-parser/dist/classes/librarydata/SAPNode" ; export class SAPNodeAggregationGetterStrategy implements IAggregationGetterStrategy { private static readonly _nodeDAO = new SAPNodeDAO ( ) ; private readonly _node : SAPNode ; constructor ( node ) { this . _node = node ; } getParent ( ) { let theParent ; if ( this . _node . node . extends ) { const parentNode = SAPNodeAggregationGetterStrategy . _nodeDAO . findNode ( this . _node . node . extends ) ; if ( parentNode ) { theParent = new SAPNodeAggregationGetterStrategy ( parentNode ) ; } } return theParent ; } getAggregations ( ) { return this . _node . getAggregations ( ) ; } getAggregation ( aggregation ) { return { name : aggregation . name , type : aggregation . type } ; } }