Java implementation and example of Freebase