Skip to content
Snippets Groups Projects
Commit e0a8d893 authored by felmer's avatar felmer
Browse files

SE-236 bug fixed

SVN: 15542
parent 26dfb33c
No related branches found
No related tags found
No related merge requests found
...@@ -48,14 +48,10 @@ public class FeatureStorageProcessor extends DefaultStorageProcessor ...@@ -48,14 +48,10 @@ public class FeatureStorageProcessor extends DefaultStorageProcessor
public void startNewColumn(String columnName) public void startNewColumn(String columnName)
{ {
if (tableBuilder != null) addColumn();
{
columns.addAll(tableBuilder.getColumns());
}
tableBuilder = new TableBuilder(columnName); tableBuilder = new TableBuilder(columnName);
} }
public void checkColumnsLine(int lineIndex, String line) public void checkColumnsLine(int lineIndex, String line)
{ {
int columnCount = new StringTokenizer(line).countTokens(); int columnCount = new StringTokenizer(line).countTokens();
...@@ -94,6 +90,11 @@ public class FeatureStorageProcessor extends DefaultStorageProcessor ...@@ -94,6 +90,11 @@ public class FeatureStorageProcessor extends DefaultStorageProcessor
} }
} }
public void finish()
{
addColumn();
}
public int getNumberOfWells() public int getNumberOfWells()
{ {
return numberOfColumns * rowLetters.size(); return numberOfColumns * rowLetters.size();
...@@ -101,7 +102,7 @@ public class FeatureStorageProcessor extends DefaultStorageProcessor ...@@ -101,7 +102,7 @@ public class FeatureStorageProcessor extends DefaultStorageProcessor
public String getRowLetter(int index) public String getRowLetter(int index)
{ {
return rowLetters.get(index % rowLetters.size()); return rowLetters.get((index / numberOfColumns) % rowLetters.size());
} }
public int getColumnNumber(int index) public int getColumnNumber(int index)
...@@ -113,6 +114,15 @@ public class FeatureStorageProcessor extends DefaultStorageProcessor ...@@ -113,6 +114,15 @@ public class FeatureStorageProcessor extends DefaultStorageProcessor
{ {
return columns; return columns;
} }
private void addColumn()
{
if (tableBuilder != null)
{
columns.addAll(tableBuilder.getColumns());
}
}
} }
public FeatureStorageProcessor(Properties properties) public FeatureStorageProcessor(Properties properties)
...@@ -149,6 +159,7 @@ public class FeatureStorageProcessor extends DefaultStorageProcessor ...@@ -149,6 +159,7 @@ public class FeatureStorageProcessor extends DefaultStorageProcessor
columnsBuilder.addRow(i, line); columnsBuilder.addRow(i, line);
} }
} }
columnsBuilder.finish();
List<Column> columns = columnsBuilder.getColumns(); List<Column> columns = columnsBuilder.getColumns();
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append("barcode").append(DELIMITER).append("row").append(DELIMITER).append("col"); builder.append("barcode").append(DELIMITER).append("row").append(DELIMITER).append("col");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment