'Load metadefinition json files to database'

@args('--path', metavar='<path>', help='Path    to    the    directory    or    file    where    json    metadata    is    stored')
@args('--merge', action='store_true', help='Merge    files    with    data    that    is    in    the    database.    By    default    it    prefers    existing    data    over    new.    This    logic    can    be    changed    by    combining    --merge    option    with    one    of    these    two    options:    --prefer_new    or    --overwrite.')
@args('--prefer_new', action='store_true', help='Prefer    new    metadata    over    existing.    Existing    metadata    might    be    overwritten.    Needs    to    be    combined    with    --merge    option.')
@args('--overwrite', action='store_true', help='Drop    and    rewrite    metadata.    Needs    to    be    combined    with    --merge    option')
def load_metadefs(self, path=None, merge=False, prefer_new=False, overwrite=False):

    metadata.db_load_metadefs(db_api.get_engine(), path, merge, prefer_new, overwrite)
