Updated to JAVA 7
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-import-widget@86994 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
8a273a0e65
commit
09a5ded189
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" output="target/tabular-data-csv-import-widget-2.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/tabular-data-csv-import-widget-2.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/tabular-data-csv-import-widget-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
</classpath>
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>tabular-data-csv-import-widget</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -0,0 +1,6 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding//src/main/java=UTF-8
|
||||||
|
encoding//src/main/resources=UTF-8
|
||||||
|
encoding//src/test/java=UTF-8
|
||||||
|
encoding//src/test/resources=UTF-8
|
||||||
|
encoding/<project>=UTF-8
|
|
@ -0,0 +1,8 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.5
|
|
@ -0,0 +1,4 @@
|
||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
<wb-module deploy-name="tabular-data-csv-import-widget">
|
||||||
|
<wb-resource deploy-path="/" source-path="/src/main/java"/>
|
||||||
|
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
|
||||||
|
</wb-module>
|
||||||
|
</project-modules>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<faceted-project>
|
||||||
|
<installed facet="jst.utility" version="1.0"/>
|
||||||
|
<installed facet="java" version="1.5"/>
|
||||||
|
</faceted-project>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Resource>
|
||||||
|
<ID></ID>
|
||||||
|
<Type>Service</Type>
|
||||||
|
<Profile>
|
||||||
|
<Description>tabular-data-csv-import-widget allows csv import from file and workspace</Description>
|
||||||
|
<Class>PortletsUser</Class>
|
||||||
|
<Name>tabular-data-csv-import-widget</Name>
|
||||||
|
<Version>1.0.0</Version>
|
||||||
|
<Packages>
|
||||||
|
<Software>
|
||||||
|
<Description>tabular-data-csv-import-widget allows csv import from file and workspace</Description>
|
||||||
|
<Name>tabular-data-csv-import-widget</Name>
|
||||||
|
<Version>2.0.0-SNAPSHOT</Version>
|
||||||
|
<MavenCoordinates>
|
||||||
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
|
<artifactId>tabular-data-csv-import-widget</artifactId>
|
||||||
|
<version>2.0.0-SNAPSHOT</version>
|
||||||
|
</MavenCoordinates>
|
||||||
|
<Type>library</Type>
|
||||||
|
<Files>
|
||||||
|
<File>tabular-data-csv-import-widget-2.0.0-SNAPSHOT.jar</File>
|
||||||
|
</Files>
|
||||||
|
</Software>
|
||||||
|
</Packages>
|
||||||
|
</Profile>
|
||||||
|
</Resource>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
gCube System - License
|
||||||
|
------------------------------------------------------------
|
||||||
|
|
||||||
|
The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||||
|
The software and documentation is provided by its authors/distributors "as is" and no expressed or
|
||||||
|
implied warranty is given for its use, quality or fitness for a particular case.
|
|
@ -0,0 +1 @@
|
||||||
|
Giancarlo Panichi (giancarlo.panichi@isti.cnr.it), CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"
|
|
@ -0,0 +1,40 @@
|
||||||
|
The gCube System - tabular-data-csv-import-widget
|
||||||
|
------------------------------------------------------------
|
||||||
|
|
||||||
|
This work has been supported by the following European projects: iMarine (FP7-INFRASTRUCTURES-2011-2)
|
||||||
|
|
||||||
|
Authors
|
||||||
|
-------
|
||||||
|
|
||||||
|
Giancarlo Panichi (giancarlo.panichi@isti.cnr.it), CNR Pisa,
|
||||||
|
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"
|
||||||
|
|
||||||
|
|
||||||
|
Version and Release Date
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
v. 2.0.0-SNAPSHOT (2013-10-18)
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
|
||||||
|
tabular-data-csv-import-widget allows csv import from file and workspace
|
||||||
|
|
||||||
|
Download information
|
||||||
|
--------------------
|
||||||
|
Source code URL: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-import-widget
|
||||||
|
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
-------------
|
||||||
|
|
||||||
|
tabular-data-csv-import-widget allows csv import from file and workspace
|
||||||
|
|
||||||
|
|
||||||
|
Licensing
|
||||||
|
---------
|
||||||
|
|
||||||
|
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<ReleaseNotes>
|
||||||
|
<Changeset component="org.gcube.portlets.user.tabular-data-csv-import-widget.1-0-0"
|
||||||
|
date="2013-10-18">
|
||||||
|
<Change>First Release</Change>
|
||||||
|
</Changeset>
|
||||||
|
</ReleaseNotes>
|
|
@ -0,0 +1 @@
|
||||||
|
https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-import-widget
|
|
@ -96,7 +96,7 @@ public class CSVConfigCard extends WizardCard {
|
||||||
encodings.setTriggerAction(TriggerAction.ALL);
|
encodings.setTriggerAction(TriggerAction.ALL);
|
||||||
encodings.addSelectionHandler(new SelectionHandler<String>() {
|
encodings.addSelectionHandler(new SelectionHandler<String>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelection(SelectionEvent<String> event) {
|
public void onSelection(SelectionEvent<String> event) {
|
||||||
updateGrid();
|
updateGrid();
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
|
|
||||||
LabelProvider<HeaderPresence> labelProvider = new LabelProvider<HeaderPresence>() {
|
LabelProvider<HeaderPresence> labelProvider = new LabelProvider<HeaderPresence>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getLabel(HeaderPresence item) {
|
public String getLabel(HeaderPresence item) {
|
||||||
return item.getLabel();
|
return item.getLabel();
|
||||||
}
|
}
|
||||||
|
@ -123,7 +122,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
header.setValue(HeaderPresence.NONE);
|
header.setValue(HeaderPresence.NONE);
|
||||||
header.addSelectionHandler(new SelectionHandler<HeaderPresence>() {
|
header.addSelectionHandler(new SelectionHandler<HeaderPresence>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelection(SelectionEvent<HeaderPresence> event) {
|
public void onSelection(SelectionEvent<HeaderPresence> event) {
|
||||||
updateGrid();
|
updateGrid();
|
||||||
}
|
}
|
||||||
|
@ -163,7 +161,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
delimitersGroup
|
delimitersGroup
|
||||||
.addValueChangeHandler(new ValueChangeHandler<HasValue<Boolean>>() {
|
.addValueChangeHandler(new ValueChangeHandler<HasValue<Boolean>>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onValueChange(
|
public void onValueChange(
|
||||||
ValueChangeEvent<HasValue<Boolean>> event) {
|
ValueChangeEvent<HasValue<Boolean>> event) {
|
||||||
|
|
||||||
|
@ -203,7 +200,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
commentField.setWidth(20);
|
commentField.setWidth(20);
|
||||||
commentField.addChangeHandler(new ChangeHandler() {
|
commentField.addChangeHandler(new ChangeHandler() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onChange(ChangeEvent event) {
|
public void onChange(ChangeEvent event) {
|
||||||
if (commentField.isValid())
|
if (commentField.isValid())
|
||||||
updateGrid();
|
updateGrid();
|
||||||
|
@ -223,7 +219,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
csvCheckPanel.getCheckConfiguration().addSelectHandler(
|
csvCheckPanel.getCheckConfiguration().addSelectHandler(
|
||||||
new SelectHandler() {
|
new SelectHandler() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
checkConfiguration();
|
checkConfiguration();
|
||||||
}
|
}
|
||||||
|
@ -232,7 +227,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
csvCheckPanel.getSkipInvalidCheckBox().addValueChangeHandler(
|
csvCheckPanel.getSkipInvalidCheckBox().addValueChangeHandler(
|
||||||
new ValueChangeHandler<Boolean>() {
|
new ValueChangeHandler<Boolean>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onValueChange(ValueChangeEvent<Boolean> event) {
|
public void onValueChange(ValueChangeEvent<Boolean> event) {
|
||||||
boolean skip = csvCheckPanel.getSkipInvalidCheckBox()
|
boolean skip = csvCheckPanel.getSkipInvalidCheckBox()
|
||||||
.getValue();
|
.getValue();
|
||||||
|
@ -253,7 +247,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
TDGWTServiceAsync.INSTANCE.checkCSV(100,
|
TDGWTServiceAsync.INSTANCE.checkCSV(100,
|
||||||
new AsyncCallback<ArrayList<CSVRowError>>() {
|
new AsyncCallback<ArrayList<CSVRowError>>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
ErrorMessageBox
|
ErrorMessageBox
|
||||||
.showError(
|
.showError(
|
||||||
|
@ -262,7 +255,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
"");
|
"");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(ArrayList<CSVRowError> errors) {
|
public void onSuccess(ArrayList<CSVRowError> errors) {
|
||||||
csvCheckPanel.getCheckConfiguration().setEnabled(true);
|
csvCheckPanel.getCheckConfiguration().setEnabled(true);
|
||||||
|
|
||||||
|
@ -294,7 +286,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
TDGWTServiceAsync.INSTANCE.configureCSVParser(encoding, headerPresence,
|
TDGWTServiceAsync.INSTANCE.configureCSVParser(encoding, headerPresence,
|
||||||
delimiter, commentChar, new AsyncCallback<ArrayList<String>>() {
|
delimiter, commentChar, new AsyncCallback<ArrayList<String>>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.error("Failed updating CSV config", caught);
|
Log.error("Failed updating CSV config", caught);
|
||||||
setEnableNextButton(false);
|
setEnableNextButton(false);
|
||||||
|
@ -306,7 +297,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(ArrayList<String> result) {
|
public void onSuccess(ArrayList<String> result) {
|
||||||
Log.info("CSV header getted");
|
Log.info("CSV header getted");
|
||||||
|
|
||||||
|
@ -349,7 +339,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
TDGWTServiceAsync.INSTANCE
|
TDGWTServiceAsync.INSTANCE
|
||||||
.getAvailableCharset(new AsyncCallback<AvailableCharsetList>() {
|
.getAvailableCharset(new AsyncCallback<AvailableCharsetList>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(AvailableCharsetList result) {
|
public void onSuccess(AvailableCharsetList result) {
|
||||||
GWT.log("CharsetInfo: "
|
GWT.log("CharsetInfo: "
|
||||||
+ result.getCharsetList().size()
|
+ result.getCharsetList().size()
|
||||||
|
@ -367,7 +356,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
GWT.log("Error loading charset list", caught);
|
GWT.log("Error loading charset list", caught);
|
||||||
showErrorAndHide("Error loading charset list",
|
showErrorAndHide("Error loading charset list",
|
||||||
|
@ -379,7 +367,6 @@ public class CSVConfigCard extends WizardCard {
|
||||||
|
|
||||||
Command sayNextCard = new Command() {
|
Command sayNextCard = new Command() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
CSVTableDetailCard csvTableDetailCard = new CSVTableDetailCard(
|
CSVTableDetailCard csvTableDetailCard = new CSVTableDetailCard(
|
||||||
csvImportSession);
|
csvImportSession);
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class CSVErrorWindow extends Window {
|
||||||
TextButton close = new TextButton("Close");
|
TextButton close = new TextButton("Close");
|
||||||
close.addSelectHandler(new SelectHandler() {
|
close.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import com.google.gwt.core.client.EntryPoint;
|
||||||
|
|
||||||
public class CSVImportWizardTDEntry implements EntryPoint {
|
public class CSVImportWizardTDEntry implements EntryPoint {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onModuleLoad() {
|
public void onModuleLoad() {
|
||||||
CSVImportWizardTD importWizard= new CSVImportWizardTD("CSVImport");
|
CSVImportWizardTD importWizard= new CSVImportWizardTD("CSVImport");
|
||||||
Log.info(importWizard.getId());
|
Log.info(importWizard.getId());
|
||||||
|
|
|
@ -91,12 +91,11 @@ CSVImportProgressListener {
|
||||||
public void importCSV() {
|
public void importCSV() {
|
||||||
TDGWTServiceAsync.INSTANCE.startCSVImport(importSession, new AsyncCallback<Void>() {
|
TDGWTServiceAsync.INSTANCE.startCSVImport(importSession, new AsyncCallback<Void>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Void result) {
|
public void onSuccess(Void result) {
|
||||||
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
|
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
showErrorAndHide("Error in importCSV",
|
showErrorAndHide("Error in importCSV",
|
||||||
"An error occured in importCSV: "+caught.getLocalizedMessage(), caught.getStackTrace().toString(), caught);
|
"An error occured in importCSV: "+caught.getLocalizedMessage(), caught.getStackTrace().toString(), caught);
|
||||||
|
@ -114,17 +113,15 @@ CSVImportProgressListener {
|
||||||
importCSV();
|
importCSV();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationInitializing() {
|
public void operationInitializing() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationUpdate(float elaborated) {
|
public void operationUpdate(float elaborated) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationComplete(final TRId trId) {
|
public void operationComplete(final TRId trId) {
|
||||||
// final String tableId,final String tableResourceId) {
|
// final String tableId,final String tableResourceId) {
|
||||||
|
|
||||||
|
@ -149,7 +146,7 @@ CSVImportProgressListener {
|
||||||
getWizardWindow().setEnableNextButton(true);
|
getWizardWindow().setEnableNextButton(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationFailed(Throwable caught, String reason,
|
public void operationFailed(Throwable caught, String reason,
|
||||||
String failureDetails) {
|
String failureDetails) {
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class CSVTableDetailCard extends WizardCard {
|
||||||
public void setup() {
|
public void setup() {
|
||||||
Command sayNextCard = new Command() {
|
Command sayNextCard = new Command() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
checkData();
|
checkData();
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,6 @@ public class CSVTableDetailCard extends WizardCard {
|
||||||
AlertMessageBox d;
|
AlertMessageBox d;
|
||||||
HideHandler hideHandler = new HideHandler() {
|
HideHandler hideHandler = new HideHandler() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onHide(HideEvent event) {
|
public void onHide(HideEvent event) {
|
||||||
getWizardWindow().setEnableNextButton(true);
|
getWizardWindow().setEnableNextButton(true);
|
||||||
getWizardWindow().setEnableBackButton(false);
|
getWizardWindow().setEnableBackButton(false);
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class CSVUploadFileCard extends WizardCard {
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
Command sayNextCard = new Command() {
|
Command sayNextCard = new Command() {
|
||||||
@Override
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
CSVConfigCard csvConfigCard = new CSVConfigCard(importSession);
|
CSVConfigCard csvConfigCard = new CSVConfigCard(importSession);
|
||||||
getWizardWindow().addCard(csvConfigCard);
|
getWizardWindow().addCard(csvConfigCard);
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
||||||
wpanel.setAllowedMimeTypes("text/csv", "application/zip", "application/x-zip", "application/x-zip-compressed", "application/octet","application/octet-stream");
|
wpanel.setAllowedMimeTypes("text/csv", "application/zip", "application/x-zip", "application/x-zip-compressed", "application/octet","application/octet-stream");
|
||||||
wpanel.addSelectionHandler(new ItemSelectionHandler() {
|
wpanel.addSelectionHandler(new ItemSelectionHandler() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelection(ItemSelectionEvent event) {
|
public void onSelection(ItemSelectionEvent event) {
|
||||||
item=event.getSelectedItem();
|
item=event.getSelectedItem();
|
||||||
Log.debug("Selected Item:"+item);
|
Log.debug("Selected Item:"+item);
|
||||||
|
@ -90,7 +90,6 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
||||||
Log.debug("CSVWorkSpaceSelectionCard Call Setup ");
|
Log.debug("CSVWorkSpaceSelectionCard Call Setup ");
|
||||||
Command sayNextCard = new Command() {
|
Command sayNextCard = new Command() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
Log.debug("CSVWorkSpaceSelectionCard Call sayNextCard wpanel:"+wpanel);
|
Log.debug("CSVWorkSpaceSelectionCard Call sayNextCard wpanel:"+wpanel);
|
||||||
wpanel.disable();
|
wpanel.disable();
|
||||||
|
@ -125,7 +124,6 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
||||||
TDGWTServiceAsync tdGwtServiceAsync=TDGWTServiceAsync.INSTANCE;
|
TDGWTServiceAsync tdGwtServiceAsync=TDGWTServiceAsync.INSTANCE;
|
||||||
tdGwtServiceAsync.getFileFromWorkspace(importSession, new AsyncCallback<Void>(){
|
tdGwtServiceAsync.getFileFromWorkspace(importSession, new AsyncCallback<Void>(){
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
wpanel.endWaiting();
|
wpanel.endWaiting();
|
||||||
thisCard.showErrorAndHide("Error", "Error retrieving the file from the workspace: "+caught.getLocalizedMessage(),
|
thisCard.showErrorAndHide("Error", "Error retrieving the file from the workspace: "+caught.getLocalizedMessage(),
|
||||||
|
@ -133,7 +131,6 @@ public class CSVWorkSpaceSelectionCard extends WizardCard {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Void result) {
|
public void onSuccess(Void result) {
|
||||||
wpanel.endWaiting();
|
wpanel.endWaiting();
|
||||||
goForward();
|
goForward();
|
||||||
|
|
|
@ -168,7 +168,7 @@ public class CsvCheckPanel extends VerticalPanel {
|
||||||
|
|
||||||
errorAnchor.addClickHandler(new ClickHandler() {
|
errorAnchor.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
errorWindow.show();
|
errorWindow.show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class FileUploadPanel extends FormPanel {
|
||||||
|
|
||||||
addShowHandler(new ShowHandler() {
|
addShowHandler(new ShowHandler() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onShow(ShowEvent event) {
|
public void onShow(ShowEvent event) {
|
||||||
doLayout();
|
doLayout();
|
||||||
|
|
||||||
|
@ -90,7 +90,6 @@ public class FileUploadPanel extends FormPanel {
|
||||||
|
|
||||||
fileUploadField.addChangeHandler(new ChangeHandler() {
|
fileUploadField.addChangeHandler(new ChangeHandler() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onChange(ChangeEvent event) {
|
public void onChange(ChangeEvent event) {
|
||||||
uploadButton.setEnabled(fileUploadField.isValid());
|
uploadButton.setEnabled(fileUploadField.isValid());
|
||||||
String path = fileUploadField.getValue();
|
String path = fileUploadField.getValue();
|
||||||
|
@ -128,7 +127,6 @@ public class FileUploadPanel extends FormPanel {
|
||||||
|
|
||||||
uploadButton.addSelectHandler(new SelectHandler() {
|
uploadButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
Log.info("request upload");
|
Log.info("request upload");
|
||||||
|
|
||||||
|
@ -153,25 +151,21 @@ public class FileUploadPanel extends FormPanel {
|
||||||
|
|
||||||
progressUpdater.addListener(new FileUploadProgressListener() {
|
progressUpdater.addListener(new FileUploadProgressListener() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationUpdate(float elaborated) {
|
public void operationUpdate(float elaborated) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationInitializing() {
|
public void operationInitializing() {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationFailed(Throwable caught, String reason,
|
public void operationFailed(Throwable caught, String reason,
|
||||||
String failureDetails) {
|
String failureDetails) {
|
||||||
card.showErrorAndHide("Error uploading the csv file", reason,
|
card.showErrorAndHide("Error uploading the csv file", reason,
|
||||||
failureDetails, caught);
|
failureDetails, caught);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationComplete() {
|
public void operationComplete() {
|
||||||
card.setEnableNextButton(true);
|
card.setEnableNextButton(true);
|
||||||
cancelButton.disable();
|
cancelButton.disable();
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class SourceSelectionCard extends WizardCard {
|
||||||
|
|
||||||
toggle.addValueChangeHandler(new ValueChangeHandler<HasValue<Boolean>>() {
|
toggle.addValueChangeHandler(new ValueChangeHandler<HasValue<Boolean>>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onValueChange(ValueChangeEvent<HasValue<Boolean>> event) {
|
public void onValueChange(ValueChangeEvent<HasValue<Boolean>> event) {
|
||||||
try {
|
try {
|
||||||
ToggleGroup group = (ToggleGroup) event.getSource();
|
ToggleGroup group = (ToggleGroup) event.getSource();
|
||||||
|
|
|
@ -31,12 +31,11 @@ public class CSVGridView extends GridView<CSVRow> {
|
||||||
{
|
{
|
||||||
setViewConfig(new GridViewConfig<CSVRow>() {
|
setViewConfig(new GridViewConfig<CSVRow>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRowStyle(CSVRow model, int rowIndex) {
|
public String getRowStyle(CSVRow model, int rowIndex) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getColStyle(CSVRow model, ValueProvider<? super CSVRow, ?> valueProvider, int rowIndex, int colIndex) {
|
public String getColStyle(CSVRow model, ValueProvider<? super CSVRow, ?> valueProvider, int rowIndex, int colIndex) {
|
||||||
return excludedColumns.contains(colIndex)?ResourceBundle.INSTANCE.importCss().getColumnExcluded():"";
|
return excludedColumns.contains(colIndex)?ResourceBundle.INSTANCE.importCss().getColumnExcluded():"";
|
||||||
}
|
}
|
||||||
|
@ -54,7 +53,7 @@ public class CSVGridView extends GridView<CSVRow> {
|
||||||
|
|
||||||
includeMenu.addSelectionHandler(new SelectionHandler<Item>() {
|
includeMenu.addSelectionHandler(new SelectionHandler<Item>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelection(SelectionEvent<Item> event) {
|
public void onSelection(SelectionEvent<Item> event) {
|
||||||
excludedColumns.remove(new Integer(colIndex));
|
excludedColumns.remove(new Integer(colIndex));
|
||||||
refresh(false);
|
refresh(false);
|
||||||
|
@ -69,7 +68,6 @@ public class CSVGridView extends GridView<CSVRow> {
|
||||||
|
|
||||||
excludeMenu.addSelectionHandler(new SelectionHandler<Item>() {
|
excludeMenu.addSelectionHandler(new SelectionHandler<Item>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelection(SelectionEvent<Item> event) {
|
public void onSelection(SelectionEvent<Item> event) {
|
||||||
excludedColumns.add(colIndex);
|
excludedColumns.add(colIndex);
|
||||||
refresh(false);
|
refresh(false);
|
||||||
|
|
|
@ -21,7 +21,6 @@ public class CSVJsonReader implements DataReader<ListLoadResult<CSVRow>, String>
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public ListLoadResult<CSVRow> read(Object loadConfig, String json) {
|
public ListLoadResult<CSVRow> read(Object loadConfig, String json) {
|
||||||
CSVData data = CSVData.getCSVData(json);
|
CSVData data = CSVData.getCSVData(json);
|
||||||
return new ListLoadResultBean<CSVRow>(data.getRows());
|
return new ListLoadResultBean<CSVRow>(data.getRows());
|
||||||
|
|
|
@ -14,7 +14,6 @@ public class CSVRowKeyProvider implements ModelKeyProvider<CSVRow> {
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public String getKey(CSVRow item) {
|
public String getKey(CSVRow item) {
|
||||||
return item.getId();
|
return item.getId();
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@ public class CSVRowValueProvider implements ValueProvider<CSVRow, String> {
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public String getValue(CSVRow row) {
|
public String getValue(CSVRow row) {
|
||||||
return row.getField(column);
|
return row.getField(column);
|
||||||
}
|
}
|
||||||
|
@ -31,7 +30,6 @@ public class CSVRowValueProvider implements ValueProvider<CSVRow, String> {
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public void setValue(CSVRow object, String value) {
|
public void setValue(CSVRow object, String value) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,7 +37,6 @@ public class CSVRowValueProvider implements ValueProvider<CSVRow, String> {
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public String getPath() {
|
public String getPath() {
|
||||||
return column;
|
return column;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,6 @@ public class CSVImportProgressBarUpdater implements CSVImportProgressListener {
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public void operationComplete(TRId trId) {
|
public void operationComplete(TRId trId) {
|
||||||
Log.info("Import completed");
|
Log.info("Import completed");
|
||||||
progressBar.updateProgress(1, "Import completed.");
|
progressBar.updateProgress(1, "Import completed.");
|
||||||
|
@ -45,19 +44,16 @@ public class CSVImportProgressBarUpdater implements CSVImportProgressListener {
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public void operationFailed(Throwable caught, String reason, String failureDetails) {
|
public void operationFailed(Throwable caught, String reason, String failureDetails) {
|
||||||
Log.info("Import failed");
|
Log.info("Import failed");
|
||||||
progressBar.updateText("Import failed.");
|
progressBar.updateText("Import failed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationInitializing() {
|
public void operationInitializing() {
|
||||||
Log.info("Inport Inizializing");
|
Log.info("Inport Inizializing");
|
||||||
progressBar.updateProgress(0, "Initializing...");
|
progressBar.updateProgress(0, "Initializing...");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationUpdate(float elaborated) {
|
public void operationUpdate(float elaborated) {
|
||||||
Log.info("Import elaborated: "+elaborated);
|
Log.info("Import elaborated: "+elaborated);
|
||||||
if (elaborated == 0) progressBar.updateProgress(0, "Initializing...");
|
if (elaborated == 0) progressBar.updateProgress(0, "Initializing...");
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class CSVImportProgressUpdater extends Timer {
|
||||||
TDGWTServiceAsync.INSTANCE
|
TDGWTServiceAsync.INSTANCE
|
||||||
.getCSVImportMonitor(new AsyncCallback<CSVImportMonitor>() {
|
.getCSVImportMonitor(new AsyncCallback<CSVImportMonitor>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
cancel();
|
cancel();
|
||||||
Log.error("Error retrieving the operation state",
|
Log.error("Error retrieving the operation state",
|
||||||
|
@ -48,7 +48,6 @@ public class CSVImportProgressUpdater extends Timer {
|
||||||
"Failed getting operation updates", message);
|
"Failed getting operation updates", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(CSVImportMonitor result) {
|
public void onSuccess(CSVImportMonitor result) {
|
||||||
Log.info("retrieved CSVImportMonitor: "
|
Log.info("retrieved CSVImportMonitor: "
|
||||||
+ result.getStatus());
|
+ result.getStatus());
|
||||||
|
@ -105,7 +104,6 @@ public class CSVImportProgressUpdater extends Timer {
|
||||||
AlertMessageBox d = new AlertMessageBox("Error in CSV Import", details);
|
AlertMessageBox d = new AlertMessageBox("Error in CSV Import", details);
|
||||||
d.addHideHandler(new HideHandler() {
|
d.addHideHandler(new HideHandler() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onHide(HideEvent event) {
|
public void onHide(HideEvent event) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@ public class FileUploadProgressBarUpdater implements FileUploadProgressListener
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public void operationComplete() {
|
public void operationComplete() {
|
||||||
Log.info("File upload complete");
|
Log.info("File upload complete");
|
||||||
progressBar.updateProgress(1, "File upload completed.");
|
progressBar.updateProgress(1, "File upload completed.");
|
||||||
|
@ -40,19 +39,16 @@ public class FileUploadProgressBarUpdater implements FileUploadProgressListener
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public void operationFailed(Throwable caught, String reason, String failureDetails) {
|
public void operationFailed(Throwable caught, String reason, String failureDetails) {
|
||||||
Log.info("File upload failed");
|
Log.info("File upload failed");
|
||||||
progressBar.updateText("File upload failed.");
|
progressBar.updateText("File upload failed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationInitializing() {
|
public void operationInitializing() {
|
||||||
Log.info("File upload inizializing");
|
Log.info("File upload inizializing");
|
||||||
progressBar.updateProgress(0, "Initializing...");
|
progressBar.updateProgress(0, "Initializing...");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationUpdate(float elaborated) {
|
public void operationUpdate(float elaborated) {
|
||||||
Log.info("File upload elaborated: "+elaborated);
|
Log.info("File upload elaborated: "+elaborated);
|
||||||
if (elaborated == 0) progressBar.updateProgress(0, "Initializing...");
|
if (elaborated == 0) progressBar.updateProgress(0, "Initializing...");
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class FileUploadProgressCardUpdater implements FileUploadProgressListener
|
||||||
public FileUploadProgressCardUpdater() {
|
public FileUploadProgressCardUpdater() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationComplete() {
|
public void operationComplete() {
|
||||||
Log.info("File upload completed");
|
Log.info("File upload completed");
|
||||||
|
|
||||||
|
@ -30,17 +30,14 @@ public class FileUploadProgressCardUpdater implements FileUploadProgressListener
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public void operationFailed(Throwable caught, String reason, String failureDetails) {
|
public void operationFailed(Throwable caught, String reason, String failureDetails) {
|
||||||
Log.info("File upload failed");
|
Log.info("File upload failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationInitializing() {
|
public void operationInitializing() {
|
||||||
Log.info("File upload inizializing");
|
Log.info("File upload inizializing");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void operationUpdate(float elaborated) {
|
public void operationUpdate(float elaborated) {
|
||||||
Log.info("File uploading: "+elaborated);
|
Log.info("File uploading: "+elaborated);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class FileUploadProgressUpdater extends Timer {
|
||||||
Log.debug("requesting operation progress");
|
Log.debug("requesting operation progress");
|
||||||
TDGWTServiceAsync.INSTANCE.getFileUploadMonitor(new AsyncCallback<FileUploadMonitor>() {
|
TDGWTServiceAsync.INSTANCE.getFileUploadMonitor(new AsyncCallback<FileUploadMonitor>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
cancel();
|
cancel();
|
||||||
Log.error("Error retrieving the operation state", caught);
|
Log.error("Error retrieving the operation state", caught);
|
||||||
|
@ -41,7 +41,6 @@ public class FileUploadProgressUpdater extends Timer {
|
||||||
fireOperationFailed(caught, "Failed getting operation updates", message);
|
fireOperationFailed(caught, "Failed getting operation updates", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(FileUploadMonitor result) {
|
public void onSuccess(FileUploadMonitor result) {
|
||||||
Log.info("retrieved FileUploadMonitor: "+result.getState());
|
Log.info("retrieved FileUploadMonitor: "+result.getState());
|
||||||
switch (result.getState()) {
|
switch (result.getState()) {
|
||||||
|
|
|
@ -34,7 +34,6 @@ public class ErrorMessageBox {
|
||||||
box.setMessage(failureReason);
|
box.setMessage(failureReason);
|
||||||
box.addHideHandler(new HideHandler() {
|
box.addHideHandler(new HideHandler() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onHide(HideEvent event) {
|
public void onHide(HideEvent event) {
|
||||||
Dialog dialog = (Dialog) event.getSource();
|
Dialog dialog = (Dialog) event.getSource();
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,8 @@ import com.google.gwt.core.client.Callback;
|
||||||
*/
|
*/
|
||||||
public class NOPCallBack<T,F> implements Callback<T, F> {
|
public class NOPCallBack<T,F> implements Callback<T, F> {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(F reason) {}
|
public void onFailure(F reason) {}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(T result) {}
|
public void onSuccess(T result) {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,14 +48,13 @@ public class GwtTestCSVImportWizardTD extends GWTTestCase {
|
||||||
// Send a request to the server.
|
// Send a request to the server.
|
||||||
tdGWTService.getTabularResources(new AsyncCallback<ArrayList<TabResource>>() {
|
tdGWTService.getTabularResources(new AsyncCallback<ArrayList<TabResource>>() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
// The request resulted in an unexpected error.
|
// The request resulted in an unexpected error.
|
||||||
fail("Request failure: " + caught.getMessage());
|
fail("Request failure: " + caught.getMessage());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(ArrayList<TabResource> result) {
|
public void onSuccess(ArrayList<TabResource> result) {
|
||||||
// Shows the first three resources.
|
// Shows the first three resources.
|
||||||
int i=0;
|
int i=0;
|
||||||
|
|
Loading…
Reference in New Issue