Move repository type coding into the constructor

Apparently, there has to be an instance variable with name type. If
there is only a method type it will not be recognited by tire. Hence,
I have moved the CKAN type coding into the constructor.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>