X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.district.imports.ui%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fimports%2Fui%2FCSVImportWizard.java;h=490c9505ecde9e459b1c9c2547d38e0e7b41278a;hb=9f2732ec271abb50b2fc84ad93d07494d0c6abc8;hp=76c30d98113adb381a39b1c38c47b80b479ab54b;hpb=ac6ad8ff2b20a10e85e7b12c1af670500daebdd4;p=simantics%2Fdistrict.git diff --git a/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizard.java b/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizard.java index 76c30d98..490c9505 100644 --- a/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizard.java +++ b/org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizard.java @@ -92,6 +92,7 @@ public class CSVImportWizard extends Wizard implements IImportWizard { int velocityIndex = model.getVelocityIndex(); int flowAreaIndex = model.getFlowAreaIndex(); int nominalPressureLossIndex = model.getNominalPressureLossIndex(); + int addressIndex = model.getAddressIndex(); int startXCoordColumnIndex = model.getStartXCoordIndex(); int startYCoordColumnIndex = model.getStartYCoordIndex(); @@ -106,6 +107,7 @@ public class CSVImportWizard extends Wizard implements IImportWizard { int edgeFlowAreaIndex = model.getEdgeFlowAreaIndex(); int kReturnIndex = model.getkReturnIndex(); int kSupplyIndex = model.getkSupplyIndex(); + int lengthIndex = model.getLengthIndex(); int mappingColumn = model.getComponentMappingIndex(); int idColumn = model.getIdIndex(); @@ -198,6 +200,7 @@ public class CSVImportWizard extends Wizard implements IImportWizard { writeValue(graph, row, velocityIndex, vertex, DN.Vertex_HasVelocity); writeValue(graph, row, flowAreaIndex, vertex, DN.Vertex_HasFlowArea); writeValue(graph, row, nominalPressureLossIndex, vertex, DN.Vertex_HasNominalPressureLoss); + writeStringValue(graph, row, addressIndex, vertex, DN.Vertex_HasAddress); } else { String startXCoords = row.get(startXCoordColumnIndex); @@ -228,7 +231,7 @@ public class CSVImportWizard extends Wizard implements IImportWizard { endCoords = new double[] { endXCoord , endYCoord }; } - Resource edge = DNEdgeBuilder.create(graph, vv, model.getParentDiagram(), model.getComponentMappings().get(mappingValue), startCoords, endCoords, padding); + Resource edge = DNEdgeBuilder.create(graph, vv, model.getParentDiagram(), model.getComponentMappings().get(mappingValue), startCoords, endCoords, padding, true); writeStringValue(graph, row, idColumn, edge, DN.HasId); writeValue(graph, row, diameterColumnIndex, edge, DN.Edge_HasDiameter); @@ -238,6 +241,7 @@ public class CSVImportWizard extends Wizard implements IImportWizard { writeValue(graph, row, kReturnIndex, edge, DN.Edge_HasKReturn); writeValue(graph, row, kSupplyIndex, edge, DN.Edge_HasKSupply); writeValue(graph, row, edgeFlowAreaIndex, edge, DN.Edge_HasFlowArea); + writeValue(graph, row, lengthIndex, edge, DN.Edge_HasLength); } } catch (MismatchedDimensionException | TransformException | DatabaseException e) { throw new DatabaseException(e);