Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Uploader
Commits
d21b7ddc
Commit
d21b7ddc
authored
Sep 11, 2014
by
igoshin
Browse files
Merge branch 'master' into upstream-master
Conflicts: anno-gui/src/main/java/org/genesys2/anno/gui/DwcaBuilder.java
parents
8fab901d
cd9b34d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
d21b7ddc
/target
/bin
/.idea
\ No newline at end of file
/.idea
*.iml
\ No newline at end of file
anno-gui/src/main/java/org/genesys2/anno/gui/DwcaBuilder.java
View file @
d21b7ddc
...
...
@@ -254,27 +254,38 @@ public class DwcaBuilder extends AbstractModelObject {
sourceSheet
.
updateData
(
rows
);
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
++)
{
JSONObject
column
=
columns
.
getJSONObject
(
x
);
Column
sourceColumn
=
new
Column
();
if
(
column
.
has
(
"name"
))
sourceColumn
.
setPreferredName
(
column
.
getString
(
"name"
));
if
(
column
.
has
(
"rdfTerm"
))
sourceColumn
.
setRdfTerm
(
column
.
getString
(
"rdfTerm"
));
if
(
column
.
has
(
"description"
))
sourceColumn
.
setDescription
(
column
.
getString
(
"description"
));
if
(
column
.
has
(
"pattern"
))
sourceColumn
.
setPattern
(
column
.
getString
(
"pattern"
));
if
(
column
.
has
(
"separator"
))
sourceColumn
.
setSeparator
(
column
.
getString
(
"separator"
));
if
(
column
.
has
(
"groupPattern"
))
sourceColumn
.
setGroupPattern
(
column
.
getString
(
"groupPattern"
));
if
(
column
.
has
(
"dataType"
))
sourceColumn
.
setDataType
(
ColumnDataType
.
valueOf
(
column
.
getString
(
"dataType"
)));
if
(
column
.
has
(
"multiple"
))
sourceColumn
.
setMultiple
(
column
.
getBoolean
(
"multiple"
));
Column
sourceColumn
=
new
Column
();
if
(
column
.
has
(
"name"
))
sourceColumn
.
setPreferredName
(
column
.
getString
(
"name"
));
if
(
column
.
has
(
"rdfTerm"
))
sourceColumn
.
setRdfTerm
(
column
.
getString
(
"rdfTerm"
));
if
(
column
.
has
(
"description"
))
sourceColumn
.
setDescription
(
column
.
getString
(
"description"
));
if
(
column
.
has
(
"pattern"
))
sourceColumn
.
setPattern
(
column
.
getString
(
"pattern"
));
if
(
column
.
has
(
"separator"
))
sourceColumn
.
setSeparator
(
column
.
getString
(
"separator"
));
if
(
column
.
has
(
"groupPattern"
))
sourceColumn
.
setGroupPattern
(
column
.
getString
(
"groupPattern"
));
if
(
column
.
has
(
"dataType"
))
sourceColumn
.
setDataType
(
ColumnDataType
.
valueOf
(
column
.
getString
(
"dataType"
)));
if
(
column
.
has
(
"multiple"
))
sourceColumn
.
setMultiple
(
column
.
getBoolean
(
"multiple"
));
if
(
loadedColumns
.
contains
(
sourceColumn
)){
columnList
.
add
(
sourceColumn
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment