Commit d21b7ddc authored by igoshin's avatar igoshin
Browse files

Merge branch 'master' into upstream-master

Conflicts:
	anno-gui/src/main/java/org/genesys2/anno/gui/DwcaBuilder.java
parents 8fab901d cd9b34d5
/target /target
/bin /bin
/.idea /.idea
\ No newline at end of file *.iml
\ No newline at end of file
...@@ -254,27 +254,38 @@ public class DwcaBuilder extends AbstractModelObject { ...@@ -254,27 +254,38 @@ public class DwcaBuilder extends AbstractModelObject {
sourceSheet.updateData(rows); sourceSheet.updateData(rows);
List<Column> loadedColumns = sourceSheet.getColumns(); List<Column> loadedColumns = sourceSheet.getColumns();
List<Object[]> rows=null;
try {
rows = dataSourceLoader.loadRows(sourceSheet, 200);
} catch (UnsupportedDataFormatException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
sourceSheet.updateData(rows);
List<Column> loadedColumns = sourceSheet.getColumns();
for (int x = 0; x < columns.length(); x++) { for (int x = 0; x < columns.length(); x++) {
JSONObject column = columns.getJSONObject(x); JSONObject column = columns.getJSONObject(x);
Column sourceColumn = new Column(); Column sourceColumn = new Column();
if (column.has("name")) if (column.has("name"))
sourceColumn.setPreferredName(column.getString("name")); sourceColumn.setPreferredName(column.getString("name"));
if (column.has("rdfTerm")) if (column.has("rdfTerm"))
sourceColumn.setRdfTerm(column.getString("rdfTerm")); sourceColumn.setRdfTerm(column.getString("rdfTerm"));
if (column.has("description")) if (column.has("description"))
sourceColumn.setDescription(column.getString("description")); sourceColumn.setDescription(column.getString("description"));
if (column.has("pattern")) if (column.has("pattern"))
sourceColumn.setPattern(column.getString("pattern")); sourceColumn.setPattern(column.getString("pattern"));
if (column.has("separator")) if (column.has("separator"))
sourceColumn.setSeparator(column.getString("separator")); sourceColumn.setSeparator(column.getString("separator"));
if (column.has("groupPattern")) if (column.has("groupPattern"))
sourceColumn.setGroupPattern(column.getString("groupPattern")); sourceColumn.setGroupPattern(column.getString("groupPattern"));
if (column.has("dataType")) if (column.has("dataType"))
sourceColumn.setDataType(ColumnDataType.valueOf(column.getString("dataType"))); sourceColumn.setDataType(ColumnDataType.valueOf(column.getString("dataType")));
if (column.has("multiple")) if (column.has("multiple"))
sourceColumn.setMultiple(column.getBoolean("multiple")); sourceColumn.setMultiple(column.getBoolean("multiple"));
if (loadedColumns.contains(sourceColumn)){ if (loadedColumns.contains(sourceColumn)){
columnList.add(sourceColumn); columnList.add(sourceColumn);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment