提交 ab0d0e80 编写于 作者: M Mathieu Bastian

Minor IO fixes

上级 2c079944
...@@ -320,7 +320,7 @@ public class ExporterGDF implements GraphExporter, CharacterExporter, LongTask { ...@@ -320,7 +320,7 @@ public class ExporterGDF implements GraphExporter, CharacterExporter, LongTask {
List<Column> cols = new ArrayList<Column>(); List<Column> cols = new ArrayList<Column>();
if (exportAttributes && graphModel != null) { if (exportAttributes && graphModel != null) {
for (Column column : graphModel.getNodeTable()) { for (Column column : graphModel.getNodeTable()) {
if (!isNodeDefaultColumn(column.getId())) { if (!column.isProperty() && !isNodeDefaultColumn(column.getId())) {
cols.add(column); cols.add(column);
} }
} }
...@@ -332,7 +332,7 @@ public class ExporterGDF implements GraphExporter, CharacterExporter, LongTask { ...@@ -332,7 +332,7 @@ public class ExporterGDF implements GraphExporter, CharacterExporter, LongTask {
List<Column> cols = new ArrayList<Column>(); List<Column> cols = new ArrayList<Column>();
if (exportAttributes && graphModel != null) { if (exportAttributes && graphModel != null) {
for (Column column : graphModel.getEdgeTable()) { for (Column column : graphModel.getEdgeTable()) {
if (!isEdgeDefaultColumn(column.getId())) { if (!column.isProperty() && !isEdgeDefaultColumn(column.getId())) {
cols.add(column); cols.add(column);
} }
} }
......
...@@ -441,10 +441,8 @@ public class ExporterGraphML implements GraphExporter, CharacterExporter, LongTa ...@@ -441,10 +441,8 @@ public class ExporterGraphML implements GraphExporter, CharacterExporter, LongTa
edgeE.setAttribute("source", e.getSource().getId().toString()); edgeE.setAttribute("source", e.getSource().getId().toString());
edgeE.setAttribute("target", e.getTarget().getId().toString()); edgeE.setAttribute("target", e.getTarget().getId().toString());
if (e.getId() != null && !e.getId().toString().isEmpty() && !String.valueOf(e.getId()).equals(e.getId())) { Element idE = createEdgeId(document, e);
Element idE = createEdgeId(document, e); edgeE.appendChild(idE);
edgeE.appendChild(idE);
}
//Label //Label
if (e.getLabel() != null && !e.getLabel().isEmpty()) { if (e.getLabel() != null && !e.getLabel().isEmpty()) {
......
...@@ -931,9 +931,9 @@ public class ImporterGEXF implements FileImporter, LongTask { ...@@ -931,9 +931,9 @@ public class ImporterGEXF implements FileImporter, LongTask {
//Type //Type
Class attributeType = String.class; Class attributeType = String.class;
if (type.equalsIgnoreCase("boolean") || type.equalsIgnoreCase("bool")) { if (type.equalsIgnoreCase("boolean") || type.equalsIgnoreCase("bool")) {
attributeType = boolean.class; attributeType = Boolean.class;
} else if (type.equalsIgnoreCase("integer") || type.equalsIgnoreCase("int")) { } else if (type.equalsIgnoreCase("integer") || type.equalsIgnoreCase("int")) {
attributeType = int.class; attributeType = Integer.class;
} else if (type.equalsIgnoreCase("long")) { } else if (type.equalsIgnoreCase("long")) {
attributeType = Long.class; attributeType = Long.class;
} else if (type.equalsIgnoreCase("float")) { } else if (type.equalsIgnoreCase("float")) {
...@@ -948,13 +948,13 @@ public class ImporterGEXF implements FileImporter, LongTask { ...@@ -948,13 +948,13 @@ public class ImporterGEXF implements FileImporter, LongTask {
attributeType = BigInteger.class; attributeType = BigInteger.class;
} else if (type.equalsIgnoreCase("byte")) { } else if (type.equalsIgnoreCase("byte")) {
attributeType = Byte.class; attributeType = Byte.class;
} else if (type.equalsIgnoreCase("char")) { } else if (type.equalsIgnoreCase("char") || type.equalsIgnoreCase("character")) {
attributeType = Character.class; attributeType = Character.class;
} else if (type.equalsIgnoreCase("short")) { } else if (type.equalsIgnoreCase("short")) {
attributeType = Short.class; attributeType = Short.class;
} else if (type.equalsIgnoreCase("listboolean")) { } else if (type.equalsIgnoreCase("listboolean")) {
attributeType = boolean[].class; attributeType = boolean[].class;
} else if (type.equalsIgnoreCase("listint")) { } else if (type.equalsIgnoreCase("listint") || type.equalsIgnoreCase("listinteger")) {
attributeType = int[].class; attributeType = int[].class;
} else if (type.equalsIgnoreCase("listlong")) { } else if (type.equalsIgnoreCase("listlong")) {
attributeType = long[].class; attributeType = long[].class;
...@@ -970,7 +970,7 @@ public class ImporterGEXF implements FileImporter, LongTask { ...@@ -970,7 +970,7 @@ public class ImporterGEXF implements FileImporter, LongTask {
attributeType = BigInteger[].class; attributeType = BigInteger[].class;
} else if (type.equalsIgnoreCase("listbyte")) { } else if (type.equalsIgnoreCase("listbyte")) {
attributeType = byte[].class; attributeType = byte[].class;
} else if (type.equalsIgnoreCase("listchar")) { } else if (type.equalsIgnoreCase("listchar") || type.equalsIgnoreCase("listcharacter")) {
attributeType = char[].class; attributeType = char[].class;
} else if (type.equalsIgnoreCase("listshort")) { } else if (type.equalsIgnoreCase("listshort")) {
attributeType = short[].class; attributeType = short[].class;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册