@classmethod
    def add_model(cls, model_name, model_type,
                  model_methods=ALL_MODEL_METHODS):
        xml_name = convert_to_valid_xml_name(model_name)
        if(xml_name == METADATA_PATH):
            raise ValueError("cannot use name %s" % METADATA_PATH)
        if(model_name in cls.model_handlers):
            raise KeyError("name %s already used" % model_name)
        if(not issubclass(model_type, db.Model)):
            raise ValueError("given model type %s is not a subclass of Model" %
                             model_type)
        cls.model_handlers[xml_name] = ModelHandler(model_name, model_type,
                                                    model_methods)
        logging.info("added model %s with type %s for methods %s", model_name,
                     model_type, model_methods)

    ##
    # Error codes used in this handler:
    #
    # 200 -> okay
    # 204 -> noop (okay)
    # 400 -> bad req (bad data, invalid properties)
    # 404 -> not found (bad path)
    # 405 -> method not allowed (method not supported by model)
    ##
Filter `choosers` and `alternatives` for prediction.
dataset/ETHPy150Open jahlborn/appengine-rest-server/src/main/python/rest/__init__.py/Dispatcher.add_model--crossover with--dataset/ETHPy150Open UDST/urbansim/urbansim/models/dcm.py/MNLDiscreteChoiceModel.apply_predict_filters