Man with hatchet charged with attempted murder on officer