]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.imports.ui/src/org/simantics/district/imports/ui/CSVImportWizard.java
New sewage system modelling features for the mapping tool.
[simantics/district.git] / org.simantics.district.imports.ui / src / org / simantics / district / imports / ui / CSVImportWizard.java
index 703ade176923886f2691d9fe47d034d9f5ef33b7..c6b4ba1637072e652ec5d6f7dd0d4e05ee3333de 100644 (file)
@@ -69,6 +69,7 @@ public class CSVImportWizard extends Wizard implements IImportWizard {
                         int zCoordColumnIndex = model.getZCoordIndex();
                         int tempColumnIndex = model.getTempIndex();
                         int pressureColumnIndex = model.getPressureIndex();
+                        int sewageProductionColumnIndex = model.getSewageProductionIndex();
                         
                         int startXCoordColumnIndex = model.getStartXCoordIndex();
                         int startYCoordColumnIndex = model.getStartYCoordIndex();
@@ -154,6 +155,15 @@ public class CSVImportWizard extends Wizard implements IImportWizard {
                                                 } catch (NumberFormatException e) {
                                                     throw new DatabaseException(e);
                                                 }
+                                            }
+                                                                                       String sewageProductionS = row.get(sewageProductionColumnIndex);
+                                            if (!sewageProductionS.isEmpty()) {
+                                                try {
+                                                    double sewageProduction = Double.parseDouble(sewageProductionS);
+                                                    graph.claimLiteral(vertex, DN.Vertex_HasSewageProduction, sewageProduction, Bindings.DOUBLE);
+                                                } catch (NumberFormatException e) {
+                                                    throw new DatabaseException(e);
+                                                }
                                             }
 
                                         } else {