} catch (IndexOutOfBoundsException e) {
}
//Check error
if (columnName.isEmpty()) {
report.logIssue(new Issue(NbBundle.getMessage(ImporterGDF.class, "importerGDF_error_dataformat2"), Issue.Level.SEVERE));
columnName = "default" + i;
}
if (typeString.isEmpty()) {
report.logIssue(new Issue(NbBundle.getMessage(ImporterGDF.class, "importerGDF_error_dataformat6", columnName), Issue.Level.INFO));
typeString = "varchar";
}
//Clean parenthesis
typeString = typeString.replaceAll("\\([0-9]*\\)", "");
if (typeString.equals("varchar")) {
type = AttributeType.STRING;
} else if (typeString.equals("bool")) {
type = AttributeType.BOOLEAN;
} else if (typeString.equals("boolean")) {
type = AttributeType.BOOLEAN;
} else if (typeString.equals("integer")) {
type = AttributeType.INT;
} else if (typeString.equals("tinyint")) {
type = AttributeType.INT;
} else if (typeString.equals("int")) {
type = AttributeType.INT;
} else if (typeString.equals("double")) {
type = AttributeType.DOUBLE;
} else if (typeString.equals("float")) {
type = AttributeType.FLOAT;
} else {
report.logIssue(new Issue(NbBundle.getMessage(ImporterGDF.class, "importerGDF_error_dataformat5", typeString), Issue.Level.WARNING));
}
if (columnName.equals("x")) {
nodeColumns[i - 1] = new GDFColumn(GDFColumn.NodeGuessColumn.X);
report.log("Node property found: x");
} else if (columnName.equals("y")) {
nodeColumns[i - 1] = new GDFColumn(GDFColumn.NodeGuessColumn.Y);
report.log("Node property found: y");
} else if (columnName.equals("visible")) {
nodeColumns[i - 1] = new GDFColumn(GDFColumn.NodeGuessColumn.VISIBLE);
report.log("Node property found: visible");
} else if (columnName.equals("color")) {
nodeColumns[i - 1] = new GDFColumn(GDFColumn.NodeGuessColumn.COLOR);
report.log("Node property found: color");
} else if (columnName.equals("fixed")) {
nodeColumns[i - 1] = new GDFColumn(GDFColumn.NodeGuessColumn.FIXED);
report.log("Node property found: fixed");
} else if (columnName.equals("style")) {
nodeColumns[i - 1] = new GDFColumn(GDFColumn.NodeGuessColumn.STYLE);
report.log("Node property found: style");
} else if (columnName.equals("width")) {
nodeColumns[i - 1] = new GDFColumn(GDFColumn.NodeGuessColumn.WIDTH);
report.log("Node property found: width");
} else if (columnName.equals("height")) {
nodeColumns[i - 1] = new GDFColumn(GDFColumn.NodeGuessColumn.HEIGHT);
report.log("Node property found: height");
} else if (columnName.equals("label")) {
nodeColumns[i - 1] = new GDFColumn(GDFColumn.NodeGuessColumn.LABEL);
report.log("Node property found: label");
} else if (columnName.equals("labelvisible")) {
nodeColumns[i - 1] = new GDFColumn(GDFColumn.NodeGuessColumn.LABELVISIBLE);
report.log("Node property found: labelvisible");
} else {
AttributeTable nodeClass = container.getAttributeModel().getNodeTable();
if (!nodeClass.hasColumn(columnName)) {
AttributeColumn newColumn = nodeClass.addColumn(columnName, type);
nodeColumns[i - 1] = new GDFColumn(newColumn);
report.log("Node attribute " + columnName + " (" + type.getTypeString() + ")");
} else {
report.logIssue(new Issue(NbBundle.getMessage(ImporterGDF.class, "importerGDF_error_dataformat8", columnName), Issue.Level.SEVERE));
}
}
}
}