String className = publication.getClass().getName(); Integer lastPoint = className.lastIndexOf("."); String type = className.substring(lastPoint + 1);
String type = publication.getClass().getSimpleName();
    private String getPublicationTypeString(ResultPublication publication) {        String className = publication.getClass().getName();        Integer lastPoint = className.lastIndexOf(".");        String type = className.substring(lastPoint + 1);        if (type.equals("BookPart")) {            //add bookPart type            type = type + "." + ((BookPart) publication).getBookPartType().toString();        }        return type;    }