package Ġcom . fire zen k . k sp . domain čĊč Ċ import Ġcom . fire zen k . k sp . data . Response Classes č Ċ import Ġjava . text . DateFormat č Ċ import Ġjava . util . Locale čĊč Ċ class ĠFore cast Data Mapper Ġ{ čĊčĊĠĠĠ Ġfun Ġconvert From DataModel ( forecast : ĠResponse Classes . Forecast Result ) Ġ: ĠFore cast List Ġ{ čĊĠĠĠĠĠĠĠ Ġreturn ĠFore cast List ( forecast . city . name , Ġforecast . city . country , Ġconvert Forecast List To Domain ( forecast . list )) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġfun Ġconvert Forecast List To Domain ( list : ĠList < Response Classes . Forecast >): ĠList < Forecast > Ġ{ čĊĠĠĠĠĠĠĠ Ġreturn Ġlist . map Ġ{ Ġconvert Forecast Item To Domain ( it ) Ġ} čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġfun Ġconvert Forecast Item To Domain ( forecast : ĠResponse Classes . Forecast ): ĠFore cast Ġ{ čĊĠĠĠĠĠĠĠ Ġreturn ĠFore cast ( convert Date ( forecast . dt ), Ġforecast . weather [ 0 ]. description , čĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġforecast . temp . max . toInt (), Ġforecast . temp . min . toInt ()) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġfun Ġconvert Date ( date : ĠLong ) Ġ: ĠString Ġ{ čĊĠĠĠĠĠĠĠ Ġval Ġdf Ġ= ĠDate Format . getDate Instance ( DateFormat . MEDIUM , ĠLocale . getDefault ()) čĊĠĠĠĠĠĠĠ Ġreturn Ġdf . format ( date Ġ* Ġ 1 0 0 0 ) čĊĠĠĠ Ġ} č Ċ } čĊ