Package br.edu.utfpr.cm.JGitMinerWeb.model.miner

Examples of br.edu.utfpr.cm.JGitMinerWeb.model.miner.EntityComment


            out.printLog(comments.size() + " comments");

            List<AuxUserUserDirectional> tempResultUsers = new ArrayList<>();

            for (int k = 0; k < comments.size(); k++) {
                EntityComment iCom = comments.get(k);
                for (int l = k - 1; l >= 0; l--) {
                    EntityComment jCom = comments.get(l);
                    if (iCom.getUser().equals(jCom.getUser())) {
                        break;
                    }
                    boolean contem = false;
                    AuxUserUserDirectional aux = new AuxUserUserDirectional(
                            iCom.getUser().getLogin(),
                            iCom.getUser().getEmail(),
                            jCom.getUser().getLogin(),
                            jCom.getUser().getEmail());
                    for (AuxUserUserDirectional a : tempResultUsers) {
                        if (a.equals(aux)) {
                            a.inc();
                            contem = true;
                            break;
View Full Code Here


        List<Comment> gitComments = CommentServices.getGitCommentsByIssue(gitRepo, issue.getNumber());
        out.printLog(gitComments.size() + " Comentários baixados.");
        int i = 0;
        while (!canceled && i < gitComments.size()) {
            Comment gitComment = gitComments.get(i);
            EntityComment comment = minerCommentOfIssue(gitComment);
            comment.setIssue(issue);
            dao.edit(comment);
            i++;
        }
    }
View Full Code Here

            i++;
        }
    }

    private EntityComment minerCommentOfIssue(Comment gitComment) {
        EntityComment comment = null;
        try {
            comment = CommentServices.createEntity(gitComment, dao);
            out.printLog("Comment gravado com sucesso: " + gitComment.getUrl() + " - ID: " + gitComment.getId());
            return comment;
        } catch (Exception ex) {
View Full Code Here

    public static EntityComment createEntity(Comment gitComment, GenericDao dao) {
        if (gitComment == null) {
            return null;
        }

        EntityComment comment = getCommentByIdComment(gitComment.getId(), dao);

        if (comment == null) {
            comment = new EntityComment();

            comment.setMineredAt(new Date());
            comment.setCreatedAt(gitComment.getCreatedAt());
            comment.setUpdatedAt(gitComment.getUpdatedAt());
            comment.setBody(JsfUtil.filterChar(gitComment.getBody()));
            comment.setBodyHtml(gitComment.getBodyHtml());
            comment.setBodyText(gitComment.getBodyText());
            comment.setIdComment(gitComment.getId());
            comment.setUrl(gitComment.getUrl());
            comment.setUser(UserServices.createEntity(gitComment.getUser(), dao, false));

            dao.insert(comment);
        }

        return comment;
View Full Code Here

            out.printLog(comments.size() + " comments");

            List<AuxUserUserDirectional> tempResultUsers = new ArrayList<>();

            for (int k = 0; k < comments.size(); k++) {
                EntityComment iCom = comments.get(k);
                for (int l = k - 1; l >= 0; l--) {
                    EntityComment jCom = comments.get(l);
                    if (iCom.getUser().equals(jCom.getUser())) {
                        break;
                    }
                    boolean contem = false;
                    AuxUserUserDirectional aux = new AuxUserUserDirectional(
                            iCom.getUser().getLogin(),
                            iCom.getUser().getEmail(),
                            jCom.getUser().getLogin(),
                            jCom.getUser().getEmail());
                    for (AuxUserUserDirectional a : tempResultUsers) {
                        if (a.equals(aux)) {
                            a.inc();
                            contem = true;
                            break;
View Full Code Here

            for (int k = 0; k < comments.size(); k++) {
//                if (k % 1000 == 0 || k == comments.size() - 1) {
//                    System.out.println(k + "/" + comments.size());
//                }
                EntityComment iCom = comments.get(k);
                for (int l = k - 1; l >= 0; l--) {
                    EntityComment jCom = comments.get(l);
                    if (iCom.getUser().equals(jCom.getUser())) {
                        break;
                    }
                    AuxUserUserDirectional aux = new AuxUserUserDirectional(
                            iCom.getUser().getLogin(),
                            iCom.getUser().getEmail(),
                            jCom.getUser().getLogin(),
                            jCom.getUser().getEmail());
                    if (tempResultUsers.containsKey(aux)) {
                        tempResultUsers.get(aux).inc();
                    } else {
                        tempResultUsers.put(aux, aux);
                    }
View Full Code Here

TOP

Related Classes of br.edu.utfpr.cm.JGitMinerWeb.model.miner.EntityComment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.