class AbstractImportProcess implements Closeable {

    protected final SpreadsheetGeneralConfiguration generalConfig;
    protected final ContainerLoader container;
    protected final Report report;
    protected final ProgressTicket progressTicket;
    protected final SheetParser parser;
    protected final Map<String, Integer> specialColumnsIndexMap = new HashMap<>();
    protected final Map<String, Integer> headersIndexMap = new HashMap<>();
    protected final Map<String, Class> headersClassMap = new HashMap<>();
    protected boolean cancel = false;

    public AbstractImportProcess(SpreadsheetGeneralConfiguration generalConfig, ContainerLoader container,
                                 ProgressTicket progressTicket, SheetParser parser) {
        this.generalConfig = generalConfig;
        this.container = container;
        this.progressTicket = progressTicket;
        this.parser = parser;

        this.report = new Report();

        container.setFillLabelWithId(false);
    }

    public abstract boolean execute();

    protected void setupColumnsIndexesAndFindSpecialColumns(List<String> specialColumnNames,
                                                            Map<String, Class> columnsClasses) {
        Map<String, Integer> headerMap = parser.getHeaderMap();
        Set<String> lowerCaseHeaders = new HashSet<>();
        for (Map.Entry<String, Integer> entry : headerMap.entrySet()) {
            String headerName = entry.getKey().trim();
            int currentIndex = entry.getValue();
            boolean isSpecialColumn = false;

            //Only add columns that have a class defined by the user. This also allows to filter the input columns
            if (!columnsClasses.containsKey(headerName)) {
                continue;
            }

            //First check for repeated columns:
            if (lowerCaseHeaders.contains(headerName.toLowerCase())) {
                logError(getMessage("AbstractImportProcess.error.repeatedColumn", headerName));
                continue;
            } else {
                lowerCaseHeaders.add(headerName.toLowerCase());
            }

            //Then check for special columns:
            for (String specialColumnName : specialColumnNames) {
                if (headerName.equalsIgnoreCase(specialColumnName)) {
                    specialColumnsIndexMap.put(specialColumnName, currentIndex);

                    isSpecialColumn = true;
                    break;
                }
            }

            if (isSpecialColumn) {
                continue;
            }

            Class type = columnsClasses.get(headerName);
            headersClassMap.put(headerName, type);
            headersIndexMap.put(headerName, currentIndex);
            addColumn(headerName, type);
        }
    }

    protected Object parseValue(String value, Class type, String column) {<FILL_FUNCTION_BODY>}

    protected boolean checkRow(SheetRow row) {
        boolean consistent = row.isConsistent();
        if (!consistent) {
            logError(getMessage("AbstractImportProcess.error.inconsistentRow"));
        }

        return consistent;
    }

    protected void addEdge(String source, String target) {
        addEdge(source, target, 1);
    }

    protected void addEdge(String source, String target, float weight) {
        NodeDraft sourceNode;
        if (!container.nodeExists(source)) {
            sourceNode = container.factory().newNodeDraft(source);
            container.addNode(sourceNode);
        } else {
            sourceNode = container.getNode(source);
        }

        NodeDraft targetNode;
        if (!container.nodeExists(target)) {
            targetNode = container.factory().newNodeDraft(target);
            container.addNode(targetNode);
        } else {
            targetNode = container.getNode(target);
        }

        EdgeDraft edge = container.factory().newEdgeDraft();
        edge.setSource(sourceNode);
        edge.setTarget(targetNode);
        edge.setWeight(weight);
        container.addEdge(edge);
    }

    public boolean cancel() {
        return cancel = true;
    }

    protected void logInfo(String message) {
        SpreadsheetUtils.logInfo(report, message, parser);
    }

    protected void logWarning(String message) {
        SpreadsheetUtils.logWarning(report, message, parser);
    }

    protected void logError(String message) {
        SpreadsheetUtils.logError(report, message, parser);
    }

    @Override
    public void close() throws IOException {
        if (parser != null) {
            parser.close();
        }
    }

    public Report getReport() {
        return report;
    }

    protected String getMessage(String key) {
        return NbBundle.getMessage(getClass(), key);
    }

    protected String getMessage(String key, Object... params) {
        return NbBundle.getMessage(getClass(), key, params);
    }

    protected abstract void addColumn(String name, Class type);
}

        try {
            return AttributeUtils.parse(value, type);
        } catch (Exception e) {
            logError(getMessage("AbstractImportProcess.error.parseError", value, type.getSimpleName(), column));
            return null;
        }
    
<no_super_class>