Major UIEntity refactor and class extraction

git-svn-id: http://jira.uji.es/repos/uji/COM/uji-commons-rest/trunk@19441 e6edf6fb-f266-4316-afb4-e53d95876a76