Modified:
trunk/src/org/rdv/action/OpenSeesDataImportAction.java
Log:
Fix importing OpenSees data files. Issue 46.
Modified: trunk/src/org/rdv/action/OpenSeesDataImportAction.java
==============================================================================
--- trunk/src/org/rdv/action/OpenSeesDataImportAction.java (original)
+++ trunk/src/org/rdv/action/OpenSeesDataImportAction.java Mon Dec 8
07:19:19 2008
@@ -105,7 +105,13 @@
return;
}
-
ActionFactory.getInstance().getDataImportAction().importData(openSeesDataFile);
+ String sourceName = inputDataFile.getName();
+ int dotIndex = sourceName.lastIndexOf('.');
+ if (dotIndex != -1) {
+ sourceName = sourceName.substring(0, dotIndex);
+ }
+
+
ActionFactory.getInstance().getDataImportAction().importData(openSeesDataFile,
sourceName, true);
}
/**
@@ -179,7 +185,7 @@
// parse header string from XML file
String header = getHeaderString(inputFile);
if (header != null) {
- writeLine(header, buffWriter);
+ writeLine(header.trim(), buffWriter);
}
}