log4j added and system.out.println commented in GxtBorderLayoutPanel e GxtTreePanel

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet@98889 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Loredana Liccardo 2014-07-22 16:32:39 +00:00
parent c8d86470f1
commit 1c4202215f
6 changed files with 261 additions and 164 deletions

View File

@ -33,8 +33,8 @@
<classpathentry kind="lib" path="/home/loredana/Desktop/libraries/gxt-2.2.5.zip"/>
<classpathentry kind="var" path="GLOBUS_LOCATION"/>
<classpathentry kind="var" path="KEYS"/>
<classpathentry kind="lib" path="/home/loredana/Desktop/libraries/slf4j-log4j12-1.6.4.jar"/>
<classpathentry kind="lib" path="/home/loredana/Desktop/libraries/slf4j-api-1.6.4.jar"/>
<classpathentry kind="lib" path="/home/loredana/Desktop/libraries/log4j-1.2.17.jar"/>
<classpathentry kind="lib" path="/home/loredana/Desktop/libraries/slf4j-api-1.6.4.jar"/>
<classpathentry kind="lib" path="/home/loredana/Desktop/libraries/slf4j-log4j12-1.6.4.jar"/>
<classpathentry kind="output" path="target/databases-manager-portlet-1.0.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

65
pom.xml
View File

@ -56,11 +56,11 @@
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.gcube.core</groupId> -->
<!-- <artifactId>common-gcore-clients</artifactId> -->
<!-- <version>[1.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.gcube.core</groupId> -->
<!-- <artifactId>common-gcore-clients</artifactId> -->
<!-- <version>[1.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version> -->
<!-- </dependency> -->
<dependency>
<groupId>org.gcube.contentmanagement</groupId>
@ -135,6 +135,23 @@
<!-- <scope>runtime</scope> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.slf4j</groupId> -->
<!-- <artifactId>slf4j-api</artifactId> -->
<!-- <scope>provided</scope> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.slf4j</groupId> -->
<!-- <artifactId>slf4j-log4j12</artifactId> -->
<!-- <scope>provided</scope> -->
<!-- </dependency> -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
@ -265,25 +282,25 @@
</executions>
</plugin>
<!-- <plugin> -->
<!-- <groupId>org.apache.maven.plugins</groupId> -->
<!-- <artifactId>maven-assembly-plugin</artifactId> -->
<!-- <version>2.2</version> -->
<!-- <configuration> -->
<!-- <descriptors> -->
<!-- <descriptor>${distroDirectory}/descriptor.xml</descriptor> -->
<!-- </descriptors> -->
<!-- </configuration> -->
<!-- <executions> -->
<!-- <execution> -->
<!-- <id>servicearchive</id> -->
<!-- <phase>install</phase> -->
<!-- <goals> -->
<!-- <goal>single</goal> -->
<!-- </goals> -->
<!-- </execution> -->
<!-- </executions> -->
<!-- </plugin> -->
<!-- <plugin> -->
<!-- <groupId>org.apache.maven.plugins</groupId> -->
<!-- <artifactId>maven-assembly-plugin</artifactId> -->
<!-- <version>2.2</version> -->
<!-- <configuration> -->
<!-- <descriptors> -->
<!-- <descriptor>${distroDirectory}/descriptor.xml</descriptor> -->
<!-- </descriptors> -->
<!-- </configuration> -->
<!-- <executions> -->
<!-- <execution> -->
<!-- <id>servicearchive</id> -->
<!-- <phase>install</phase> -->
<!-- <goals> -->
<!-- <goal>single</goal> -->
<!-- </goals> -->
<!-- </execution> -->
<!-- </executions> -->
<!-- </plugin> -->
</plugins>
</build>

View File

@ -0,0 +1,12 @@
# A default log4j configuration for log4j users.
#
# To use this configuration, deploy it into your application's WEB-INF/classes
# directory. You are also encouraged to edit it as you like.
log4j.rootLogger=ERROR, CA
log4j.logger.org.gcube.portlets.user.databasesmanager=TRACE
log4j.appender.CA=org.apache.log4j.ConsoleAppender
log4j.appender.CA.layout=org.apache.log4j.PatternLayout
log4j.appender.CA.layout.ConversionPattern=%-5p %d %c - %m%n

View File

@ -261,9 +261,9 @@ public class GxtBorderLayoutPanel extends ContentPanel {
String text = selectedItem.getName();
// print check
System.out
.println("GxtBorderLayoutPanel--> selected item: "
+ text);
// System.out
// .println("GxtBorderLayoutPanel--> selected item: "
// + text);
rootLogger.log(Level.INFO, "selected item: " + text);
@ -409,9 +409,9 @@ public class GxtBorderLayoutPanel extends ContentPanel {
}
// print check
System.out
.println("GxtBorderLayoutPanel--> selected table: "
+ table.getName());
// System.out
// .println("GxtBorderLayoutPanel--> selected table: "
// + table.getName());
rootLogger.log(Level.INFO, "selected table: "
+ table.getName());
@ -512,8 +512,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// TODO Auto-generated method stub
//print check
System.out
.println("GxtBorderLayoutPanel--> FAILURE RPC LoadTables");
// System.out
// .println("GxtBorderLayoutPanel--> FAILURE RPC LoadTables");
rootLogger.log(Level.SEVERE,
"FAILURE RPC LoadTables");
@ -553,8 +553,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// TODO Auto-generated method stub
//print check
System.out
.println("GxtBorderLayoutPanel--> SUCCESS RPC LoadTables");
// System.out
// .println("GxtBorderLayoutPanel--> SUCCESS RPC LoadTables");
rootLogger.log(Level.SEVERE,
"SUCCESS RPC LoadTables");
@ -1146,8 +1146,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// Window.alert(caught.getMessage());
//print check
System.out
.println("GxtBorderLayoutPanel--> FAILURE RPC submitQuery");
// System.out
// .println("GxtBorderLayoutPanel--> FAILURE RPC submitQuery");
rootLogger.log(Level.SEVERE, "FAILURE RPC submitQuery");
@ -1179,8 +1179,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// TODO Auto-generated method stub
//print check
System.out
.println("GxtBorderLayoutPanel--> SUCCESS RPC submitQuery");
// System.out
// .println("GxtBorderLayoutPanel--> SUCCESS RPC submitQuery");
rootLogger.log(Level.SEVERE, "SUCCESS RPC submitQuery");
@ -1299,8 +1299,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// Window.alert(caught.getMessage());
//print check
System.out
.println("GxtBorderLayoutPanel--> FAILURE RPC sample");
// System.out
// .println("GxtBorderLayoutPanel--> FAILURE RPC sample");
rootLogger.log(Level.SEVERE, "FAILURE RPC sample");
@ -1317,8 +1317,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
public void onSuccess(List<Result> result) {
//print check
System.out
.println("GxtBorderLayoutPanel--> SUCCESS RPC sample");
// System.out
// .println("GxtBorderLayoutPanel--> SUCCESS RPC sample");
rootLogger.log(Level.SEVERE, "SUCCESS RPC sample");
@ -1430,8 +1430,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// System.out.println("FAILURE");
//print check
System.out
.println("GxtBorderLayoutPanel--> FAILURE RPC smartSample");
// System.out
// .println("GxtBorderLayoutPanel--> FAILURE RPC smartSample");
rootLogger.log(Level.SEVERE, "FAILURE RPC smartSample");
@ -1449,8 +1449,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
//print check
//print check
System.out
.println("GxtBorderLayoutPanel--> SUCCESS RPC smartSample");
// System.out
// .println("GxtBorderLayoutPanel--> SUCCESS RPC smartSample");
rootLogger.log(Level.SEVERE, "SUCCESS RPC smartSample");
@ -1562,8 +1562,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// System.out.println("FAILURE");
//print check
System.out
.println("GxtBorderLayoutPanel--> FAILURE RPC randomSample");
// System.out
// .println("GxtBorderLayoutPanel--> FAILURE RPC randomSample");
rootLogger.log(Level.SEVERE, "FAILURE RPC randomSample");
@ -1580,8 +1580,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
public void onSuccess(List<Result> result) {
//print check
System.out
.println("GxtBorderLayoutPanel--> SUCCESS RPC randomSample");
// System.out
// .println("GxtBorderLayoutPanel--> SUCCESS RPC randomSample");
rootLogger.log(Level.SEVERE, "SUCCESS RPC randomSample");
@ -1631,8 +1631,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// System.out.println("FAILURE StartParse");
//print check
System.out
.println("GxtBorderLayoutPanel--> FAILURE RPC parseResult");
// System.out
// .println("GxtBorderLayoutPanel--> FAILURE RPC parseResult");
rootLogger.log(Level.SEVERE, "FAILURE RPC parseResult");
@ -1668,8 +1668,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
public void onSuccess(List<Row> rows) {
//print check
System.out
.println("GxtBorderLayoutPanel--> SUCCESS RPC parseResult");
// System.out
// .println("GxtBorderLayoutPanel--> SUCCESS RPC parseResult");
rootLogger.log(Level.SEVERE, "SUCCESS RPC parseResult");
@ -2027,8 +2027,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// stub
//print check
System.out
.println("GxtBorderLayoutPanel--> FAILURE RPC getTableDetails");
// System.out
// .println("GxtBorderLayoutPanel--> FAILURE RPC getTableDetails");
rootLogger.log(Level.SEVERE,
"FAILURE RPC getTableDetails");
@ -2049,8 +2049,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// stub
//print check
System.out
.println("GxtBorderLayoutPanel--> SUCCESS RPC getTableDetails");
// System.out
// .println("GxtBorderLayoutPanel--> SUCCESS RPC getTableDetails");
rootLogger.log(Level.SEVERE,
"SUCCESS RPC getTableDetails");

View File

@ -183,8 +183,8 @@ public class GxtTreePanel extends LayoutContainer {
// + data.get(0).get("name"));
// print check
System.out.println("GxtTreePanel--> selected item: "
+ value);
// System.out.println("GxtTreePanel--> selected item: "
// + value);
rootLogger.log(Level.INFO,
"GxtTreePanel-> selected item: " + value);
@ -314,8 +314,8 @@ public class GxtTreePanel extends LayoutContainer {
.getModel());
// print check
System.out.println("GxtTreePanel--> expanded item: "
+ value);
// System.out.println("GxtTreePanel--> expanded item: "
// + value);
rootLogger.log(Level.INFO, "expanded item: "
+ selectedItem.getName());
@ -411,7 +411,7 @@ public class GxtTreePanel extends LayoutContainer {
// System.out.println("FAILURE");
// print check
System.out.println("GxtTreePanel--> FAILURE RPC getResource");
// System.out.println("GxtTreePanel--> FAILURE RPC getResource");
rootLogger.log(Level.SEVERE, "FAILURE RPC getResource");
@ -428,7 +428,7 @@ public class GxtTreePanel extends LayoutContainer {
public void onSuccess(List<FileModel> result) {
// print check
System.out.println("GxtTreePanel--> SUCCESS RPC getResource");
// System.out.println("GxtTreePanel--> SUCCESS RPC getResource");
rootLogger.log(Level.SEVERE, "SUCCESS RPC getResource");
@ -474,8 +474,8 @@ public class GxtTreePanel extends LayoutContainer {
// System.out.println("FAILURE");
// print check
System.out
.println("GxtTreePanel--> FAILURE RPC getDBInfo");
// System.out
// .println("GxtTreePanel--> FAILURE RPC getDBInfo");
rootLogger.log(Level.SEVERE, "FAILURE RPC getDBInfo");
@ -494,8 +494,8 @@ public class GxtTreePanel extends LayoutContainer {
LinkedHashMap<String, FileModel> result) {
// print check
System.out
.println("GxtTreePanel--> SUCCESS RPC getDBInfo");
// System.out
// .println("GxtTreePanel--> SUCCESS RPC getDBInfo");
rootLogger.log(Level.SEVERE, "SUCCESS RPC getDBInfo");
@ -664,7 +664,7 @@ public class GxtTreePanel extends LayoutContainer {
// "GxtTreePanel-> FAILURE RPC getDBSchema");
// print check
System.out.println("GxtTreePanel--> FAILURE RPC getDBSchema");
// System.out.println("GxtTreePanel--> FAILURE RPC getDBSchema");
rootLogger.log(Level.SEVERE, "FAILURE RPC getDBSchema");
@ -681,7 +681,7 @@ public class GxtTreePanel extends LayoutContainer {
public void onSuccess(List<FileModel> result) {
// print check
System.out.println("GxtTreePanel--> SUCCESS RPC getDBSchema");
// System.out.println("GxtTreePanel--> SUCCESS RPC getDBSchema");
rootLogger.log(Level.SEVERE, "SUCCESS RPC getDBSchema");

View File

@ -4,8 +4,8 @@ import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
//import java.util.logging.Level;
//import java.util.logging.Logger;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@ -51,6 +51,8 @@ import com.extjs.gxt.ui.client.data.PagingLoadResult;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.thoughtworks.xstream.XStream;
import org.apache.log4j.Logger;
public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
GWTdbManagerService {
@ -67,8 +69,12 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
private String previousSchema = "";
// GWT logger
private static Logger rootLogger = Logger
.getLogger("GWTdbManagerServiceImpl");
// private static Logger rootLogger = Logger
// .getLogger("GWTdbManagerServiceImpl");
//logger
private static Logger logger = Logger.getLogger(GWTdbManagerServiceImpl.class);
public GWTdbManagerServiceImpl() {
@ -105,7 +111,8 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// print check
// System.out.println("getting input parameters");
rootLogger.log(Level.SEVERE, "getting input parameters");
// rootLogger.log(Level.SEVERE, "getting input parameters");
logger.info("getting input parameters");
// print check
// for (int i = 0; i < inputParameters.size(); i++) {
@ -120,7 +127,8 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
//print check
// retrieve data
// System.out.println("output data retrieved");
rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data retrieved");
// logger.info("output data retrieved");
for (int i = 0; i < outputMap.size(); i++) {
@ -155,30 +163,33 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// print check
// System.out.println("algorithmId: " + algorithmId);
// rootLogger.log(Level.SEVERE, "algorithmId: " + algorithmId);
// rootLogger.log(Level.SEVERE, "algorithmId: " + algorithmId);
}
}
// get input parameters of the algorithm
rootLogger.log(Level.SEVERE, "getting input parameters");
// rootLogger.log(Level.SEVERE, "getting input parameters");
logger.info("getting input parameters");
inputParameters = getParameters(algorithmId);
// print check
// for (int i = 0; i < inputParameters.size(); i++) {
//
// // System.out.println(inputParameters.get(i).getName());
// inputParameters.get(i).setValue(resourceName);
//
// // rootLogger.log(Level.INFO, "ResourceName: " + resourceName);
// rootLogger.log(Level.INFO, inputParameters.get(i).getName());
// }
for (int i = 0; i < inputParameters.size(); i++) {
// System.out.println(inputParameters.get(i).getName());
inputParameters.get(i).setValue(resourceName);
// rootLogger.log(Level.INFO, "ResourceName: " + resourceName);
//print check
// rootLogger.log(Level.INFO, inputParameters.get(i).getName());
}
String computationId = startComputation(algorithmId, inputParameters);
////print check
// retrieve data
// System.out.println("output data retrieved");
rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data retrieved");
for (int i = 0; i < outputMap.size(); i++) {
@ -213,7 +224,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
if (algorithms.get(i).equals("LISTDBSCHEMA")) {
algorithmId = algorithms.get(i);
logger.info("id: " + algorithmId);
// print check
// System.out.println("algorithmId: " + algorithmId);
// rootLogger.log(Level.SEVERE, "algorithmId: " + algorithmId);
@ -221,7 +232,8 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
}
// get input parameters of the algorithm
rootLogger.log(Level.SEVERE, "getting input parameters");
// rootLogger.log(Level.SEVERE, "getting input parameters");
logger.info("getting input parameters");
inputParameters = getParameters(algorithmId);
@ -236,18 +248,23 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
inputParameters.get(1).setValue(dataInput.get("DatabaseName"));
// print check
rootLogger.log(Level.INFO,
"ResourceName: " + dataInput.get("ResourceName"));
// rootLogger.log(Level.INFO,
// "ResourceName: " + dataInput.get("ResourceName"));
logger.info("ResourceName: " + dataInput.get("ResourceName"));
rootLogger.log(Level.INFO,
"DatabaseName: " + dataInput.get("DatabaseName"));
// rootLogger.log(Level.INFO,
// "DatabaseName: " + dataInput.get("DatabaseName"));
logger.info("DatabaseName: " + dataInput.get("DatabaseName"));
String computationId = startComputation(algorithmId, inputParameters);
//print check
// retrieve data
// System.out.println("output data retrieved");
rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data retrieved");
for (int i = 0; i < outputMap.size(); i++) {
@ -286,7 +303,8 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
}
// get input parameters of the algorithm
rootLogger.log(Level.SEVERE, "getting input parameters");
// rootLogger.log(Level.SEVERE, "getting input parameters");
logger.info("getting input parameters");
inputParameters = getParameters(algorithmId);
@ -301,19 +319,23 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
inputParameters.get(1).setValue(dataInput.get("DatabaseName"));
inputParameters.get(2).setValue(dataInput.get("SchemaName"));
rootLogger.log(Level.SEVERE,
"ResourceName: " + dataInput.get("ResourceName"));
rootLogger.log(Level.SEVERE,
"DatabaseName: " + dataInput.get("DatabaseName"));
rootLogger.log(Level.SEVERE,
"SchemaName: " + dataInput.get("SchemaName"));
// rootLogger.log(Level.SEVERE,
// "ResourceName: " + dataInput.get("ResourceName"));
// rootLogger.log(Level.SEVERE,
// "DatabaseName: " + dataInput.get("DatabaseName"));
// rootLogger.log(Level.SEVERE,
// "SchemaName: " + dataInput.get("SchemaName"));
logger.info("ResourceName: " + dataInput.get("ResourceName"));
logger.info("DatabaseName: " + dataInput.get("DatabaseName"));
logger.info("SchemaName: " + dataInput.get("SchemaName"));
String computationId = startComputation(algorithmId, inputParameters);
//print check
// retrieve data
// System.out.println("output data retrieved");
rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data size: " + outputMap.size());
// System.out.println("size outputMap: " + outputMap.size());
@ -365,8 +387,8 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
List<Result> sublist = new ArrayList<Result>();
BasePagingLoadResult loadResult = null;
rootLogger.log(Level.INFO, "Searching in the table: " + SearchTable);
rootLogger.log(Level.INFO, "Keyword to search: " + keyword);
// rootLogger.log(Level.INFO, "Searching in the table: " + SearchTable);
// rootLogger.log(Level.INFO, "Keyword to search: " + keyword);
int start = config.getOffset();
int limit = result.size();
@ -422,8 +444,10 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
boolean smartCorrectionQuery, String language) throws Exception {
// System.out.println("language detected: " + language);
rootLogger.log(Level.SEVERE, "Dialect used for smart correction:: "
+ language);
// rootLogger.log(Level.SEVERE, "Dialect used for smart correction:: "
// + language);
logger.info("Dialect used for smart correction: " + language);
List<Parameter> inputParameters = new ArrayList<Parameter>();
List<Result> output = new ArrayList<Result>();
@ -447,8 +471,9 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
}
// get input parameters of the algorithm
rootLogger.log(Level.SEVERE, "getting input parameters");
// rootLogger.log(Level.SEVERE, "getting input parameters");
logger.info("getting input parameters");
inputParameters = getParameters(algorithmId);
// print check
@ -462,11 +487,17 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
inputParameters.get(1).setValue(dataDB.get("DatabaseName"));
// print check
rootLogger
.log(Level.INFO, "ResourceName " + dataDB.get("ResourceName"));
rootLogger.log(Level.INFO, "DatabaseName" + dataDB.get("DatabaseName"));
rootLogger.log(Level.INFO, "Query" + query);
rootLogger.log(Level.INFO, "SmartCorrections check:" + smartCorrectionQuery);
// rootLogger
// .log(Level.INFO, "ResourceName " + dataDB.get("ResourceName"));
// rootLogger.log(Level.INFO, "DatabaseName" + dataDB.get("DatabaseName"));
// rootLogger.log(Level.INFO, "Query" + query);
// rootLogger.log(Level.INFO, "SmartCorrections check:" + smartCorrectionQuery);
logger.info("ResourceName: " + dataDB.get("ResourceName"));
logger.info("DatabaseName: " + dataDB.get("DatabaseName"));
logger.info("Query: " + query);
logger.info("SmartCorrections check: " + smartCorrectionQuery);
inputParameters.get(2).setValue(String.valueOf(valueReadOnlyQuery));
inputParameters.get(3).setValue(String.valueOf(smartCorrectionQuery));
@ -483,7 +514,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// System.out.println("output data retrieved");
// System.out.println("size outputMap: " + outputMap.size());
rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data size: " + outputMap.size());
for (int i = 0; i < outputMap.size(); i++) {
@ -540,7 +571,8 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// get input parameters of the algorithm
rootLogger.log(Level.SEVERE, "getting input parameters");
// rootLogger.log(Level.SEVERE, "getting input parameters");
logger.info("getting input parameters");
inputParameters = getParameters(algorithmId);
@ -554,12 +586,20 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// }
// print check
rootLogger.log(Level.INFO,
"ResourceName " + dataInput.get("ResourceName"));
rootLogger.log(Level.INFO,
"DatabaseName " + dataInput.get("DatabaseName"));
rootLogger.log(Level.INFO, "SchemaName " + dataInput.get("SchemaName"));
rootLogger.log(Level.INFO, "TableName " + dataInput.get("TableName"));
// rootLogger.log(Level.INFO,
// "ResourceName " + dataInput.get("ResourceName"));
// rootLogger.log(Level.INFO,
// "DatabaseName " + dataInput.get("DatabaseName"));
// rootLogger.log(Level.INFO, "SchemaName " + dataInput.get("SchemaName"));
// rootLogger.log(Level.INFO, "TableName " + dataInput.get("TableName"));
logger.info("ResourceName: " + dataInput.get("ResourceName"));
logger.info("DatabaseName: " + dataInput.get("DatabaseName"));
logger.info("SchemaName: " + dataInput.get("SchemaName"));
logger.info("TableName: " + dataInput.get("TableName"));
inputParameters.get(0).setValue(dataInput.get("ResourceName"));
inputParameters.get(1).setValue(dataInput.get("DatabaseName"));
@ -576,7 +616,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// System.out.println("size outputMap: " + outputMap.size());
// print check
rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data size: " + outputMap.size());
for (int i = 0; i < outputMap.size(); i++) {
@ -627,7 +667,9 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// get input parameters of the algorithm
rootLogger.log(Level.SEVERE, "getting input parameters");
// rootLogger.log(Level.SEVERE, "getting input parameters");
logger.info("getting input parameters");
inputParameters = getParameters(algorithmId);
@ -641,12 +683,17 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// }
// print check
rootLogger.log(Level.INFO,
"ResourceName " + dataInput.get("ResourceName"));
rootLogger.log(Level.INFO,
"DatabaseName " + dataInput.get("DatabaseName"));
rootLogger.log(Level.INFO, "SchemaName " + dataInput.get("SchemaName"));
rootLogger.log(Level.INFO, "TableName " + dataInput.get("TableName"));
// rootLogger.log(Level.INFO,
// "ResourceName " + dataInput.get("ResourceName"));
// rootLogger.log(Level.INFO,
// "DatabaseName " + dataInput.get("DatabaseName"));
// rootLogger.log(Level.INFO, "SchemaName " + dataInput.get("SchemaName"));
// rootLogger.log(Level.INFO, "TableName " + dataInput.get("TableName"));
logger.info("ResourceName: " + dataInput.get("ResourceName"));
logger.info("DatabaseName: " + dataInput.get("DatabaseName"));
logger.info("SchemaName: " + dataInput.get("SchemaName"));
logger.info("TableName: " + dataInput.get("TableName"));
inputParameters.get(0).setValue(dataInput.get("ResourceName"));
inputParameters.get(1).setValue(dataInput.get("DatabaseName"));
@ -663,7 +710,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// System.out.println("size outputMap: " + outputMap.size());
// print check
rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data size: " + outputMap.size());
for (int i = 0; i < outputMap.size(); i++) {
@ -715,7 +762,8 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// get input parameters of the algorithm
rootLogger.log(Level.SEVERE, "getting input parameters");
// rootLogger.log(Level.SEVERE, "getting input parameters");
logger.info("getting input parameters");
inputParameters = getParameters(algorithmId);
@ -729,12 +777,17 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// }
// print check
rootLogger.log(Level.INFO,
"ResourceName " + dataInput.get("ResourceName"));
rootLogger.log(Level.INFO,
"DatabaseName " + dataInput.get("DatabaseName"));
rootLogger.log(Level.INFO, "SchemaName " + dataInput.get("SchemaName"));
rootLogger.log(Level.INFO, "TableName " + dataInput.get("TableName"));
// rootLogger.log(Level.INFO,
// "ResourceName " + dataInput.get("ResourceName"));
// rootLogger.log(Level.INFO,
// "DatabaseName " + dataInput.get("DatabaseName"));
// rootLogger.log(Level.INFO, "SchemaName " + dataInput.get("SchemaName"));
// rootLogger.log(Level.INFO, "TableName " + dataInput.get("TableName"));
logger.info("ResourceName: " + dataInput.get("ResourceName"));
logger.info("DatabaseName: " + dataInput.get("DatabaseName"));
logger.info("SchemaName: " + dataInput.get("SchemaName"));
logger.info("TableName: " + dataInput.get("TableName"));
inputParameters.get(0).setValue(dataInput.get("ResourceName"));
inputParameters.get(1).setValue(dataInput.get("DatabaseName"));
@ -751,7 +804,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// System.out.println("size outputMap: " + outputMap.size());
// print check
rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data size: " + outputMap.size());
for (int i = 0; i < outputMap.size(); i++) {
@ -802,7 +855,9 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// get input parameters of the algorithm
rootLogger.log(Level.SEVERE, "getting input parameters");
// rootLogger.log(Level.SEVERE, "getting input parameters");
logger.info("getting input parameters");
inputParameters = getParameters(algorithmId);
@ -816,13 +871,18 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// }
// print check
rootLogger.log(Level.INFO,
"ResourceName " + dataInput.get("ResourceName"));
rootLogger.log(Level.INFO,
"DatabaseName " + dataInput.get("DatabaseName"));
rootLogger.log(Level.INFO, "SchemaName " + dataInput.get("SchemaName"));
rootLogger.log(Level.INFO, "TableName " + dataInput.get("TableName"));
// rootLogger.log(Level.INFO,
// "ResourceName " + dataInput.get("ResourceName"));
// rootLogger.log(Level.INFO,
// "DatabaseName " + dataInput.get("DatabaseName"));
// rootLogger.log(Level.INFO, "SchemaName " + dataInput.get("SchemaName"));
// rootLogger.log(Level.INFO, "TableName " + dataInput.get("TableName"));
logger.info("ResourceName: " + dataInput.get("ResourceName"));
logger.info("DatabaseName: " + dataInput.get("DatabaseName"));
logger.info("SchemaName: " + dataInput.get("SchemaName"));
logger.info("TableName: " + dataInput.get("TableName"));
inputParameters.get(0).setValue(dataInput.get("ResourceName"));
inputParameters.get(1).setValue(dataInput.get("DatabaseName"));
@ -839,7 +899,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// System.out.println("size outputMap: " + outputMap.size());
//print check
rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data retrieved");
// rootLogger.log(Level.SEVERE, "output data size: " + outputMap.size());
for (int i = 0; i < outputMap.size(); i++) {
@ -973,7 +1033,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
}
private List<String> getDatabaseManagerAlgorithms() throws Exception {
private List<String> getDatabaseManagerAlgorithms() {
ArrayList<String> dbAlg = new ArrayList<String>();
StatisticalManagerFactory factory = getFactory();
@ -983,10 +1043,12 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
if (groups == null)
// System.out.println("GROUPS OF ALGORITHMS IS NULL!");
rootLogger.log(Level.SEVERE, "GROUPS OF ALGORITHMS IS NULL!");
// rootLogger.log(Level.SEVERE, "GROUPS OF ALGORITHMS IS NULL!");
logger.info("GROUPS OF ALGORITHMS IS NULL!");
else
// System.out.println("GROUPS OF ALGORITHMS IS NOT NULL!");
rootLogger.log(Level.SEVERE, "GROUPS OF ALGORITHMS IS NOT NULL!");
// rootLogger.log(Level.SEVERE, "GROUPS OF ALGORITHMS IS NOT NULL!");
logger.info("GROUPS OF ALGORITHMS IS NOT NULL!");
// get list categories
for (SMGroupedAlgorithms group : groups.thelist()) {
@ -1053,7 +1115,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
}
private String startComputation(String algorithmName,
List<Parameter> parameters) throws Exception {
List<Parameter> parameters) throws Exception{
SMComputationConfig config = new SMComputationConfig();
@ -1115,7 +1177,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// System.out.println("GWTdbManagerServiceImpl->RUNNING");
rootLogger.log(Level.SEVERE, "RUNNING");
// rootLogger.log(Level.SEVERE, "RUNNING");
SMOperationInfo infos = factory.getComputationInfo(computationId,
user);
@ -1129,7 +1191,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|| (status == SMOperationStatus.FAILED)) {
// System.out.println("GWTdbManagerServiceImpl->COMPLETED OR FAILED");
rootLogger.log(Level.SEVERE, "COMPLETED OR FAILED");
// rootLogger.log(Level.SEVERE, "COMPLETED OR FAILED");
SMAbstractResource abstractResource = computation
.abstractResource();
@ -1148,8 +1210,8 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// System.out.println("GWTdbManagerServiceImpl-> SM resource Name: "
// + smResource.name());
rootLogger.log(Level.SEVERE,
"SM resource Name: " + smResource.name());
// rootLogger.log(Level.SEVERE,
// "SM resource Name: " + smResource.name());
// System.out.println("GWTdbManagerServiceImpl-> SM resource ID: "
// + smResource.resourceId());
@ -1195,22 +1257,27 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
if (objRes.name().contentEquals(PrimitiveTypes.MAP.toString())) {
// System.out.println("Output is a map");
rootLogger.log(Level.SEVERE, "Output is a map");
// rootLogger.log(Level.SEVERE, "Output is a map");
// Map<String, String> outputMap = getMap(objRes);
this.outputMap = (LinkedHashMap<String, String>) getMap(objRes);
} else if (objRes.name().contentEquals(
PrimitiveTypes.IMAGES.toString())) {
// System.out.println("Output are images");
rootLogger.log(Level.SEVERE, "Output are images");
} else
// rootLogger.log(Level.SEVERE, "Output are images");
}
// else
// System.out.println("Output is other");
rootLogger.log(Level.SEVERE, "Output is other");
// rootLogger.log(Level.SEVERE, "Output is other");
}
// EXCEPTION MANAGEMENT
if (smResType.equals(SMResourceType.ERROR)) {
throw new Exception(smResource.description());
Exception e= new Exception(smResource.description());
logger.error(e);
throw e;
// throw new Exception(smResource.description());
}
// break;
@ -1225,7 +1292,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// System.out.println("getMap");
rootLogger.log(Level.SEVERE, "getMap");
// rootLogger.log(Level.SEVERE, "getMap");
outputKey = new LinkedHashMap<String, String>();
@ -1291,8 +1358,9 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
// System.out.println("Map retrieved with size: " + smMap.size());
rootLogger
.log(Level.SEVERE, "Map retrieved with size: " + smMap.size());
// rootLogger
// .log(Level.SEVERE, "Map retrieved with size: " + smMap.size());
return outputmap;
}