report.logIssue(new Issue(NbBundle.getMessage(ImporterGraphML.class, "importerGraphML_error_attributetype2", type), Issue.Level.SEVERE));
return;
}
//Add to model
ColumnDraft column = null;
if ("node".equalsIgnoreCase(forStr) || "all".equalsIgnoreCase(forStr)) {
if (container.getNodeColumn(id) != null) {
report.log(NbBundle.getMessage(ImporterGraphML.class, "importerGraphML_error_attributecolumn_exist", id));
return;
}
column = container.addNodeColumn(id, attributeType);
column.setTitle(title);
report.log(NbBundle.getMessage(ImporterGraphML.class, "importerGraphML_log_nodeattribute", title, attributeType.getCanonicalName()));
} else if ("edge".equalsIgnoreCase(forStr) || "all".equalsIgnoreCase(forStr)) {
if (container.getEdgeColumn(id) != null) {
report.log(NbBundle.getMessage(ImporterGraphML.class, "importerGraphML_error_attributecolumn_exist", id));
return;
}
column = container.addEdgeColumn(id, attributeType);
column.setTitle(title);
report.log(NbBundle.getMessage(ImporterGraphML.class, "importerGraphML_log_edgeattribute", title, attributeType.getCanonicalName()));
}
if (column != null && !defaultStr.isEmpty()) {
try {
column.setDefaultValueString(defaultStr);
report.log(NbBundle.getMessage(ImporterGraphML.class, "importerGraphML_log_default", defaultStr, title));
} catch (Exception e) {
report.logIssue(new Issue(NbBundle.getMessage(ImporterGraphML.class, "importerGraphML_error_attributedefault", title, attributeType.getCanonicalName()), Issue.Level.SEVERE));
}
}