adding support for mapping terms with arbitrary structure to Java references (work in progress)