/* Ċ Ġ* ĠCopyright Ġ 2 0 2 2 ĠAnd rÃ© ĠCla ÃŁ en Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠ Ġhttps :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġorg . burn out cre w . store k mp Ċ Ċ import Ġcom . dropbox . k mp . external . fs 3 . create Ċ import Ġcom . dropbox . k mp . external . fs 3 . filesystem . FileSystem Factory Ċ import Ġorg . burn out cre w . store k mp . repositories . Red dit Repository Ċ import Ġorg . burn out cre w . store k mp . data . local . Red dit Dao Ċ import Ġorg . burn out cre w . store k mp . data . remote . Data Fetcher Ċ import Ġorg . burn out cre w . store k mp . platform . Driver Factory Ċ import Ġorg . burn out cre w . store k mp . sql de light . data . Database Ċ import Ġorg . burn out cre w . store k mp . view models . Best Sub redd its ViewModel Ċ import Ġorg . burn out cre w . store k mp . view models . Search Sub reddit ViewModel ĊĊ Ċ class ĠGraph Ġprivate Ġconstructor ( driver Factory : ĠDriver Factory , Ġstore FileSystem Root : ĠString ) Ġ{ ĊĠĠĠ Ġprivate Ġval Ġdatabase Ġ= ĠDatabase ( driver Factory . create Driver ()) ĊĠĠĠ Ġprivate Ġval Ġre dd it Dao Ġ= ĠRed dit Dao ( database ) ĊĠĠĠ Ġprivate Ġval Ġfetch er Ġ= ĠData Fetcher () ĊĠĠĠ Ġprivate Ġval Ġfile System Factory Ġ= ĠFileSystem Factory . create ( store FileSystem Root ) ĊĠĠĠ Ġprivate Ġval Ġrepository Ġ= ĠRed dit Repository ( fetcher , Ġre dd it Dao , Ġfile System Factory ) ĊĠĠĠ Ġfun Ġprovide Search Sub reddit ViewModel () Ġ= ĠSearch Sub reddit ViewModel ( repository ) ĊĠĠĠ Ġfun Ġprovide Best Sub redd its ViewModel () Ġ= ĠBest Sub redd its ViewModel ( repository ) ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ Throws ( Exception :: class ) ĊĠĠĠĠĠĠĠ Ġfun Ġcreate ( driver Factory : ĠDriver Factory , Ġstore FileSystem Root : ĠString ) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠGraph ( driver Factory , Ġstore FileSystem Root ) ĊĠĠĠ Ġ} Ċ }