Package org.gephi.io.importer.api

Examples of org.gephi.io.importer.api.Issue


        int to = 1;
        double weight = 0;
        while (rowkonizer.hasMoreTokens()) {
            String toParse = (String) rowkonizer.nextToken();
            if (to > numNodes) {
                report.logIssue(new Issue(NbBundle.getMessage(ImporterDL.class, "importerDL_error_matrixentriescount", row, startTime, getLineNumber(pointer)), Issue.Level.SEVERE));
            }
            try {
                weight = Double.parseDouble(toParse);
            } catch (Exception e) {
                report.logIssue(new Issue(NbBundle.getMessage(ImporterDL.class, "importerDL_error_weightparseerror", toParse, startTime, getLineNumber(pointer)), Issue.Level.SEVERE));
            }

            if (weight != 0) {
                NodeDraft sourceNode = container.getNode("" + from);
                NodeDraft targetNode = container.getNode("" + to);
View Full Code Here


            }
            // increment the time step before starting next matrix
            startTime++;
        }
        if (startTime != numMatricies) {
            report.logIssue(new Issue(NbBundle.getMessage(ImporterDL.class, "importerDL_error_edgelistssetscount", startTime, numMatricies), Issue.Level.SEVERE));
        }
    }
View Full Code Here

        if (rowkonizer.hasMoreTokens()) {
            String weightParse = rowkonizer.nextToken();
            try {
                weight = Double.parseDouble(weightParse);
            } catch (Exception e) {
                report.logIssue(new Issue(NbBundle.getMessage(ImporterDL.class, "importerDL_error_edgeparseweight", weightParse, getLineNumber(pointer)), Issue.Level.WARNING));
            }
        }

        NodeDraft sourceNode = container.getNode(from);
        NodeDraft targetNode = container.getNode(to);
View Full Code Here

            return 1;
        }

        public Object getValueFor(Object node, int column) {
            if (node instanceof Issue) {
                Issue issue = (Issue) node;
                return issue.getLevel().toString();
            }
            return "";
        }
View Full Code Here

    }

    private class IssueRenderer implements RenderDataProvider {

        public String getDisplayName(Object o) {
            Issue issue = (Issue) o;
            return issue.getMessage();
        }
View Full Code Here

        public String getTooltipText(Object o) {
            return "";
        }

        public Icon getIcon(Object o) {
            Issue issue = (Issue) o;
            switch (issue.getLevel()) {
                case INFO:
                    return infoIcon;
                case WARNING:
                    return warningIcon;
                case SEVERE:
View Full Code Here

    public boolean filterEmail(Message message, String filter, Report report) {
        Date receivedDate = null;
        try {
            receivedDate = message.getReceivedDate();
        } catch (MessagingException ex) {
            report.logIssue(new Issue(ex.getMessage(), Issue.Level.WARNING));
            return true;
        }
        if(receivedDate == null){
            report.logIssue(new Issue("Can't get the receive date of message "+message+",ignore this filter", Issue.Level.INFO));
            return true;
        }
        SimpleDateFormat format = new SimpleDateFormat(EmailDataType.DATEFORMAT);

        Date dateFilter = null;
        try {
            dateFilter = format.parse(filter);
        } catch (ParseException ex) {
            report.logIssue(new Issue(ex.getMessage(), Issue.Level.WARNING));
            return true;
        }
        if(receivedDate.after(dateFilter))
            return true;
        else
View Full Code Here

    public boolean filterEmail(Message message, String filter, Report report) {
        Address[] address = null;
        try {
            address = message.getRecipients(Message.RecipientType.CC);
        } catch (MessagingException ex) {
            report.logIssue(new Issue(ex.getMessage(), Issue.Level.WARNING));
            return true;
        }
        if (Boolean.parseBoolean(filter)) {
            //condition is the message has cc
            if (address == null ||address.length == 0) {
View Full Code Here

        //filter to email address
        Address[] addresses = null;
        try {
            addresses = message.getRecipients(Message.RecipientType.TO);
        } catch (MessagingException ex) {
            report.logIssue(new Issue(ex.getMessage(), Issue.Level.WARNING));
            return true;
        }
        if(addresses == null){
            report.logIssue(new Issue("Can't get the bcc address of message "+message+",ignore this filter", Issue.Level.INFO));
            return true;
        }
        if(addresses.length == 0)
            return true;
        for (Address addr : addresses) {
View Full Code Here

    public boolean filterEmail(Message message, String filter, Report report) {
        Address[] address = null;
        try {
            address = message.getRecipients(Message.RecipientType.BCC);
        } catch (MessagingException ex) {
            report.logIssue(new Issue(ex.getMessage(), Issue.Level.WARNING));
            return true;
        }
        if (Boolean.parseBoolean(filter)) {
            //condition is the message has cc
            if (address == null ||address.length == 0) {
View Full Code Here

TOP

Related Classes of org.gephi.io.importer.api.Issue

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.