def _init_object(self, catalog_id, proxy, runtime, db_name, cat_name, cat_class):
self._catalog_identifier = None<EOL>self._init_proxy_and_runtime(proxy, runtime)<EOL>uses_cataloging = False<EOL>if catalog_id is not None and catalog_id.get_identifier() != PHANTOM_ROOT_IDENTIFIER:<EOL><INDENT>self._catalog_identifier = catalog_id.get_identifier()<EOL>config = self._runtime.get_configuration()<EOL>parameter_id = Id('<STR_LIT>' + db_name + '<STR_LIT>')<EOL>try:<EOL><INDENT>provider_impl = config.get_value_by_parameter(parameter_id).get_string_value()<EOL><DEDENT>except (AttributeError, KeyError, errors.NotFound):<EOL><INDENT>collection = JSONClientValidated(db_name,<EOL>collection=cat_name,<EOL>runtime=self._runtime)<EOL>try:<EOL><INDENT>self._my_catalog_map = collection.find_one({'<STR_LIT>': ObjectId(self._catalog_identifier)})<EOL><DEDENT>except errors.NotFound:<EOL><INDENT>if catalog_id.get_identifier_namespace() != db_name + '<STR_LIT:.>' + cat_name:<EOL><INDENT>self._my_catalog_map = self._create_orchestrated_cat(catalog_id, db_name, cat_name)<EOL><DEDENT>else:<EOL><INDENT>raise errors.NotFound('<STR_LIT>' + catalog_id.get_identifier() + cat_name)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>uses_cataloging = True<EOL>cataloging_manager = self._runtime.get_manager('<STR_LIT>',<EOL>provider_impl)  <EOL>lookup_session = cataloging_manager.get_catalog_lookup_session()<EOL>self._catalog = lookup_session.get_catalog(catalog_id)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._catalog_identifier = PHANTOM_ROOT_IDENTIFIER<EOL>self._my_catalog_map = make_catalog_map(cat_name, identifier=self._catalog_identifier)<EOL><DEDENT>if not uses_cataloging:<EOL><INDENT>self._catalog = cat_class(osid_object_map=self._my_catalog_map, runtime=self._runtime, proxy=self._proxy)<EOL><DEDENT>self._catalog._authority = self._authority  <EOL>self._catalog_id = self._catalog.get_id()<EOL>self._forms = dict()<EOL>
Initialize this session an OsidObject based session.