Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TransformationService

Hierarchy

  • TransformationService

Index

Constructors

constructor

Properties

Private cds

Methods

getBusRealTimeData

getBusses

  • getBusses(filterValue?: string, filterField?: string): Observable<ViewBus[]>
  • Returns the IBus objects as ViewBus for the UI

    Parameters

    • Default value filterValue: string = null
    • Default value filterField: string = "id"

    Returns Observable<ViewBus[]>

    Observable containing the transformed stops that matched the given filter (if any)

getData

  • getData<D, V>(observableData: Observable<D[]>, constructingType: ViewObject, filterValue: string, filterField: string): Observable<V[]>

getFilter

  • getFilter<V>(filterValue?: string, filterField?: string): function
  • Generic filter method

    type

    V view data type to be filtered

    Type parameters

    • V

    Parameters

    • Default value filterValue: string = null
    • Default value filterField: string = "name"

    Returns function

    (data:V)=>boolean that returns true if the filterField value of data matches the RegEx /filterValue/i

      • (data: V): boolean
      • Parameters

        • data: V

        Returns boolean

getLines

  • getLines(filterValue?: string, filterField?: string): Observable<Array<ViewLine>>
  • Returns the Iline objects as ViewLine for the UI

    Parameters

    • Default value filterValue: string = null
    • Default value filterField: string = "id"

    Returns Observable<Array<ViewLine>>

    Observable containing the transformed stops that matched the given filter (if any)

getRoutes

  • getRoutes(filterValue?: string, filterField?: string): Observable<Array<ViewRoute>>
  • Returns the Iline objects as ViewLine for the UI

    Parameters

    • Default value filterValue: string = null
    • Default value filterField: string = "id"

    Returns Observable<Array<ViewRoute>>

    Observable containing the transformed stops that matched the given filter (if any)

getStops

  • getStops(filterValue?: string, filterField?: string): Observable<ViewStop[]>
  • Returns the IStop objects as ViewStop for the UI

    Parameters

    • Default value filterValue: string = null
    • Default value filterField: string = "name"

    Returns Observable<ViewStop[]>

    Observable containing the transformed stops that matched the given filter (if any)

updateTimeStamps

  • updateTimeStamps(): Observable<object>