def __init__(self, config): """ Initializes a resource object. :param root_uri: the base URL of Rexster. """ self.config = config self.registry = Registry(config) self.scripts = Scripts() dir_name = os.path.dirname(__file__) self.scripts.override(get_file_path(dir_name, "gremlin.groovy")) self.registry.add_scripts("gremlin", self.scripts) self.type_system, content_type = get_type_system(config) self.request = RexsterRequest(config, content_type=content_type)