From cf31d3f0321426c5a9d40908377c20dc3c7832c3 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 5 May 2011 13:46:48 -0400 Subject: [PATCH 01/16] Add QtSOAP external project --- CMakeExternals/QtSOAP.cmake | 33 +++++++++++++++++++++++++++++++++ SuperBuild.cmake | 4 ++++ 2 files changed, 37 insertions(+) create mode 100644 CMakeExternals/QtSOAP.cmake diff --git a/CMakeExternals/QtSOAP.cmake b/CMakeExternals/QtSOAP.cmake new file mode 100644 index 0000000..6fafa99 --- /dev/null +++ b/CMakeExternals/QtSOAP.cmake @@ -0,0 +1,33 @@ + +# Sanity checks +IF(DEFINED QtSOAP_DIR AND NOT EXISTS ${QtSOAP_DIR}) + MESSAGE(FATAL_ERROR "QtSOAP_DIR variable is defined but corresponds to non-existing directory") +ENDIF() + +SET(proj QtSOAP) +SET(proj_DEPENDENCIES) + +SET(QtSOAP_DEPENDS ${proj}) + +IF(NOT DEFINED QtSOAP_DIR) + MESSAGE(STATUS "Adding external project: ${proj}") + ExternalProject_Add(${proj} + SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj} + BINARY_DIR ${proj}-build + PREFIX ${proj}${ep_suffix} + GIT_REPOSITORY "${git_protocol}://github.com/commontk/QtSOAP.git" + GIT_TAG "origin/master" + CMAKE_GENERATOR ${gen} + INSTALL_COMMAND "" + CMAKE_ARGS + ${ep_common_args} + -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} + DEPENDS + ${proj_DEPENDENCIES} + ) + SET(QtSOAP_DIR "${ep_build_dir}/${proj}") + +ELSE() + ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") +ENDIF() + diff --git a/SuperBuild.cmake b/SuperBuild.cmake index 6fb31ff..d237a97 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -51,6 +51,7 @@ endif() include(CMakeExternals/VTK.cmake) include(CMakeExternals/QtPropertyBrowser.cmake) +include(CMakeExternals/QtSOAP.cmake) include(CMakeExternals/VisomicsData.cmake) #include(CMakeExternals/CTK.cmake) @@ -99,6 +100,8 @@ ExternalProject_Add(${proj} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} # QtPropertyBrowser -DQtPropertyBrowser_DIR:PATH=${QtPropertyBrowser_DIR} + # QtSOAP + -DQtSOAP_DIR:PATH=${QtSOAP_DIR} # VisomicsData -DVisomicsData_DIR:PATH=${VisomicsData_DIR} # VTK @@ -113,6 +116,7 @@ ExternalProject_Add(${proj} DEPENDS # Mandatory dependencies ${QtPropertyBrowser_DEPENDS} + ${QtSOAP_DEPENDS} ${VisomicsData_DEPENDS} #${CTK_DEPENDS} ${VTK_DEPENDS} From 1381bbce576c633f29537b411cddb41e39bcd403 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 25 May 2011 20:27:47 -0400 Subject: [PATCH 02/16] Set QtSOAP_DIR appropriately --- Base/CMakeLists.txt | 42 ++++++++++++++++++++++++++----------- CMakeExternals/QtSOAP.cmake | 2 +- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Base/CMakeLists.txt b/Base/CMakeLists.txt index 1378e47..7b32283 100644 --- a/Base/CMakeLists.txt +++ b/Base/CMakeLists.txt @@ -2,6 +2,8 @@ PROJECT(VisomicsBase) SET(KIT_SRCS + Analysis/voFoldChange.cpp + Analysis/voFoldChange.h Analysis/voHierarchicalClustering.h Analysis/voHierarchicalClustering.cpp Analysis/voKEGG.h @@ -10,26 +12,32 @@ SET(KIT_SRCS Analysis/voKMeansClustering.h Analysis/voPCAStatistics.cpp Analysis/voPCAStatistics.h + Analysis/voTTest.cpp + Analysis/voTTest.h Analysis/voXCorrel.cpp Analysis/voXCorrel.h + + Normalization/voLog2.cpp + Normalization/voLog2.h Views/voCorrelationGraphView.cpp Views/voCorrelationGraphView.h + Views/voCorrelationHeatMapView.cpp + Views/voCorrelationHeatMapView.h Views/voExtendedTableView.cpp Views/voExtendedTableView.h - Views/voPCABarPlot.cpp - Views/voPCABarPlot.h - Views/voPCAProjectionPlot.cpp - Views/voPCAProjectionPlot.h + Views/voHorizontalBarView.h + Views/voHorizontalBarView.cpp + Views/voPCABarView.cpp + Views/voPCABarView.h + Views/voPCAProjectionView.cpp + Views/voPCAProjectionView.h Views/voTableView.cpp Views/voTableView.h Views/voTreeGraphView.h Views/voTreeGraphView.cpp - Views/voCorrelationHeatMapView.cpp - Views/voCorrelationHeatMapView.h - Views/voChartXY.h - Views/voChartXY.cpp - + Views/voVolcanoView.cpp + Views/voVolcanoView.h voAnalysis.cpp voAnalysis.h @@ -53,6 +61,8 @@ SET(KIT_SRCS voIOManager.cpp voIOManager.h voQObjectFactory.h + voRegistry.cpp + voRegistry.h voTableDataObject.cpp voTableDataObject.h voUtils.cpp @@ -69,19 +79,23 @@ SET(KIT_SRCS ) SET(KIT_MOC_SRCS + Analysis/voFoldChange.h Analysis/voHierarchicalClustering.h Analysis/voKEGG.h Analysis/voKMeansClustering.h Analysis/voPCAStatistics.h + Analysis/voTTest.h Analysis/voXCorrel.h Views/voCorrelationGraphView.h + Views/voCorrelationHeatMapView.h Views/voExtendedTableView.h - Views/voPCABarPlot.h - Views/voPCAProjectionPlot.h + Views/voHorizontalBarView.h + Views/voPCABarView.h + Views/voPCAProjectionView.h Views/voTableView.h Views/voTreeGraphView.h - Views/voCorrelationHeatMapView.h + Views/voVolcanoView.h voAnalysis.h voAnalysisDriver.h @@ -106,6 +120,8 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Analysis ${CMAKE_CURRENT_BINARY_DIR}/Analysis + ${CMAKE_CURRENT_SOURCE_DIR}/Normalization + ${CMAKE_CURRENT_BINARY_DIR}/Normalization ${CMAKE_CURRENT_SOURCE_DIR}/Views ${CMAKE_CURRENT_BINARY_DIR}/Views ) @@ -156,5 +172,7 @@ TARGET_LINK_LIBRARIES( IF(BUILD_TESTING) ADD_SUBDIRECTORY(Testing) + ADD_SUBDIRECTORY(Analysis/Testing) + ADD_SUBDIRECTORY(Normalization/Testing) ENDIF() diff --git a/CMakeExternals/QtSOAP.cmake b/CMakeExternals/QtSOAP.cmake index 6fafa99..adae5d0 100644 --- a/CMakeExternals/QtSOAP.cmake +++ b/CMakeExternals/QtSOAP.cmake @@ -25,7 +25,7 @@ IF(NOT DEFINED QtSOAP_DIR) DEPENDS ${proj_DEPENDENCIES} ) - SET(QtSOAP_DIR "${ep_build_dir}/${proj}") + SET(QtSOAP_DIR "${CMAKE_BINARY_DIR}/${proj}-build") ELSE() ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") From d52216250a263649ac7f04a77101aaa0fbcd4f1a Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 25 May 2011 20:42:27 -0400 Subject: [PATCH 03/16] QtXML is required by QtSOAP --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03a9a58..2e16326 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,7 @@ ENDFOREACH() #----------------------------------------------------------------------------- # Qt # -FIND_PACKAGE(Qt4 4.7 COMPONENTS QtCore QtGui QtNetwork QtScript REQUIRED) +FIND_PACKAGE(Qt4 4.7 COMPONENTS QtCore QtGui QtNetwork QtScript QtXML REQUIRED) INCLUDE(${QT_USE_FILE}) #----------------------------------------------------------------------------- From 8553232a9207fa1f2cc81426d20b1fd753c5b06c Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 25 May 2011 20:42:58 -0400 Subject: [PATCH 04/16] Find QtSOAP package and include associated "use file". --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e16326..35721a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,6 +160,12 @@ ENDIF() FIND_PACKAGE(QtPropertyBrowser REQUIRED) INCLUDE(${QtPropertyBrowser_USE_FILE}) +#----------------------------------------------------------------------------- +# QtSOAP + +FIND_PACKAGE(QtSOAP REQUIRED) +INCLUDE(${QtSOAP_USE_FILE}) + #----------------------------------------------------------------------------- # Set C/CXX Flags # From 0e6ea7e824a8c832ef50c1a25d3d1bbdff5ebe37 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 25 May 2011 20:39:46 -0400 Subject: [PATCH 05/16] Add voUtilsSoap Provides two convenient functions allowing to display the content of QtSoapType objects. --- Base/CMakeLists.txt | 3 +++ Base/voUtilsSoap.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++++ Base/voUtilsSoap.h | 19 ++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 Base/voUtilsSoap.cpp create mode 100644 Base/voUtilsSoap.h diff --git a/Base/CMakeLists.txt b/Base/CMakeLists.txt index 7b32283..f92653c 100644 --- a/Base/CMakeLists.txt +++ b/Base/CMakeLists.txt @@ -67,6 +67,8 @@ SET(KIT_SRCS voTableDataObject.h voUtils.cpp voUtils.h + voUtilsSoap.cpp + voUtilsSoap.h voView.cpp voView.h voViewFactory.cpp @@ -163,6 +165,7 @@ SET(${PROJECT_NAME}_LINK_LIBRARIES ${VTK_LIBRARIES} ${EXTRA_LIBRARIES} ${QT_LIBRARIES} + ${QtSOAP_LIBRARIES} QtPropertyBrowser ) TARGET_LINK_LIBRARIES( diff --git a/Base/voUtilsSoap.cpp b/Base/voUtilsSoap.cpp new file mode 100644 index 0000000..bc0a4e1 --- /dev/null +++ b/Base/voUtilsSoap.cpp @@ -0,0 +1,46 @@ + +// QtSoap includes +#include + +// Visomics includes +#include "voUtilsSoap.h" + +//---------------------------------------------------------------------------- +void voUtils::Soap::DumpAll(const QtSoapType& type, std::ostream &os, int indent) +{ + if(indent == 0) + { + QString s; + s = "Dumping:\n" + type.typeName() + ": " + type.name().name(); + if (type.count() == 0) + { + s += " - Value: \"" + type.value().toString() + "\""; + } + os << qPrintable(s) << std::endl; + indent = 4; + } + for (int i = 0; i < type.count(); ++i) + { + QString s; + s = QString(indent, ' ') + type[i].typeName() + ": " + type[i].name().name(); + if (type[i].count() == 0) + { + s += " - Value: \"" + type[i].value().toString() + "\""; + } + os << qPrintable(s) << std::endl; + if(type[i].count() > 0) + { + voUtils::Soap::DumpAll(type[i], os, indent + 4); + } + } +} + +//---------------------------------------------------------------------------- +void voUtils::Soap::DumpType(const QtSoapType& sstruct) +{ + std::cout << "Dumping: " << qPrintable(sstruct.typeName()) << " " << qPrintable(sstruct.name().name()) << std::endl; + for (int i = 0; i < sstruct.count(); ++i) + { + std::cout << qPrintable(sstruct[i].typeName()) << " " << qPrintable(sstruct[i].name().name()) << std::endl; + } +} diff --git a/Base/voUtilsSoap.h b/Base/voUtilsSoap.h new file mode 100644 index 0000000..319fa84 --- /dev/null +++ b/Base/voUtilsSoap.h @@ -0,0 +1,19 @@ + +// STD includes +#include + +class QtSoapType; + +namespace voUtils +{ + +namespace Soap +{ + +void DumpAll(const QtSoapType& type, std::ostream &os = std::cout, int indent = 0); + +void DumpType(const QtSoapType& sstruct); + +} // end of Soap namespace + +} // end of voUtils namespace From 7baf4012d62b4ccd3f3d71b69b4365b80bc6389d Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 25 May 2011 20:41:06 -0400 Subject: [PATCH 06/16] Add voSoapClient and associated test The class voSoapClient provides method submitSoapRequest allowing to quiery a Soap server. --- Base/CMakeLists.txt | 3 + Base/Testing/Cpp/CMakeLists.txt | 2 + Base/voSoapClient.cpp | 100 ++++++++++++++++++++++++++++++++ Base/voSoapClient.h | 37 ++++++++++++ 4 files changed, 142 insertions(+) create mode 100644 Base/voSoapClient.cpp create mode 100644 Base/voSoapClient.h diff --git a/Base/CMakeLists.txt b/Base/CMakeLists.txt index f92653c..39e0df8 100644 --- a/Base/CMakeLists.txt +++ b/Base/CMakeLists.txt @@ -63,6 +63,8 @@ SET(KIT_SRCS voQObjectFactory.h voRegistry.cpp voRegistry.h + voSoapClient.cpp + voSoapClient.h voTableDataObject.cpp voTableDataObject.h voUtils.cpp @@ -106,6 +108,7 @@ SET(KIT_MOC_SRCS voDataModel_p.h voDataObject.h voInputFileDataObject.h + voSoapClient.h voTableDataObject.h voView.h voViewManager.h diff --git a/Base/Testing/Cpp/CMakeLists.txt b/Base/Testing/Cpp/CMakeLists.txt index bf12794..68a08fe 100644 --- a/Base/Testing/Cpp/CMakeLists.txt +++ b/Base/Testing/Cpp/CMakeLists.txt @@ -4,6 +4,7 @@ SET(KIT ${PROJECT_NAME}) CREATE_TEST_SOURCELIST(Tests ${KIT}CppTests.cpp voAnalysisTest.cpp voUtilsTest.cpp + voSoapClientTest.cpp vtkExtendedTableTest.cpp ) @@ -22,6 +23,7 @@ ENDMACRO() SIMPLE_TEST(voAnalysisTest) SIMPLE_TEST(voUtilsTest) +SIMPLE_TEST(voSoapClientTest) SIMPLE_TEST(vtkExtendedTableTest) diff --git a/Base/voSoapClient.cpp b/Base/voSoapClient.cpp new file mode 100644 index 0000000..8f0a722 --- /dev/null +++ b/Base/voSoapClient.cpp @@ -0,0 +1,100 @@ + +// Qt includes +//#include +//#include +#include + +// QtSOAP includes +#include +#include + +// Visomics includes +#include "voSoapClient.h" + +//---------------------------------------------------------------------------- +class voSoapClientPrivate +{ +public: + + QEventLoop BlockingLoop; + QtSoapHttpTransport Http; + + QString Xmlns; + QString Path; +}; + +//---------------------------------------------------------------------------- +voSoapClient::voSoapClient(int port, const QString& host, const QString& path, const QString& xmlns) + : d_ptr(new voSoapClientPrivate()) +{ + Q_D(voSoapClient); + + d->Xmlns = xmlns; + d->Path = path; + + connect(&d->Http, SIGNAL(responseReady()), this, SLOT(responseReady())); + + d->Http.setHost(host, /* useSecureHTTP= */false, port); +} + +//---------------------------------------------------------------------------- +voSoapClient::~voSoapClient() +{ + +} + +//---------------------------------------------------------------------------- +void voSoapClient::responseReady() +{ + Q_D(voSoapClient); + d->BlockingLoop.exit(); +} + +//---------------------------------------------------------------------------- +const QtSoapMessage & voSoapClient::submitSoapRequest(const QString& methodName, + QtSoapType* soapType) +{ + QList list; + if (soapType) + { + list << soapType; + } + return this->submitSoapRequest(methodName, list); +} + +//---------------------------------------------------------------------------- +const QtSoapMessage & voSoapClient::submitSoapRequest(const QString& methodName, + const QList& soapTypes) +{ + Q_D(voSoapClient); + + // qDebug() << "invoking method:" << methodName; + + QtSoapMessage request; + request.setMethod(QtSoapQName(methodName, d->Xmlns)); + if(!soapTypes.isEmpty()) + { + foreach(QtSoapType * soapType, soapTypes) + { + request.addMethodArgument(soapType); +// qDebug() << "\tArgument " << soapType->typeName() + ":" + soapType->name().name() << "added"; + } + } +// qDebug() << request.toXmlString(); + + d->Http.submitRequest(request, d->Path); + +// qDebug() << "Submitted request:" << methodName; + +// QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); + + d->BlockingLoop.exec(QEventLoop::ExcludeUserInputEvents | QEventLoop::WaitForMoreEvents); + +// QApplication::restoreOverrideCursor(); + + //qDebug() << "Reply error: " << reply->errorString(); + //qDebug() << reply->readAll(); + const QtSoapMessage& response = d->Http.getResponse(); +// qDebug() << "\t=> OK"; + return response; +} diff --git a/Base/voSoapClient.h b/Base/voSoapClient.h new file mode 100644 index 0000000..72932fe --- /dev/null +++ b/Base/voSoapClient.h @@ -0,0 +1,37 @@ + + +#ifndef __voSoapClient_h +#define __voSoapClient_h + +// Qt includes +#include + +class QtSoapMessage; +class QtSoapType; +class voSoapClientPrivate; + +class voSoapClient : public QObject +{ + Q_OBJECT +public: + voSoapClient(int port, const QString& host, const QString& path, const QString& xmlns); + virtual ~voSoapClient(); + + const QtSoapMessage & submitSoapRequest(const QString& methodName, const QList& soapTypes); + const QtSoapMessage & submitSoapRequest(const QString& methodName, QtSoapType* soapType = 0); + +private slots: + + void responseReady(); + +private: + + const QScopedPointer d_ptr; + + Q_DECLARE_PRIVATE(voSoapClient); + Q_DISABLE_COPY(voSoapClient); +}; + + +#endif + From 7bf67cf3c584a4c9a30c51af0889190c233cee7d Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 26 May 2011 13:20:43 -0400 Subject: [PATCH 07/16] Add missing voSoapClientTest.cpp file --- Base/Testing/Cpp/voSoapClientTest.cpp | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Base/Testing/Cpp/voSoapClientTest.cpp diff --git a/Base/Testing/Cpp/voSoapClientTest.cpp b/Base/Testing/Cpp/voSoapClientTest.cpp new file mode 100644 index 0000000..6ebfb9f --- /dev/null +++ b/Base/Testing/Cpp/voSoapClientTest.cpp @@ -0,0 +1,43 @@ + +// Qt includes +#include +#include + +// QtSoap includes +#include + +// Visomics includes +#include "voSoapClient.h" +#include "voUtilsSoap.h" + +// STD includes +#include +#include + +//----------------------------------------------------------------------------- +int voSoapClientTest(int argc, char * argv []) +{ + QApplication app(argc, argv); + + voSoapClient client(80, "soap.genome.jp", "keggapi/request_v6.2.cgi", "SOAP/KEGG"); + + const QtSoapMessage & result1 = client.submitSoapRequest("invalid_method"); + if (!result1.isFault()) + { + std::cerr << "Line " << __LINE__ << " - Problem with voSoapClient::submitSoapRequest !" + << " - Inoking 'invalid_method' should have failed. " << std::endl; + voUtils::Soap::DumpAll(result1.returnValue(), std::cerr); + return EXIT_FAILURE; + } + + const QtSoapMessage & result2 = client.submitSoapRequest("list_databases"); + if (result2.isFault()) + { + std::cerr << "Line " << __LINE__ << " - Problem with voSoapClient::submitSoapRequest !" << std::endl; + voUtils::Soap::DumpAll(result2.faultString(), std::cerr); + voUtils::Soap::DumpAll(result2.faultDetail(), std::cerr); + return EXIT_FAILURE; + } + //voUtils::Soap::DumpAll(result2.returnValue()); + return EXIT_SUCCESS; +} From de8ddfafc1278632d4e9e06b2d763fc8514fa78e Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Mon, 25 Jul 2011 18:23:16 -0400 Subject: [PATCH 08/16] Update VisomicsData external project so that branch 'next' is used. This commit should only be applied to the 'next' branch of Visomics. --- CMakeExternals/VisomicsData.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeExternals/VisomicsData.cmake b/CMakeExternals/VisomicsData.cmake index b57ef87..07b11c7 100644 --- a/CMakeExternals/VisomicsData.cmake +++ b/CMakeExternals/VisomicsData.cmake @@ -19,7 +19,7 @@ if(BUILD_TESTING) MESSAGE(STATUS "Adding external project: ${proj}") ExternalProject_Add(${proj} GIT_REPOSITORY ${git_protocol}://kwsource.kitwarein.com/bioinformatics/visomicsdata.git - GIT_TAG "origin/master" + GIT_TAG "origin/next" SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj} BINARY_DIR ${proj}-build PREFIX ${proj}${ep_suffix} From 86b934db733227ed22b252f74b3ee6acb4bda426 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 6 Sep 2011 10:03:26 -0400 Subject: [PATCH 09/16] Revert "Add missing voSoapClientTest.cpp file" This reverts commit 7bf67cf3c584a4c9a30c51af0889190c233cee7d. --- Base/Testing/Cpp/voSoapClientTest.cpp | 43 --------------------------- 1 file changed, 43 deletions(-) delete mode 100644 Base/Testing/Cpp/voSoapClientTest.cpp diff --git a/Base/Testing/Cpp/voSoapClientTest.cpp b/Base/Testing/Cpp/voSoapClientTest.cpp deleted file mode 100644 index 6ebfb9f..0000000 --- a/Base/Testing/Cpp/voSoapClientTest.cpp +++ /dev/null @@ -1,43 +0,0 @@ - -// Qt includes -#include -#include - -// QtSoap includes -#include - -// Visomics includes -#include "voSoapClient.h" -#include "voUtilsSoap.h" - -// STD includes -#include -#include - -//----------------------------------------------------------------------------- -int voSoapClientTest(int argc, char * argv []) -{ - QApplication app(argc, argv); - - voSoapClient client(80, "soap.genome.jp", "keggapi/request_v6.2.cgi", "SOAP/KEGG"); - - const QtSoapMessage & result1 = client.submitSoapRequest("invalid_method"); - if (!result1.isFault()) - { - std::cerr << "Line " << __LINE__ << " - Problem with voSoapClient::submitSoapRequest !" - << " - Inoking 'invalid_method' should have failed. " << std::endl; - voUtils::Soap::DumpAll(result1.returnValue(), std::cerr); - return EXIT_FAILURE; - } - - const QtSoapMessage & result2 = client.submitSoapRequest("list_databases"); - if (result2.isFault()) - { - std::cerr << "Line " << __LINE__ << " - Problem with voSoapClient::submitSoapRequest !" << std::endl; - voUtils::Soap::DumpAll(result2.faultString(), std::cerr); - voUtils::Soap::DumpAll(result2.faultDetail(), std::cerr); - return EXIT_FAILURE; - } - //voUtils::Soap::DumpAll(result2.returnValue()); - return EXIT_SUCCESS; -} From 3f78fa604e462d47022b5bb5620d8395631efd16 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 6 Sep 2011 10:03:39 -0400 Subject: [PATCH 10/16] Revert "Add voSoapClient and associated test" This reverts commit 7baf4012d62b4ccd3f3d71b69b4365b80bc6389d. --- Base/CMakeLists.txt | 3 - Base/Testing/Cpp/CMakeLists.txt | 2 - Base/voSoapClient.cpp | 100 -------------------------------- Base/voSoapClient.h | 37 ------------ 4 files changed, 142 deletions(-) delete mode 100644 Base/voSoapClient.cpp delete mode 100644 Base/voSoapClient.h diff --git a/Base/CMakeLists.txt b/Base/CMakeLists.txt index 39e0df8..f92653c 100644 --- a/Base/CMakeLists.txt +++ b/Base/CMakeLists.txt @@ -63,8 +63,6 @@ SET(KIT_SRCS voQObjectFactory.h voRegistry.cpp voRegistry.h - voSoapClient.cpp - voSoapClient.h voTableDataObject.cpp voTableDataObject.h voUtils.cpp @@ -108,7 +106,6 @@ SET(KIT_MOC_SRCS voDataModel_p.h voDataObject.h voInputFileDataObject.h - voSoapClient.h voTableDataObject.h voView.h voViewManager.h diff --git a/Base/Testing/Cpp/CMakeLists.txt b/Base/Testing/Cpp/CMakeLists.txt index 68a08fe..bf12794 100644 --- a/Base/Testing/Cpp/CMakeLists.txt +++ b/Base/Testing/Cpp/CMakeLists.txt @@ -4,7 +4,6 @@ SET(KIT ${PROJECT_NAME}) CREATE_TEST_SOURCELIST(Tests ${KIT}CppTests.cpp voAnalysisTest.cpp voUtilsTest.cpp - voSoapClientTest.cpp vtkExtendedTableTest.cpp ) @@ -23,7 +22,6 @@ ENDMACRO() SIMPLE_TEST(voAnalysisTest) SIMPLE_TEST(voUtilsTest) -SIMPLE_TEST(voSoapClientTest) SIMPLE_TEST(vtkExtendedTableTest) diff --git a/Base/voSoapClient.cpp b/Base/voSoapClient.cpp deleted file mode 100644 index 8f0a722..0000000 --- a/Base/voSoapClient.cpp +++ /dev/null @@ -1,100 +0,0 @@ - -// Qt includes -//#include -//#include -#include - -// QtSOAP includes -#include -#include - -// Visomics includes -#include "voSoapClient.h" - -//---------------------------------------------------------------------------- -class voSoapClientPrivate -{ -public: - - QEventLoop BlockingLoop; - QtSoapHttpTransport Http; - - QString Xmlns; - QString Path; -}; - -//---------------------------------------------------------------------------- -voSoapClient::voSoapClient(int port, const QString& host, const QString& path, const QString& xmlns) - : d_ptr(new voSoapClientPrivate()) -{ - Q_D(voSoapClient); - - d->Xmlns = xmlns; - d->Path = path; - - connect(&d->Http, SIGNAL(responseReady()), this, SLOT(responseReady())); - - d->Http.setHost(host, /* useSecureHTTP= */false, port); -} - -//---------------------------------------------------------------------------- -voSoapClient::~voSoapClient() -{ - -} - -//---------------------------------------------------------------------------- -void voSoapClient::responseReady() -{ - Q_D(voSoapClient); - d->BlockingLoop.exit(); -} - -//---------------------------------------------------------------------------- -const QtSoapMessage & voSoapClient::submitSoapRequest(const QString& methodName, - QtSoapType* soapType) -{ - QList list; - if (soapType) - { - list << soapType; - } - return this->submitSoapRequest(methodName, list); -} - -//---------------------------------------------------------------------------- -const QtSoapMessage & voSoapClient::submitSoapRequest(const QString& methodName, - const QList& soapTypes) -{ - Q_D(voSoapClient); - - // qDebug() << "invoking method:" << methodName; - - QtSoapMessage request; - request.setMethod(QtSoapQName(methodName, d->Xmlns)); - if(!soapTypes.isEmpty()) - { - foreach(QtSoapType * soapType, soapTypes) - { - request.addMethodArgument(soapType); -// qDebug() << "\tArgument " << soapType->typeName() + ":" + soapType->name().name() << "added"; - } - } -// qDebug() << request.toXmlString(); - - d->Http.submitRequest(request, d->Path); - -// qDebug() << "Submitted request:" << methodName; - -// QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); - - d->BlockingLoop.exec(QEventLoop::ExcludeUserInputEvents | QEventLoop::WaitForMoreEvents); - -// QApplication::restoreOverrideCursor(); - - //qDebug() << "Reply error: " << reply->errorString(); - //qDebug() << reply->readAll(); - const QtSoapMessage& response = d->Http.getResponse(); -// qDebug() << "\t=> OK"; - return response; -} diff --git a/Base/voSoapClient.h b/Base/voSoapClient.h deleted file mode 100644 index 72932fe..0000000 --- a/Base/voSoapClient.h +++ /dev/null @@ -1,37 +0,0 @@ - - -#ifndef __voSoapClient_h -#define __voSoapClient_h - -// Qt includes -#include - -class QtSoapMessage; -class QtSoapType; -class voSoapClientPrivate; - -class voSoapClient : public QObject -{ - Q_OBJECT -public: - voSoapClient(int port, const QString& host, const QString& path, const QString& xmlns); - virtual ~voSoapClient(); - - const QtSoapMessage & submitSoapRequest(const QString& methodName, const QList& soapTypes); - const QtSoapMessage & submitSoapRequest(const QString& methodName, QtSoapType* soapType = 0); - -private slots: - - void responseReady(); - -private: - - const QScopedPointer d_ptr; - - Q_DECLARE_PRIVATE(voSoapClient); - Q_DISABLE_COPY(voSoapClient); -}; - - -#endif - From 42dd155d70f321e79ede30cc26f06ad74d616fae Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 6 Sep 2011 10:03:56 -0400 Subject: [PATCH 11/16] Revert "Add voUtilsSoap" This reverts commit 0e6ea7e824a8c832ef50c1a25d3d1bbdff5ebe37. --- Base/CMakeLists.txt | 3 --- Base/voUtilsSoap.cpp | 46 -------------------------------------------- Base/voUtilsSoap.h | 19 ------------------ 3 files changed, 68 deletions(-) delete mode 100644 Base/voUtilsSoap.cpp delete mode 100644 Base/voUtilsSoap.h diff --git a/Base/CMakeLists.txt b/Base/CMakeLists.txt index f92653c..7b32283 100644 --- a/Base/CMakeLists.txt +++ b/Base/CMakeLists.txt @@ -67,8 +67,6 @@ SET(KIT_SRCS voTableDataObject.h voUtils.cpp voUtils.h - voUtilsSoap.cpp - voUtilsSoap.h voView.cpp voView.h voViewFactory.cpp @@ -165,7 +163,6 @@ SET(${PROJECT_NAME}_LINK_LIBRARIES ${VTK_LIBRARIES} ${EXTRA_LIBRARIES} ${QT_LIBRARIES} - ${QtSOAP_LIBRARIES} QtPropertyBrowser ) TARGET_LINK_LIBRARIES( diff --git a/Base/voUtilsSoap.cpp b/Base/voUtilsSoap.cpp deleted file mode 100644 index bc0a4e1..0000000 --- a/Base/voUtilsSoap.cpp +++ /dev/null @@ -1,46 +0,0 @@ - -// QtSoap includes -#include - -// Visomics includes -#include "voUtilsSoap.h" - -//---------------------------------------------------------------------------- -void voUtils::Soap::DumpAll(const QtSoapType& type, std::ostream &os, int indent) -{ - if(indent == 0) - { - QString s; - s = "Dumping:\n" + type.typeName() + ": " + type.name().name(); - if (type.count() == 0) - { - s += " - Value: \"" + type.value().toString() + "\""; - } - os << qPrintable(s) << std::endl; - indent = 4; - } - for (int i = 0; i < type.count(); ++i) - { - QString s; - s = QString(indent, ' ') + type[i].typeName() + ": " + type[i].name().name(); - if (type[i].count() == 0) - { - s += " - Value: \"" + type[i].value().toString() + "\""; - } - os << qPrintable(s) << std::endl; - if(type[i].count() > 0) - { - voUtils::Soap::DumpAll(type[i], os, indent + 4); - } - } -} - -//---------------------------------------------------------------------------- -void voUtils::Soap::DumpType(const QtSoapType& sstruct) -{ - std::cout << "Dumping: " << qPrintable(sstruct.typeName()) << " " << qPrintable(sstruct.name().name()) << std::endl; - for (int i = 0; i < sstruct.count(); ++i) - { - std::cout << qPrintable(sstruct[i].typeName()) << " " << qPrintable(sstruct[i].name().name()) << std::endl; - } -} diff --git a/Base/voUtilsSoap.h b/Base/voUtilsSoap.h deleted file mode 100644 index 319fa84..0000000 --- a/Base/voUtilsSoap.h +++ /dev/null @@ -1,19 +0,0 @@ - -// STD includes -#include - -class QtSoapType; - -namespace voUtils -{ - -namespace Soap -{ - -void DumpAll(const QtSoapType& type, std::ostream &os = std::cout, int indent = 0); - -void DumpType(const QtSoapType& sstruct); - -} // end of Soap namespace - -} // end of voUtils namespace From d862613135d31df06e982e8f2866987fbaa7e9c8 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 6 Sep 2011 10:06:01 -0400 Subject: [PATCH 12/16] xRevert "Find QtSOAP package and include associated "use file"." This reverts commit 8553232a9207fa1f2cc81426d20b1fd753c5b06c. --- CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35721a1..2e16326 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,12 +160,6 @@ ENDIF() FIND_PACKAGE(QtPropertyBrowser REQUIRED) INCLUDE(${QtPropertyBrowser_USE_FILE}) -#----------------------------------------------------------------------------- -# QtSOAP - -FIND_PACKAGE(QtSOAP REQUIRED) -INCLUDE(${QtSOAP_USE_FILE}) - #----------------------------------------------------------------------------- # Set C/CXX Flags # From 40b23d201b8f1273c3f2526cbacf4a1ecfd3b93d Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 6 Sep 2011 10:06:13 -0400 Subject: [PATCH 13/16] Revert "QtXML is required by QtSOAP" This reverts commit d52216250a263649ac7f04a77101aaa0fbcd4f1a. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e16326..03a9a58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,7 @@ ENDFOREACH() #----------------------------------------------------------------------------- # Qt # -FIND_PACKAGE(Qt4 4.7 COMPONENTS QtCore QtGui QtNetwork QtScript QtXML REQUIRED) +FIND_PACKAGE(Qt4 4.7 COMPONENTS QtCore QtGui QtNetwork QtScript REQUIRED) INCLUDE(${QT_USE_FILE}) #----------------------------------------------------------------------------- From cd2f62d8c9caaaf54972e5d7ef6708d184f8227f Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 6 Sep 2011 10:06:23 -0400 Subject: [PATCH 14/16] Revert "Set QtSOAP_DIR appropriately" This reverts commit 1381bbce576c633f29537b411cddb41e39bcd403. --- Base/CMakeLists.txt | 42 +++++++++++-------------------------- CMakeExternals/QtSOAP.cmake | 2 +- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/Base/CMakeLists.txt b/Base/CMakeLists.txt index 7b32283..1378e47 100644 --- a/Base/CMakeLists.txt +++ b/Base/CMakeLists.txt @@ -2,8 +2,6 @@ PROJECT(VisomicsBase) SET(KIT_SRCS - Analysis/voFoldChange.cpp - Analysis/voFoldChange.h Analysis/voHierarchicalClustering.h Analysis/voHierarchicalClustering.cpp Analysis/voKEGG.h @@ -12,32 +10,26 @@ SET(KIT_SRCS Analysis/voKMeansClustering.h Analysis/voPCAStatistics.cpp Analysis/voPCAStatistics.h - Analysis/voTTest.cpp - Analysis/voTTest.h Analysis/voXCorrel.cpp Analysis/voXCorrel.h - - Normalization/voLog2.cpp - Normalization/voLog2.h Views/voCorrelationGraphView.cpp Views/voCorrelationGraphView.h - Views/voCorrelationHeatMapView.cpp - Views/voCorrelationHeatMapView.h Views/voExtendedTableView.cpp Views/voExtendedTableView.h - Views/voHorizontalBarView.h - Views/voHorizontalBarView.cpp - Views/voPCABarView.cpp - Views/voPCABarView.h - Views/voPCAProjectionView.cpp - Views/voPCAProjectionView.h + Views/voPCABarPlot.cpp + Views/voPCABarPlot.h + Views/voPCAProjectionPlot.cpp + Views/voPCAProjectionPlot.h Views/voTableView.cpp Views/voTableView.h Views/voTreeGraphView.h Views/voTreeGraphView.cpp - Views/voVolcanoView.cpp - Views/voVolcanoView.h + Views/voCorrelationHeatMapView.cpp + Views/voCorrelationHeatMapView.h + Views/voChartXY.h + Views/voChartXY.cpp + voAnalysis.cpp voAnalysis.h @@ -61,8 +53,6 @@ SET(KIT_SRCS voIOManager.cpp voIOManager.h voQObjectFactory.h - voRegistry.cpp - voRegistry.h voTableDataObject.cpp voTableDataObject.h voUtils.cpp @@ -79,23 +69,19 @@ SET(KIT_SRCS ) SET(KIT_MOC_SRCS - Analysis/voFoldChange.h Analysis/voHierarchicalClustering.h Analysis/voKEGG.h Analysis/voKMeansClustering.h Analysis/voPCAStatistics.h - Analysis/voTTest.h Analysis/voXCorrel.h Views/voCorrelationGraphView.h - Views/voCorrelationHeatMapView.h Views/voExtendedTableView.h - Views/voHorizontalBarView.h - Views/voPCABarView.h - Views/voPCAProjectionView.h + Views/voPCABarPlot.h + Views/voPCAProjectionPlot.h Views/voTableView.h Views/voTreeGraphView.h - Views/voVolcanoView.h + Views/voCorrelationHeatMapView.h voAnalysis.h voAnalysisDriver.h @@ -120,8 +106,6 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Analysis ${CMAKE_CURRENT_BINARY_DIR}/Analysis - ${CMAKE_CURRENT_SOURCE_DIR}/Normalization - ${CMAKE_CURRENT_BINARY_DIR}/Normalization ${CMAKE_CURRENT_SOURCE_DIR}/Views ${CMAKE_CURRENT_BINARY_DIR}/Views ) @@ -172,7 +156,5 @@ TARGET_LINK_LIBRARIES( IF(BUILD_TESTING) ADD_SUBDIRECTORY(Testing) - ADD_SUBDIRECTORY(Analysis/Testing) - ADD_SUBDIRECTORY(Normalization/Testing) ENDIF() diff --git a/CMakeExternals/QtSOAP.cmake b/CMakeExternals/QtSOAP.cmake index adae5d0..6fafa99 100644 --- a/CMakeExternals/QtSOAP.cmake +++ b/CMakeExternals/QtSOAP.cmake @@ -25,7 +25,7 @@ IF(NOT DEFINED QtSOAP_DIR) DEPENDS ${proj_DEPENDENCIES} ) - SET(QtSOAP_DIR "${CMAKE_BINARY_DIR}/${proj}-build") + SET(QtSOAP_DIR "${ep_build_dir}/${proj}") ELSE() ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") From 577be4a5c389d7011b08db69d906acb95e754ed4 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 6 Sep 2011 10:06:32 -0400 Subject: [PATCH 15/16] Revert "Add QtSOAP external project" This reverts commit cf31d3f0321426c5a9d40908377c20dc3c7832c3. --- CMakeExternals/QtSOAP.cmake | 33 --------------------------------- SuperBuild.cmake | 4 ---- 2 files changed, 37 deletions(-) delete mode 100644 CMakeExternals/QtSOAP.cmake diff --git a/CMakeExternals/QtSOAP.cmake b/CMakeExternals/QtSOAP.cmake deleted file mode 100644 index 6fafa99..0000000 --- a/CMakeExternals/QtSOAP.cmake +++ /dev/null @@ -1,33 +0,0 @@ - -# Sanity checks -IF(DEFINED QtSOAP_DIR AND NOT EXISTS ${QtSOAP_DIR}) - MESSAGE(FATAL_ERROR "QtSOAP_DIR variable is defined but corresponds to non-existing directory") -ENDIF() - -SET(proj QtSOAP) -SET(proj_DEPENDENCIES) - -SET(QtSOAP_DEPENDS ${proj}) - -IF(NOT DEFINED QtSOAP_DIR) - MESSAGE(STATUS "Adding external project: ${proj}") - ExternalProject_Add(${proj} - SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj} - BINARY_DIR ${proj}-build - PREFIX ${proj}${ep_suffix} - GIT_REPOSITORY "${git_protocol}://github.com/commontk/QtSOAP.git" - GIT_TAG "origin/master" - CMAKE_GENERATOR ${gen} - INSTALL_COMMAND "" - CMAKE_ARGS - ${ep_common_args} - -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} - DEPENDS - ${proj_DEPENDENCIES} - ) - SET(QtSOAP_DIR "${ep_build_dir}/${proj}") - -ELSE() - ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") -ENDIF() - diff --git a/SuperBuild.cmake b/SuperBuild.cmake index d237a97..6fb31ff 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -51,7 +51,6 @@ endif() include(CMakeExternals/VTK.cmake) include(CMakeExternals/QtPropertyBrowser.cmake) -include(CMakeExternals/QtSOAP.cmake) include(CMakeExternals/VisomicsData.cmake) #include(CMakeExternals/CTK.cmake) @@ -100,8 +99,6 @@ ExternalProject_Add(${proj} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} # QtPropertyBrowser -DQtPropertyBrowser_DIR:PATH=${QtPropertyBrowser_DIR} - # QtSOAP - -DQtSOAP_DIR:PATH=${QtSOAP_DIR} # VisomicsData -DVisomicsData_DIR:PATH=${VisomicsData_DIR} # VTK @@ -116,7 +113,6 @@ ExternalProject_Add(${proj} DEPENDS # Mandatory dependencies ${QtPropertyBrowser_DEPENDS} - ${QtSOAP_DEPENDS} ${VisomicsData_DEPENDS} #${CTK_DEPENDS} ${VTK_DEPENDS} From 654fe62a38bd720c1440518f8c839f1e225dfee8 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 8 Sep 2011 03:17:11 -0400 Subject: [PATCH 16/16] QtXML is not required since topic add-qtsoap-external-project has been reverted --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 908f31c..9a1cc3d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,7 @@ ENDFOREACH() #----------------------------------------------------------------------------- # Qt # -FIND_PACKAGE(Qt4 4.7 COMPONENTS QtCore QtGui QtNetwork QtScript QtXML QtWebKit REQUIRED) +FIND_PACKAGE(Qt4 4.7 COMPONENTS QtCore QtGui QtNetwork QtScript QtWebKit REQUIRED) INCLUDE(${QT_USE_FILE}) #-----------------------------------------------------------------------------