public CategoryOverview getCategories ( ) { ClientResource resource = new ClientResource ( Route . ALL_CATEGORY . url ( ) ) ; try { Representation repr = resource . get ( ) ; return mapper . readValue ( repr . getText ( ) , CategoryOverview . class ) ; } catch ( IOException ex ) { LEX4JLogger . log ( Level . WARNING , "Could not retrieve the categories correctly!" ) ; return null ; } }
Returns all the categories