[Cmake-commits] CMake branch, next, updated. v3.0.0-rc6-3516-ge11704c
Joe Snyder
joe.snyder at kitware.com
Tue Jun 3 16:15:14 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via e11704c1590e7bd2218e5d97b74ebcc290b82fbf (commit)
via a7b8f4e73180fcad2c3dbdc91fa775e02e4c8a92 (commit)
via e33d0d0b8fc8f20e87c39085c34d3523f45a8311 (commit)
from ee3190df09e7447a79006ebc0559063de217c0f1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e11704c1590e7bd2218e5d97b74ebcc290b82fbf
commit e11704c1590e7bd2218e5d97b74ebcc290b82fbf
Merge: ee3190d a7b8f4e
Author: Joe Snyder <joe.snyder at kitware.com>
AuthorDate: Tue Jun 3 16:15:12 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jun 3 16:15:12 2014 -0400
Merge topic 'expand_cobertura_coverage' into next
a7b8f4e7 CTest: Generalize Cobertura coverage format handling
e33d0d0b CTest: Rename coverage implementation for "Python" to "Cobertura"
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7b8f4e73180fcad2c3dbdc91fa775e02e4c8a92
commit a7b8f4e73180fcad2c3dbdc91fa775e02e4c8a92
Author: Joseph Snyder <joe.snyder at kitware.com>
AuthorDate: Thu May 29 17:47:31 2014 +0000
Commit: Joseph Snyder <joe.snyder at kitware.com>
CommitDate: Tue Jun 3 19:41:07 2014 +0000
CTest: Generalize Cobertura coverage format handling
Add support for Cobertura coverage files written by Java.
Add a test which uses the report from a Java run of Cobertura to calculate coverage.
In the documentation of CTEST_COVERAGE_COMMAND, give a sample .sh file to merge
the Cobertura .ser files and generate the XML report from the merged file.
diff --git a/Help/variable/CTEST_COVERAGE_COMMAND.rst b/Help/variable/CTEST_COVERAGE_COMMAND.rst
index 1a8e499..a669dd7 100644
--- a/Help/variable/CTEST_COVERAGE_COMMAND.rst
+++ b/Help/variable/CTEST_COVERAGE_COMMAND.rst
@@ -3,3 +3,58 @@ CTEST_COVERAGE_COMMAND
Specify the CTest ``CoverageCommand`` setting
in a :manual:`ctest(1)` dashboard client script.
+
+Cobertura
+'''''''''
+
+Using `Cobertura`_ as the coverage generation within your multi-module
+Java project can generate a series of XML files.
+
+The Cobertura Coverage parser expects to read the coverage data from a
+single XML file which contains the coverage data for all modules.
+Cobertura has a program with the ability to merge given cobertura.ser files
+and then another program to generate a combined XML file from the previous
+merged file. For command line testing, this can be done by hand prior to
+CTest looking for the coverage files. For script builds,
+set the ``CTEST_COVERAGE_COMMAND`` variable to point to a file which will
+perform these same steps, such as a .sh or .bat file.
+
+.. code-block:: cmake
+
+ set(CTEST_COVERAGE_COMMAND .../run-coverage-and-consolidate.sh)
+
+where the ``run-coverage-and-consolidate.sh`` script is perhaps created by
+the :command:`configure_file` command and might contain the following code:
+
+.. code-block:: bash
+
+ #!/usr/bin/env bash
+ CoberturaFiles="$(find "/path/to/source" -name "cobertura.ser")"
+ SourceDirs="$(find "/path/to/source" -name "java" -type d)"
+ cobertura-merge --datafile coberturamerge.ser $CoberturaFiles
+ cobertura-report --datafile coberturamerge.ser --destination . \
+ --format xml $SourceDirs
+
+The script uses ``find`` to capture the paths to all of the cobertura.ser files
+found below the project's source directory. It keeps the list of files and
+supplies it as an argument to the ``cobertura-merge`` program. The ``--datafile``
+argument signifies where the result of the merge will be kept.
+
+The combined ``coberturamerge.ser`` file is then used to generate the XML report
+using the ``cobertura-report`` program. The call to the cobertura-report program
+requires some named arguments.
+
+``--datafila``
+ path to the merged .ser file
+
+``--destination``
+ path to put the output files(s)
+
+``--format``
+ file format to write output in: xml or html
+
+The rest of the supplied arguments consist of the full paths to the
+/src/main/java directories of each module within the souce tree. These
+directories are needed and should not be forgotten.
+
+.. _`Cobertura`: http://cobertura.github.io/cobertura/
diff --git a/Source/CTest/cmParseCoberturaCoverage.cxx b/Source/CTest/cmParseCoberturaCoverage.cxx
index 0f5daba..6b98056 100644
--- a/Source/CTest/cmParseCoberturaCoverage.cxx
+++ b/Source/CTest/cmParseCoberturaCoverage.cxx
@@ -12,6 +12,10 @@ public:
XMLParser(cmCTest* ctest, cmCTestCoverageHandlerContainer& cont)
: CTest(ctest), Coverage(cont)
{
+ this->InSources = false;
+ this->InSource = false;
+ this->FilePaths.push_back(this->Coverage.SourceDir);
+ this->CurFileName = "";
}
virtual ~XMLParser()
@@ -20,9 +24,44 @@ public:
protected:
+
+ virtual void EndElement(const std::string& name)
+ {
+ if(name == "source")
+ {
+ this->InSource=false;
+ }
+ else if (name == "sources")
+ {
+ this->InSources=false;
+ }
+ }
+
+ virtual void CharacterDataHandler(const char* data, int length)
+ {
+ std::string tmp;
+ tmp.insert(0,data,length);
+ if (this->InSources && this->InSource)
+ {
+ this->FilePaths.push_back(tmp);
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Adding Source: "
+ << tmp << std::endl);
+ }
+ }
+
virtual void StartElement(const std::string& name, const char** atts)
{
- if(name == "class")
+ std::string FoundSource;
+ std::string finalpath = "";
+ if(name == "source")
+ {
+ this->InSource = true;
+ }
+ else if(name == "sources")
+ {
+ this->InSources = true;
+ }
+ else if(name == "class")
{
int tagCount = 0;
while(true)
@@ -30,11 +69,19 @@ protected:
if(strcmp(atts[tagCount], "filename") == 0)
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Reading file: "
- << atts[tagCount+1] << std::endl);
- this->CurFileName = this->Coverage.SourceDir + "/" +
- atts[tagCount+1];
+ << atts[tagCount+1]<< std::endl);
+ std::string filename = atts[tagCount+1];
+ for(size_t i=0;i < FilePaths.size();i++)
+ {
+ finalpath = FilePaths[i] + "/" + filename;
+ if(cmSystemTools::FileExists(finalpath.c_str()))
+ {
+ this->CurFileName = finalpath;
+ break;
+ }
+ }
cmsys::ifstream fin(this->CurFileName.c_str());
- if(!fin)
+ if(this->CurFileName == "" || !fin )
{
this->CurFileName = this->Coverage.BinaryDir + "/" +
atts[tagCount+1];
@@ -48,7 +95,6 @@ protected:
break;
}
}
-
std::string line;
FileLinesType& curFileLines =
this->Coverage.TotalCoverage[this->CurFileName];
@@ -83,7 +129,9 @@ protected:
{
FileLinesType& curFileLines =
this->Coverage.TotalCoverage[this->CurFileName];
- curFileLines[curNumber-1] = curHits;
+ {
+ curFileLines[curNumber-1] = curHits;
+ }
break;
}
++tagCount;
@@ -91,10 +139,11 @@ protected:
}
}
- virtual void EndElement(const std::string&) {}
-
private:
+ bool InSources;
+ bool InSource;
+ std::vector<std::string> FilePaths;
typedef cmCTestCoverageHandlerContainer::SingleFileCoverageVector
FileLinesType;
cmCTest* CTest;
diff --git a/Source/CTest/cmParseCoberturaCoverage.h b/Source/CTest/cmParseCoberturaCoverage.h
index 4204b10..ff5954d 100644
--- a/Source/CTest/cmParseCoberturaCoverage.h
+++ b/Source/CTest/cmParseCoberturaCoverage.h
@@ -34,6 +34,9 @@ public:
cmParseCoberturaCoverage(cmCTestCoverageHandlerContainer& cont,
cmCTest* ctest);
+ bool inSources;
+ bool inSource;
+ std::vector<std::string> filepaths;
//! Read the XML produced by running `coverage xml`
bool ReadCoverageXML(const char* xmlFile);
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 8d2b7fc..30f2050 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2184,6 +2184,24 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
"Process file.*foo.py.*Total LOC:.*13.*Percentage Coverage: 84.62.*"
ENVIRONMENT COVFILE=)
+ # Adding a test case for non-python Cobertura Coverage
+ configure_file(
+ "${CMake_SOURCE_DIR}/Tests/CoberturaCoverage/DartConfiguration.tcl.in"
+ "${CMake_BINARY_DIR}/Testing/CoberturaCoverage/DartConfiguration.tcl")
+ configure_file(
+ "${CMake_SOURCE_DIR}/Tests/CoberturaCoverage/coverage.xml.in"
+ "${CMake_BINARY_DIR}/Testing/CoberturaCoverage/coverage.xml")
+ file(COPY "${CMake_SOURCE_DIR}/Tests/CoberturaCoverage/src"
+ DESTINATION "${CMake_BINARY_DIR}/Testing/CoberturaCoverage")
+ add_test(NAME CTestCoberturaCoverage
+ COMMAND cmake -E chdir
+ ${CMake_BINARY_DIR}/Testing/CoberturaCoverage
+ $<TARGET_FILE:ctest> -T Coverage --debug)
+ set_tests_properties(CTestCoberturaCoverage PROPERTIES
+ PASS_REGULAR_EXPRESSION
+ "Process file.*ResponderService.java.*Total LOC:.*219.*Percentage Coverage: 25.11.*"
+ ENVIRONMENT COVFILE=)
+
function(add_config_tests cfg)
set(base "${CMake_BINARY_DIR}/Tests/CTestConfig")
diff --git a/Tests/CoberturaCoverage/DartConfiguration.tcl.in b/Tests/CoberturaCoverage/DartConfiguration.tcl.in
new file mode 100644
index 0000000..954f59a
--- /dev/null
+++ b/Tests/CoberturaCoverage/DartConfiguration.tcl.in
@@ -0,0 +1,8 @@
+# This file is configured by CMake automatically as DartConfiguration.tcl
+# If you choose not to use CMake, this file may be hand configured, by
+# filling in the required variables.
+
+
+# Configuration directories and files
+SourceDirectory: ${CMake_SOURCE_DIR}/Testing/CoberturaCoverage
+BuildDirectory: ${CMake_BINARY_DIR}/Testing/CoberturaCoverage
diff --git a/Tests/CoberturaCoverage/coverage.xml.in b/Tests/CoberturaCoverage/coverage.xml.in
new file mode 100644
index 0000000..3a67225
--- /dev/null
+++ b/Tests/CoberturaCoverage/coverage.xml.in
@@ -0,0 +1,967 @@
+<?xml version="1.0"?>
+<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
+
+<coverage line-rate="0.2511415525114155" branch-rate="0.2857142857142857" lines-covered="55" lines-valid="219" branches-covered="24" branches-valid="84" complexity="2.238095238095238" version="1.9.4.1" timestamp="1401303937080">
+ <sources>
+ <source>--source</source>
+ <source>${CMake_BINARY_DIR}/Testing/CoberturaCoverage/src/main/java</source>
+ </sources>
+ <packages>
+ <package name="org.openinfobutton.responder.controller" line-rate="0.8484848484848485" branch-rate="0.7" complexity="2.0">
+ <classes>
+ <class name="org.openinfobutton.responder.controller.OpenInfobuttonResponderController" filename="org/openinfobutton/responder/controller/OpenInfobuttonResponderController.java" line-rate="0.8484848484848485" branch-rate="0.7" complexity="2.0">
+ <methods>
+ <method name="<init>" signature="()V" line-rate="1.0" branch-rate="1.0">
+ <lines>
+ <line number="25" hits="35" branch="false"/>
+ </lines>
+ </method>
+ <method name="handleHttpMediaTypeNotSupportedException" signature="()V" line-rate="1.0" branch-rate="1.0">
+ <lines>
+ <line number="106" hits="5" branch="false"/>
+ </lines>
+ </method>
+ <method name="handleIllegalArgumentException" signature="()V" line-rate="1.0" branch-rate="1.0">
+ <lines>
+ <line number="120" hits="5" branch="false"/>
+ </lines>
+ </method>
+ <method name="handleMissingServletRequestParameterException" signature="()V" line-rate="1.0" branch-rate="1.0">
+ <lines>
+ <line number="113" hits="5" branch="false"/>
+ </lines>
+ </method>
+ <method name="indexPageRequest" signature="()Ljava/lang/String;" line-rate="1.0" branch-rate="1.0">
+ <lines>
+ <line number="63" hits="5" branch="false"/>
+ </lines>
+ </method>
+ <method name="openInfobuttonRequestHandler" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/springframework/ui/ModelMap;)Ljava/lang/String;" line-rate="0.9411764705882353" branch-rate="0.8333333333333334">
+ <lines>
+ <line number="70" hits="30" branch="false"/>
+ <line number="73" hits="30" branch="false"/>
+ <line number="76" hits="30" branch="false"/>
+ <line number="79" hits="25" branch="false"/>
+ <line number="80" hits="20" branch="false"/>
+ <line number="82" hits="20" branch="false"/>
+ <line number="83" hits="20" branch="false"/>
+ <line number="84" hits="20" branch="false"/>
+ <line number="85" hits="20" branch="false"/>
+ <line number="87" hits="20" branch="false"/>
+ <line number="89" hits="20" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="90" hits="10" branch="false"/>
+ <line number="91" hits="10" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="92" hits="5" branch="false"/>
+ <line number="93" hits="5" branch="true" condition-coverage="50% (1/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="50%"/>
+ </conditions>
+ </line>
+ <line number="94" hits="0" branch="false"/>
+ <line number="96" hits="5" branch="false"/>
+ </lines>
+ </method>
+ <method name="setAtomFeedMetadata" signature="(Ljava/util/Properties;)V" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="43" hits="0" branch="false"/>
+ <line number="44" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="setIndexPropertyInterpretationMap" signature="(Ljava/util/Map;)V" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="47" hits="0" branch="false"/>
+ <line number="48" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="setRequiredResponseObjects" signature="()V" line-rate="1.0" branch-rate="0.5">
+ <lines>
+ <line number="52" hits="30" branch="true" condition-coverage="50% (1/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="50%"/>
+ </conditions>
+ </line>
+ <line number="53" hits="30" branch="false"/>
+ <line number="55" hits="30" branch="true" condition-coverage="50% (1/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="50%"/>
+ </conditions>
+ </line>
+ <line number="56" hits="30" branch="false"/>
+ <line number="59" hits="30" branch="false"/>
+ </lines>
+ </method>
+ <method name="setResponderService" signature="(Lorg/openinfobutton/responder/service/ResponderService;)V" line-rate="1.0" branch-rate="1.0">
+ <lines>
+ <line number="39" hits="35" branch="false"/>
+ <line number="40" hits="35" branch="false"/>
+ </lines>
+ </method>
+ </methods>
+ <lines>
+ <line number="25" hits="35" branch="false"/>
+ <line number="39" hits="35" branch="false"/>
+ <line number="40" hits="35" branch="false"/>
+ <line number="43" hits="0" branch="false"/>
+ <line number="44" hits="0" branch="false"/>
+ <line number="47" hits="0" branch="false"/>
+ <line number="48" hits="0" branch="false"/>
+ <line number="52" hits="30" branch="true" condition-coverage="50% (1/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="50%"/>
+ </conditions>
+ </line>
+ <line number="53" hits="30" branch="false"/>
+ <line number="55" hits="30" branch="true" condition-coverage="50% (1/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="50%"/>
+ </conditions>
+ </line>
+ <line number="56" hits="30" branch="false"/>
+ <line number="59" hits="30" branch="false"/>
+ <line number="63" hits="5" branch="false"/>
+ <line number="70" hits="30" branch="false"/>
+ <line number="73" hits="30" branch="false"/>
+ <line number="76" hits="30" branch="false"/>
+ <line number="79" hits="25" branch="false"/>
+ <line number="80" hits="20" branch="false"/>
+ <line number="82" hits="20" branch="false"/>
+ <line number="83" hits="20" branch="false"/>
+ <line number="84" hits="20" branch="false"/>
+ <line number="85" hits="20" branch="false"/>
+ <line number="87" hits="20" branch="false"/>
+ <line number="89" hits="20" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="90" hits="10" branch="false"/>
+ <line number="91" hits="10" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="92" hits="5" branch="false"/>
+ <line number="93" hits="5" branch="true" condition-coverage="50% (1/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="50%"/>
+ </conditions>
+ </line>
+ <line number="94" hits="0" branch="false"/>
+ <line number="96" hits="5" branch="false"/>
+ <line number="106" hits="5" branch="false"/>
+ <line number="113" hits="5" branch="false"/>
+ <line number="120" hits="5" branch="false"/>
+ </lines>
+ </class>
+ </classes>
+ </package>
+ <package name="org.openinfobutton.responder.dao" line-rate="1.0" branch-rate="1.0" complexity="1.0">
+ <classes>
+ <class name="org.openinfobutton.responder.dao.ResponderAppPropertyDao" filename="org/openinfobutton/responder/dao/ResponderAppPropertyDao.java" line-rate="1.0" branch-rate="1.0" complexity="0.0">
+ <methods>
+ </methods>
+ <lines>
+ </lines>
+ </class>
+ <class name="org.openinfobutton.responder.dao.ResponderAssetDao" filename="org/openinfobutton/responder/dao/ResponderAssetDao.java" line-rate="1.0" branch-rate="1.0" complexity="1.0">
+ <methods>
+ </methods>
+ <lines>
+ </lines>
+ </class>
+ <class name="org.openinfobutton.responder.dao.ResponderRequestParameterDao" filename="org/openinfobutton/responder/dao/ResponderRequestParameterDao.java" line-rate="1.0" branch-rate="1.0" complexity="1.0">
+ <methods>
+ </methods>
+ <lines>
+ </lines>
+ </class>
+ <class name="org.openinfobutton.responder.dao.ResponderValueSetDao" filename="org/openinfobutton/responder/dao/ResponderValueSetDao.java" line-rate="1.0" branch-rate="1.0" complexity="0.0">
+ <methods>
+ </methods>
+ <lines>
+ </lines>
+ </class>
+ </classes>
+ </package>
+ <package name="org.openinfobutton.responder.dao.impl" line-rate="0.0" branch-rate="0.0" complexity="2.0">
+ <classes>
+ <class name="org.openinfobutton.responder.dao.impl.ResponderAppPropertyDaoImpl" filename="org/openinfobutton/responder/dao/impl/ResponderAppPropertyDaoImpl.java" line-rate="0.0" branch-rate="1.0" complexity="1.0">
+ <methods>
+ <method name="<init>" signature="()V" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="15" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getAppPropertyGroup" signature="(Ljava/lang/String;)Ljava/util/List;" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="19" hits="0" branch="false"/>
+ </lines>
+ </method>
+ </methods>
+ <lines>
+ <line number="15" hits="0" branch="false"/>
+ <line number="19" hits="0" branch="false"/>
+ </lines>
+ </class>
+ <class name="org.openinfobutton.responder.dao.impl.ResponderAssetDaoImpl" filename="org/openinfobutton/responder/dao/impl/ResponderAssetDaoImpl.java" line-rate="0.0" branch-rate="0.0" complexity="2.857142857142857">
+ <methods>
+ <method name="<init>" signature="()V" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="24" hits="0" branch="false"/>
+ <line number="26" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="findByInfobuttonRequest" signature="(Ljava/util/Map;)Ljava/util/Collection;" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="33" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getCodesOnly" signature="(Ljava/util/Set;)Ljava/util/Set;" line-rate="0.0" branch-rate="0.0">
+ <lines>
+ <line number="278" hits="0" branch="false"/>
+ <line number="280" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="281" hits="0" branch="false"/>
+ <line number="282" hits="0" branch="false"/>
+ <line number="284" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getHqlCriterionForAge" signature="(Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/StringBuilder;" line-rate="0.0" branch-rate="0.0">
+ <lines>
+ <line number="246" hits="0" branch="false"/>
+ <line number="247" hits="0" branch="false"/>
+ <line number="248" hits="0" branch="false"/>
+ <line number="249" hits="0" branch="false"/>
+ <line number="251" hits="0" branch="true" condition-coverage="0% (0/4)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ <condition number="1" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="253" hits="0" branch="false"/>
+ <line number="255" hits="0" branch="false"/>
+ <line number="256" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="257" hits="0" branch="false"/>
+ <line number="258" hits="0" branch="false"/>
+ <line number="260" hits="0" branch="false"/>
+ <line number="270" hits="0" branch="false"/>
+ <line number="273" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getHqlCriterionForParameterWithOptionalIndex" signature="(Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/StringBuilder;" line-rate="0.0" branch-rate="0.0">
+ <lines>
+ <line number="149" hits="0" branch="false"/>
+ <line number="150" hits="0" branch="false"/>
+ <line number="152" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="154" hits="0" branch="false"/>
+ <line number="164" hits="0" branch="false"/>
+ <line number="167" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getHqlMainSerchCriteria" signature="(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;I)Ljava/lang/StringBuilder;" line-rate="0.0" branch-rate="0.0">
+ <lines>
+ <line number="176" hits="0" branch="false"/>
+ <line number="177" hits="0" branch="false"/>
+ <line number="178" hits="0" branch="false"/>
+ <line number="179" hits="0" branch="false"/>
+ <line number="180" hits="0" branch="false"/>
+ <line number="184" hits="0" branch="true" condition-coverage="0% (0/4)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ <condition number="1" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="186" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="187" hits="0" branch="false"/>
+ <line number="188" hits="0" branch="false"/>
+ <line number="189" hits="0" branch="false"/>
+ <line number="192" hits="0" branch="false"/>
+ <line number="193" hits="0" branch="false"/>
+ <line number="196" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="198" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="199" hits="0" branch="false"/>
+ <line number="201" hits="0" branch="false"/>
+ <line number="207" hits="0" branch="false"/>
+ <line number="209" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="211" hits="0" branch="false"/>
+ <line number="212" hits="0" branch="false"/>
+ <line number="213" hits="0" branch="false"/>
+ <line number="214" hits="0" branch="false"/>
+ <line number="215" hits="0" branch="false"/>
+ <line number="217" hits="0" branch="false"/>
+ <line number="219" hits="0" branch="false"/>
+ <line number="220" hits="0" branch="false"/>
+ <line number="221" hits="0" branch="false"/>
+ <line number="222" hits="0" branch="false"/>
+ <line number="226" hits="0" branch="false"/>
+ <line number="229" hits="0" branch="false"/>
+ <line number="232" hits="0" branch="false"/>
+ <line number="234" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getHqlQueryFromOpenInfobuttonButtonRequest" signature="(Ljava/util/Map;)Lorg/hibernate/Query;" line-rate="0.0" branch-rate="0.0">
+ <lines>
+ <line number="48" hits="0" branch="false"/>
+ <line number="49" hits="0" branch="false"/>
+ <line number="50" hits="0" branch="false"/>
+ <line number="51" hits="0" branch="false"/>
+ <line number="54" hits="0" branch="false"/>
+ <line number="61" hits="0" branch="false"/>
+ <line number="70" hits="0" branch="false"/>
+ <line number="77" hits="0" branch="false"/>
+ <line number="84" hits="0" branch="false"/>
+ <line number="91" hits="0" branch="false"/>
+ <line number="98" hits="0" branch="false"/>
+ <line number="105" hits="0" branch="false"/>
+ <line number="108" hits="0" branch="false"/>
+ <line number="110" hits="0" branch="false"/>
+ <line number="111" hits="0" branch="false"/>
+ <line number="112" hits="0" branch="false"/>
+ <line number="113" hits="0" branch="false"/>
+ <line number="114" hits="0" branch="false"/>
+ <line number="115" hits="0" branch="false"/>
+ <line number="116" hits="0" branch="false"/>
+ <line number="117" hits="0" branch="false"/>
+ <line number="118" hits="0" branch="false"/>
+ <line number="119" hits="0" branch="false"/>
+ <line number="120" hits="0" branch="false"/>
+ <line number="121" hits="0" branch="false"/>
+ <line number="122" hits="0" branch="false"/>
+ <line number="124" hits="0" branch="false"/>
+ <line number="126" hits="0" branch="false"/>
+ <line number="127" hits="0" branch="false"/>
+ <line number="129" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="130" hits="0" branch="false"/>
+ <line number="131" hits="0" branch="false"/>
+ <line number="133" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="134" hits="0" branch="false"/>
+ <line number="135" hits="0" branch="false"/>
+ <line number="137" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="setMaxSupportedQueryCriteria" signature="(I)V" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="37" hits="0" branch="false"/>
+ <line number="38" hits="0" branch="false"/>
+ </lines>
+ </method>
+ </methods>
+ <lines>
+ <line number="24" hits="0" branch="false"/>
+ <line number="26" hits="0" branch="false"/>
+ <line number="33" hits="0" branch="false"/>
+ <line number="37" hits="0" branch="false"/>
+ <line number="38" hits="0" branch="false"/>
+ <line number="48" hits="0" branch="false"/>
+ <line number="49" hits="0" branch="false"/>
+ <line number="50" hits="0" branch="false"/>
+ <line number="51" hits="0" branch="false"/>
+ <line number="54" hits="0" branch="false"/>
+ <line number="61" hits="0" branch="false"/>
+ <line number="70" hits="0" branch="false"/>
+ <line number="77" hits="0" branch="false"/>
+ <line number="84" hits="0" branch="false"/>
+ <line number="91" hits="0" branch="false"/>
+ <line number="98" hits="0" branch="false"/>
+ <line number="105" hits="0" branch="false"/>
+ <line number="108" hits="0" branch="false"/>
+ <line number="110" hits="0" branch="false"/>
+ <line number="111" hits="0" branch="false"/>
+ <line number="112" hits="0" branch="false"/>
+ <line number="113" hits="0" branch="false"/>
+ <line number="114" hits="0" branch="false"/>
+ <line number="115" hits="0" branch="false"/>
+ <line number="116" hits="0" branch="false"/>
+ <line number="117" hits="0" branch="false"/>
+ <line number="118" hits="0" branch="false"/>
+ <line number="119" hits="0" branch="false"/>
+ <line number="120" hits="0" branch="false"/>
+ <line number="121" hits="0" branch="false"/>
+ <line number="122" hits="0" branch="false"/>
+ <line number="124" hits="0" branch="false"/>
+ <line number="126" hits="0" branch="false"/>
+ <line number="127" hits="0" branch="false"/>
+ <line number="129" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="130" hits="0" branch="false"/>
+ <line number="131" hits="0" branch="false"/>
+ <line number="133" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="134" hits="0" branch="false"/>
+ <line number="135" hits="0" branch="false"/>
+ <line number="137" hits="0" branch="false"/>
+ <line number="149" hits="0" branch="false"/>
+ <line number="150" hits="0" branch="false"/>
+ <line number="152" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="154" hits="0" branch="false"/>
+ <line number="164" hits="0" branch="false"/>
+ <line number="167" hits="0" branch="false"/>
+ <line number="176" hits="0" branch="false"/>
+ <line number="177" hits="0" branch="false"/>
+ <line number="178" hits="0" branch="false"/>
+ <line number="179" hits="0" branch="false"/>
+ <line number="180" hits="0" branch="false"/>
+ <line number="184" hits="0" branch="true" condition-coverage="0% (0/4)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ <condition number="1" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="186" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="187" hits="0" branch="false"/>
+ <line number="188" hits="0" branch="false"/>
+ <line number="189" hits="0" branch="false"/>
+ <line number="192" hits="0" branch="false"/>
+ <line number="193" hits="0" branch="false"/>
+ <line number="196" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="198" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="199" hits="0" branch="false"/>
+ <line number="201" hits="0" branch="false"/>
+ <line number="207" hits="0" branch="false"/>
+ <line number="209" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="211" hits="0" branch="false"/>
+ <line number="212" hits="0" branch="false"/>
+ <line number="213" hits="0" branch="false"/>
+ <line number="214" hits="0" branch="false"/>
+ <line number="215" hits="0" branch="false"/>
+ <line number="217" hits="0" branch="false"/>
+ <line number="219" hits="0" branch="false"/>
+ <line number="220" hits="0" branch="false"/>
+ <line number="221" hits="0" branch="false"/>
+ <line number="222" hits="0" branch="false"/>
+ <line number="226" hits="0" branch="false"/>
+ <line number="229" hits="0" branch="false"/>
+ <line number="232" hits="0" branch="false"/>
+ <line number="234" hits="0" branch="false"/>
+ <line number="246" hits="0" branch="false"/>
+ <line number="247" hits="0" branch="false"/>
+ <line number="248" hits="0" branch="false"/>
+ <line number="249" hits="0" branch="false"/>
+ <line number="251" hits="0" branch="true" condition-coverage="0% (0/4)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ <condition number="1" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="253" hits="0" branch="false"/>
+ <line number="255" hits="0" branch="false"/>
+ <line number="256" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="257" hits="0" branch="false"/>
+ <line number="258" hits="0" branch="false"/>
+ <line number="260" hits="0" branch="false"/>
+ <line number="270" hits="0" branch="false"/>
+ <line number="273" hits="0" branch="false"/>
+ <line number="278" hits="0" branch="false"/>
+ <line number="280" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="281" hits="0" branch="false"/>
+ <line number="282" hits="0" branch="false"/>
+ <line number="284" hits="0" branch="false"/>
+ </lines>
+ </class>
+ <class name="org.openinfobutton.responder.dao.impl.ResponderRequestParameterDaoImpl" filename="org/openinfobutton/responder/dao/impl/ResponderRequestParameterDaoImpl.java" line-rate="0.0" branch-rate="0.0" complexity="1.2">
+ <methods>
+ <method name="<init>" signature="()V" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="22" hits="0" branch="false"/>
+ <line number="24" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getOpenInfobuttonRequestParameterByName" signature="(Ljava/lang/String;)Lorg/openinfobutton/app/model/RequestParameter;" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="65" hits="0" branch="false"/>
+ <line number="66" hits="0" branch="false"/>
+ <line number="68" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getOpenInfobuttonRequestParametersByMinCardinality" signature="(I)Ljava/util/Collection;" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="55" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getRequiredOpenInfobuttonRequestParameters" signature="()Ljava/util/Collection;" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="28" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getSupportedOpenInfobuttonRequestParametersOrdered" signature="()Ljava/util/List;" line-rate="0.0" branch-rate="0.0">
+ <lines>
+ <line number="39" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="40" hits="0" branch="false"/>
+ <line number="50" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="setAllOpenInfobuttonRequestParameters" signature="(Ljava/util/List;)V" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="33" hits="0" branch="false"/>
+ <line number="34" hits="0" branch="false"/>
+ </lines>
+ </method>
+ </methods>
+ <lines>
+ <line number="22" hits="0" branch="false"/>
+ <line number="24" hits="0" branch="false"/>
+ <line number="28" hits="0" branch="false"/>
+ <line number="33" hits="0" branch="false"/>
+ <line number="34" hits="0" branch="false"/>
+ <line number="39" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="40" hits="0" branch="false"/>
+ <line number="50" hits="0" branch="false"/>
+ <line number="55" hits="0" branch="false"/>
+ <line number="65" hits="0" branch="false"/>
+ <line number="66" hits="0" branch="false"/>
+ <line number="68" hits="0" branch="false"/>
+ </lines>
+ </class>
+ <class name="org.openinfobutton.responder.dao.impl.ResponderValueSetDaoImpl" filename="org/openinfobutton/responder/dao/impl/ResponderValueSetDaoImpl.java" line-rate="0.0" branch-rate="1.0" complexity="1.0">
+ <methods>
+ <method name="<init>" signature="()V" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="18" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getValueSetCodes" signature="(Ljava/math/BigDecimal;)Ljava/util/List;" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="23" hits="0" branch="false"/>
+ <line number="31" hits="0" branch="false"/>
+ </lines>
+ </method>
+ </methods>
+ <lines>
+ <line number="18" hits="0" branch="false"/>
+ <line number="23" hits="0" branch="false"/>
+ <line number="31" hits="0" branch="false"/>
+ </lines>
+ </class>
+ </classes>
+ </package>
+ <package name="org.openinfobutton.responder.service" line-rate="1.0" branch-rate="1.0" complexity="1.0">
+ <classes>
+ <class name="org.openinfobutton.responder.service.ResponderService" filename="org/openinfobutton/responder/service/ResponderService.java" line-rate="1.0" branch-rate="1.0" complexity="1.0">
+ <methods>
+ </methods>
+ <lines>
+ </lines>
+ </class>
+ </classes>
+ </package>
+ <package name="org.openinfobutton.responder.service.impl" line-rate="0.375" branch-rate="0.3695652173913043" complexity="5.142857142857143">
+ <classes>
+ <class name="org.openinfobutton.responder.service.impl.ResponderServiceImpl" filename="org/openinfobutton/responder/service/impl/ResponderServiceImpl.java" line-rate="0.375" branch-rate="0.3695652173913043" complexity="5.142857142857143">
+ <methods>
+ <method name="<init>" signature="()V" line-rate="1.0" branch-rate="1.0">
+ <lines>
+ <line number="30" hits="15" branch="false"/>
+ </lines>
+ </method>
+ <method name="findAssetsByInfobuttonRequest" signature="(Ljava/util/Map;)Ljava/util/Collection;" line-rate="0.0" branch-rate="1.0">
+ <lines>
+ <line number="218" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getApplicationProperties" signature="(Ljava/lang/String;)Ljava/util/Properties;" line-rate="0.0" branch-rate="0.0">
+ <lines>
+ <line number="198" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="199" hits="0" branch="false"/>
+ <line number="202" hits="0" branch="false"/>
+ <line number="204" hits="0" branch="false"/>
+ <line number="206" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="207" hits="0" branch="false"/>
+ <line number="208" hits="0" branch="false"/>
+ <line number="210" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getIndexPropertyInterpretationMap" signature="()Ljava/util/Map;" line-rate="0.0" branch-rate="0.0">
+ <lines>
+ <line number="117" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="118" hits="0" branch="false"/>
+ <line number="121" hits="0" branch="false"/>
+ <line number="123" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="getIndexPropertyInterpretationMap" signature="(Ljava/util/Collection;)Ljava/util/Map;" line-rate="0.875" branch-rate="0.55">
+ <lines>
+ <line number="77" hits="5" branch="true" condition-coverage="50% (1/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="50%"/>
+ </conditions>
+ </line>
+ <line number="78" hits="0" branch="false"/>
+ <line number="81" hits="5" branch="false"/>
+ <line number="83" hits="5" branch="false"/>
+ <line number="84" hits="5" branch="false"/>
+ <line number="86" hits="5" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="88" hits="30" branch="true" condition-coverage="33% (4/12)">
+ <conditions>
+ <condition number="0" type="jump" coverage="50%"/>
+ <condition number="1" type="jump" coverage="50%"/>
+ <condition number="2" type="jump" coverage="0%"/>
+ <condition number="3" type="jump" coverage="50%"/>
+ <condition number="4" type="jump" coverage="0%"/>
+ <condition number="5" type="jump" coverage="50%"/>
+ </conditions>
+ </line>
+ <line number="92" hits="0" branch="false"/>
+ <line number="96" hits="30" branch="true" condition-coverage="100% (4/4)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ <condition number="1" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="98" hits="10" branch="false"/>
+ <line number="99" hits="10" branch="false"/>
+ <line number="103" hits="30" branch="false"/>
+ <line number="104" hits="30" branch="false"/>
+ <line number="106" hits="30" branch="false"/>
+ <line number="108" hits="5" branch="false"/>
+ <line number="110" hits="5" branch="false"/>
+ </lines>
+ </method>
+ <method name="getKnowledgeRequestParameterMap" signature="(Ljava/util/Map;)Ljava/util/Map;" line-rate="1.0" branch-rate="1.0">
+ <lines>
+ <line number="130" hits="10" branch="false"/>
+ <line number="132" hits="10" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="134" hits="10" branch="false"/>
+ <line number="135" hits="10" branch="false"/>
+ <line number="137" hits="10" branch="false"/>
+ <line number="138" hits="20" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="140" hits="15" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="141" hits="10" branch="false"/>
+ <line number="143" hits="5" branch="false"/>
+ <line number="147" hits="10" branch="false"/>
+ <line number="150" hits="5" branch="false"/>
+ <line number="152" hits="5" branch="false"/>
+ </lines>
+ </method>
+ <method name="getRxNormQueryExpansionTermTypes" signature="()Ljava/util/Set;" line-rate="0.0" branch-rate="0.0">
+ <lines>
+ <line number="57" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="58" hits="0" branch="false"/>
+ <line number="61" hits="0" branch="false"/>
+ <line number="63" hits="0" branch="false"/>
+ <line number="64" hits="0" branch="false"/>
+ <line number="65" hits="0" branch="false"/>
+ <line number="67" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="68" hits="0" branch="false"/>
+ <line number="69" hits="0" branch="false"/>
+ <line number="71" hits="0" branch="false"/>
+ </lines>
+ </method>
+ <method name="requestContainsRequiredParameters" signature="(Ljava/util/Map;)Z" line-rate="0.0" branch-rate="0.0">
+ <lines>
+ <line number="159" hits="0" branch="false"/>
+ <line number="161" hits="0" branch="false"/>
+ <line number="163" hits="0" branch="false"/>
+ <line number="164" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="165" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="166" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="167" hits="0" branch="false"/>
+ <line number="169" hits="0" branch="false"/>
+ <line number="170" hits="0" branch="false"/>
+ <line number="172" hits="0" branch="false"/>
+ <line number="174" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="176" hits="0" branch="false"/>
+ <line number="177" hits="0" branch="false"/>
+ <line number="178" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="179" hits="0" branch="false"/>
+ <line number="180" hits="0" branch="false"/>
+ <line number="183" hits="0" branch="false"/>
+ <line number="184" hits="0" branch="false"/>
+ <line number="187" hits="0" branch="false"/>
+ <line number="190" hits="0" branch="false"/>
+ </lines>
+ </method>
+ </methods>
+ <lines>
+ <line number="30" hits="15" branch="false"/>
+ <line number="57" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="58" hits="0" branch="false"/>
+ <line number="61" hits="0" branch="false"/>
+ <line number="63" hits="0" branch="false"/>
+ <line number="64" hits="0" branch="false"/>
+ <line number="65" hits="0" branch="false"/>
+ <line number="67" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="68" hits="0" branch="false"/>
+ <line number="69" hits="0" branch="false"/>
+ <line number="71" hits="0" branch="false"/>
+ <line number="77" hits="5" branch="true" condition-coverage="50% (1/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="50%"/>
+ </conditions>
+ </line>
+ <line number="78" hits="0" branch="false"/>
+ <line number="81" hits="5" branch="false"/>
+ <line number="83" hits="5" branch="false"/>
+ <line number="84" hits="5" branch="false"/>
+ <line number="86" hits="5" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="88" hits="30" branch="true" condition-coverage="33% (4/12)">
+ <conditions>
+ <condition number="0" type="jump" coverage="50%"/>
+ <condition number="1" type="jump" coverage="50%"/>
+ <condition number="2" type="jump" coverage="0%"/>
+ <condition number="3" type="jump" coverage="50%"/>
+ <condition number="4" type="jump" coverage="0%"/>
+ <condition number="5" type="jump" coverage="50%"/>
+ </conditions>
+ </line>
+ <line number="92" hits="0" branch="false"/>
+ <line number="96" hits="30" branch="true" condition-coverage="100% (4/4)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ <condition number="1" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="98" hits="10" branch="false"/>
+ <line number="99" hits="10" branch="false"/>
+ <line number="103" hits="30" branch="false"/>
+ <line number="104" hits="30" branch="false"/>
+ <line number="106" hits="30" branch="false"/>
+ <line number="108" hits="5" branch="false"/>
+ <line number="110" hits="5" branch="false"/>
+ <line number="117" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="118" hits="0" branch="false"/>
+ <line number="121" hits="0" branch="false"/>
+ <line number="123" hits="0" branch="false"/>
+ <line number="130" hits="10" branch="false"/>
+ <line number="132" hits="10" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="134" hits="10" branch="false"/>
+ <line number="135" hits="10" branch="false"/>
+ <line number="137" hits="10" branch="false"/>
+ <line number="138" hits="20" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="140" hits="15" branch="true" condition-coverage="100% (2/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="100%"/>
+ </conditions>
+ </line>
+ <line number="141" hits="10" branch="false"/>
+ <line number="143" hits="5" branch="false"/>
+ <line number="147" hits="10" branch="false"/>
+ <line number="150" hits="5" branch="false"/>
+ <line number="152" hits="5" branch="false"/>
+ <line number="159" hits="0" branch="false"/>
+ <line number="161" hits="0" branch="false"/>
+ <line number="163" hits="0" branch="false"/>
+ <line number="164" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="165" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="166" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="167" hits="0" branch="false"/>
+ <line number="169" hits="0" branch="false"/>
+ <line number="170" hits="0" branch="false"/>
+ <line number="172" hits="0" branch="false"/>
+ <line number="174" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="176" hits="0" branch="false"/>
+ <line number="177" hits="0" branch="false"/>
+ <line number="178" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="179" hits="0" branch="false"/>
+ <line number="180" hits="0" branch="false"/>
+ <line number="183" hits="0" branch="false"/>
+ <line number="184" hits="0" branch="false"/>
+ <line number="187" hits="0" branch="false"/>
+ <line number="190" hits="0" branch="false"/>
+ <line number="198" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="199" hits="0" branch="false"/>
+ <line number="202" hits="0" branch="false"/>
+ <line number="204" hits="0" branch="false"/>
+ <line number="206" hits="0" branch="true" condition-coverage="0% (0/2)">
+ <conditions>
+ <condition number="0" type="jump" coverage="0%"/>
+ </conditions>
+ </line>
+ <line number="207" hits="0" branch="false"/>
+ <line number="208" hits="0" branch="false"/>
+ <line number="210" hits="0" branch="false"/>
+ <line number="218" hits="0" branch="false"/>
+ </lines>
+ </class>
+ </classes>
+ </package>
+ </packages>
+</coverage>
diff --git a/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/controller/OpenInfobuttonResponderController.java b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/controller/OpenInfobuttonResponderController.java
new file mode 100644
index 0000000..0ea7de3
--- /dev/null
+++ b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/controller/OpenInfobuttonResponderController.java
@@ -0,0 +1,122 @@
+package org.openinfobutton.responder.controller;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Properties;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.openinfobutton.app.model.Asset;
+import org.openinfobutton.responder.service.ResponderService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.MissingServletRequestParameterException;
+import org.springframework.web.HttpMediaTypeNotSupportedException;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseStatus;
+
+/**
+ *
+ * @author rick
+ */
+ at Controller
+public class OpenInfobuttonResponderController {
+
+ public static final String INDEX_PAGE = "index";
+ public static final String ATOM_PAGE = "searchResultsAtom";
+ public static final String HTML_PAGE = "searchResultsHtml";
+ public static final String ATOM_FEED_KEY = "atom.feed";
+
+ @Autowired
+ private ResponderService responderService;
+
+ private Properties atomFeedMetadata;
+ private Map<String, Map<String, String>> indexPropertyInterpretationMap;
+
+ public void setResponderService(ResponderService responderService) {
+ this.responderService = responderService;
+ }
+
+ public void setAtomFeedMetadata(Properties atomFeedMetadata) {
+ this.atomFeedMetadata = atomFeedMetadata;
+ }
+
+ public void setIndexPropertyInterpretationMap(Map<String, Map<String, String>> indexPropertyInterpretationMap) {
+ this.indexPropertyInterpretationMap = indexPropertyInterpretationMap;
+ }
+
+ private void setRequiredResponseObjects(){
+
+ if ( this.atomFeedMetadata == null ) {
+ this.atomFeedMetadata = responderService.getApplicationProperties( ATOM_FEED_KEY );
+ }
+ if ( this.indexPropertyInterpretationMap == null ) {
+ this.indexPropertyInterpretationMap = responderService.getIndexPropertyInterpretationMap();
+ }
+
+ }
+
+ @RequestMapping("/")
+ public String indexPageRequest() {
+ return INDEX_PAGE;
+ }
+
+ @RequestMapping("/responder")
+ public String openInfobuttonRequestHandler(HttpServletRequest request, HttpServletResponse response, ModelMap model)
+ throws MissingServletRequestParameterException, HttpMediaTypeNotSupportedException, IllegalArgumentException {
+
+ response.setHeader("Cache-Control", "no-cache");
+ // todo: if authorization is required return 401 when not authorized
+
+ setRequiredResponseObjects();
+
+ // throws IllegalArgumentException
+ Map<String, String> requestParameters = responderService.getKnowledgeRequestParameterMap(request.getParameterMap());
+
+ // throws MissingServletRequestParameterException
+ responderService.requestContainsRequiredParameters(requestParameters);
+ Collection<Asset> matchedAssets = responderService.findAssetsByInfobuttonRequest(requestParameters);
+
+ model.addAttribute("atomFeedMetadata", this.atomFeedMetadata);
+ model.addAttribute("indexPropertyInterpretationMap", this.indexPropertyInterpretationMap);
+ model.addAttribute("requestParameters", requestParameters);
+ model.addAttribute("assets", matchedAssets);
+
+ String viewType = requestParameters.get("knowledgeResponseType");
+
+ if (viewType == null) { // default
+ return ATOM_PAGE;
+ } else if ("text/html".equals(viewType)) {
+ return HTML_PAGE;
+ } else if ("text/xml".equals(viewType)) {
+ return ATOM_PAGE;
+ } else {
+ throw new HttpMediaTypeNotSupportedException("Unsupported knowledgeResponseType: " + viewType);
+ }
+
+ }
+
+ @ResponseStatus(value = HttpStatus.UNSUPPORTED_MEDIA_TYPE,
+ reason = "Requested knowedgeResourceType not supported.")
+ @ExceptionHandler(HttpMediaTypeNotSupportedException.class)
+ public void handleHttpMediaTypeNotSupportedException() {
+ // logic handled by annotations
+ }
+
+ @ResponseStatus(value = HttpStatus.BAD_REQUEST,
+ reason = "Missing required parameter(s): mainSearchCriteria.v.c, mainSearchCriteria.v.cs, or taskContext.c.c") // 400
+ @ExceptionHandler(MissingServletRequestParameterException.class)
+ public void handleMissingServletRequestParameterException() {
+ // logic handled by annotations
+ }
+
+ @ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "Illegal argument: each parameter name must be distict. "
+ + "Parameters that support cardinality greater than 1 require distinct trailing numeric values.") // 400
+ @ExceptionHandler(IllegalArgumentException.class)
+ public void handleIllegalArgumentException() {
+ // logic handled by annotations
+ }
+
+}
diff --git a/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderAppPropertyDao.java b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderAppPropertyDao.java
new file mode 100644
index 0000000..b8e9d42
--- /dev/null
+++ b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderAppPropertyDao.java
@@ -0,0 +1,11 @@
+package org.openinfobutton.responder.dao;
+
+import org.openinfobutton.app.dao.IAppPropertyDao;
+
+/**
+ *
+ * @author rick
+ */
+public interface ResponderAppPropertyDao extends IAppPropertyDao {
+
+}
diff --git a/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderAssetDao.java b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderAssetDao.java
new file mode 100644
index 0000000..93a8373
--- /dev/null
+++ b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderAssetDao.java
@@ -0,0 +1,16 @@
+package org.openinfobutton.responder.dao;
+
+import java.util.Collection;
+import java.util.Map;
+import org.openinfobutton.app.dao.IAssetDao;
+import org.openinfobutton.app.model.Asset;
+
+/**
+ *
+ * @author rick
+ */
+public interface ResponderAssetDao extends IAssetDao {
+
+ Collection<Asset> findByInfobuttonRequest( Map<String,String> requestParameters );
+
+}
diff --git a/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderRequestParameterDao.java b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderRequestParameterDao.java
new file mode 100644
index 0000000..a368e43
--- /dev/null
+++ b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderRequestParameterDao.java
@@ -0,0 +1,24 @@
+package org.openinfobutton.responder.dao;
+
+import java.util.Collection;
+import java.util.List;
+import org.openinfobutton.app.dao.IRequestParameterDao;
+import org.openinfobutton.app.model.RequestParameter;
+
+/**
+ *
+ * @author rick
+ */
+public interface ResponderRequestParameterDao extends IRequestParameterDao {
+
+ void setAllOpenInfobuttonRequestParameters(List<RequestParameter> allOpenInfobuttonRequestParameters);
+
+ List<RequestParameter> getSupportedOpenInfobuttonRequestParametersOrdered();
+
+ Collection<RequestParameter> getOpenInfobuttonRequestParametersByMinCardinality( int minCardinality );
+
+ Collection<RequestParameter> getRequiredOpenInfobuttonRequestParameters();
+
+ RequestParameter getOpenInfobuttonRequestParameterByName( String paramaterName);
+
+}
diff --git a/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderValueSetDao.java b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderValueSetDao.java
new file mode 100644
index 0000000..68a35e8
--- /dev/null
+++ b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderValueSetDao.java
@@ -0,0 +1,12 @@
+package org.openinfobutton.responder.dao;
+
+import org.openinfobutton.app.dao.IValueSetDao;
+
+/**
+ *
+ * @author rick
+ */
+public interface ResponderValueSetDao extends IValueSetDao {
+
+
+}
diff --git a/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderAppPropertyDaoImpl.java b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderAppPropertyDaoImpl.java
new file mode 100644
index 0000000..88ac8cf
--- /dev/null
+++ b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderAppPropertyDaoImpl.java
@@ -0,0 +1,26 @@
+package org.openinfobutton.responder.dao.impl;
+
+import java.util.List;
+import org.hibernate.criterion.Restrictions;
+import org.openinfobutton.app.dao.DaoBase;
+import org.openinfobutton.app.model.AppProperty;
+import org.openinfobutton.responder.dao.ResponderAppPropertyDao;
+import org.springframework.stereotype.Repository;
+
+/**
+ *
+ * @author rick
+ */
+ at Repository
+public class ResponderAppPropertyDaoImpl extends DaoBase<AppProperty> implements ResponderAppPropertyDao {
+
+ @Override
+ public List<AppProperty> getAppPropertyGroup( String propertyGroup ) {
+ return getSessionFactory()
+ .getCurrentSession()
+ .createCriteria(AppProperty.class)
+ .add(Restrictions.eq("propertyGroup", propertyGroup))
+ .list();
+ }
+
+}
diff --git a/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderAssetDaoImpl.java b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderAssetDaoImpl.java
new file mode 100644
index 0000000..8c94fd2
--- /dev/null
+++ b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderAssetDaoImpl.java
@@ -0,0 +1,287 @@
+package org.openinfobutton.responder.dao.impl;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.hibernate.Query;
+import org.openinfobutton.app.dao.DaoBase;
+import org.openinfobutton.app.helper.AgeToAgeGroupConversionHelper;
+import org.openinfobutton.app.model.Asset;
+import org.openinfobutton.app.model.Code;
+import org.openinfobutton.responder.dao.ResponderAssetDao;
+import org.openinfobutton.service.dao.CodeExpanderDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+/**
+ *
+ * @author rick
+ */
+ at Repository
+public class ResponderAssetDaoImpl extends DaoBase<Asset> implements ResponderAssetDao {
+
+ private int maxSupportedQueryCriteria = 950;
+
+ @Autowired
+ private CodeExpanderDao codeExpanderDao;
+
+ @Override
+ public Collection<Asset> findByInfobuttonRequest(Map<String,String> requestParameters) {
+ return getHqlQueryFromOpenInfobuttonButtonRequest( requestParameters ).list();
+ }
+
+ public void setMaxSupportedQueryCriteria(int maxSupportedQueryCriteria) {
+ this.maxSupportedQueryCriteria = maxSupportedQueryCriteria;
+ }
+
+ /**
+ * Builds the HQL search query. Assumes valid request parameters - no direct error handling/checking.
+ * @param requestParameters the infobutton standard parameters and values
+ * @return the Hibernate Query to the caller
+ */
+
+ private Query getHqlQueryFromOpenInfobuttonButtonRequest( Map<String,String> requestParameters ) {
+
+ StringBuilder mainSearchAdditionalPhrases = new StringBuilder();
+ Map<String,String> hqlParameters = new HashMap<String,String>();
+ Map<String,Set<String>> hqlParamatersForInPhrases = new HashMap<String,Set<String>>();
+ int aliasIndex = 5; // for alias count to ensure they are unique in the subqueries
+
+
+ StringBuilder subTopicPhrase = getHqlCriterionForParameterWithOptionalIndex(
+ requestParameters,
+ hqlParameters,
+ "subTopic.v.c",
+ "subTopic.v",
+ "subTopicCode", aliasIndex++);
+
+ StringBuilder agePhrase = getHqlCriterionForAge(
+ requestParameters,
+ hqlParamatersForInPhrases,
+ "age.v.v",
+ "age.v.u",
+ "ageGroup.v",
+ "convertedAgeGroups",
+ aliasIndex++);
+
+ StringBuilder ageGroupPhrase = getHqlCriterionForParameterWithOptionalIndex(
+ requestParameters,
+ hqlParameters,
+ "ageGroup.v.c",
+ "ageGroup.v",
+ "ageGroupCode", aliasIndex++);
+
+ StringBuilder administrativeGenderCodePhrase = getHqlCriterionForParameterWithOptionalIndex(
+ requestParameters,
+ hqlParameters,
+ "patientPerson.administrativeGenderCode.c",
+ "patientPerson.administrativeGenderCode",
+ "genderCode", aliasIndex++);
+
+ StringBuilder informationRecipientPhrase = getHqlCriterionForParameterWithOptionalIndex(
+ requestParameters,
+ hqlParameters,
+ "informationRecipient",
+ "informationRecipient",
+ "informationRecipientCode", aliasIndex++);
+
+ StringBuilder performerPhrase = getHqlCriterionForParameterWithOptionalIndex(
+ requestParameters,
+ hqlParameters,
+ "performer",
+ "performer",
+ "performerCode", aliasIndex++);
+
+ StringBuilder encounterPhrase = getHqlCriterionForParameterWithOptionalIndex(
+ requestParameters,
+ hqlParameters,
+ "encounter.c.c",
+ "encounter.c",
+ "encounterCode", aliasIndex++);
+
+ StringBuilder mainSearchCriterion =
+ getHqlMainSerchCriteria( requestParameters, hqlParameters, hqlParamatersForInPhrases, aliasIndex++);
+
+ String taskContext = requestParameters.get("taskContext.c.c");
+
+ StringBuilder hsql = new StringBuilder();
+ hsql.append("select a from Asset a \n");
+ hsql.append("where 1 = 1 \n");
+ hsql.append( mainSearchCriterion.toString() );
+ hsql.append( mainSearchAdditionalPhrases.toString() );
+ hsql.append("and a in (select p1.asset from AssetProperty p1 where p1.propertyName = 'taskContext.c' and p1.code = :taskContext ) \n");
+ hsql.append( subTopicPhrase.toString() );
+ hsql.append( administrativeGenderCodePhrase.toString() );
+ hsql.append( agePhrase.toString() );
+ hsql.append( ageGroupPhrase.toString() );
+ hsql.append( informationRecipientPhrase.toString() );
+ hsql.append( performerPhrase.toString() );
+ hsql.append( encounterPhrase.toString() );
+
+ System.out.println( hsql.toString() );
+
+ Query query = getSessionFactory().getCurrentSession().createQuery(hsql.toString());
+ query.setParameter("taskContext", taskContext);
+
+ for ( String parameterName:hqlParameters.keySet() ) {
+ query.setParameter( parameterName, hqlParameters.get(parameterName) );
+ }
+
+ for ( String parameterName:hqlParamatersForInPhrases.keySet() ) {
+ query.setParameterList( parameterName, hqlParamatersForInPhrases.get(parameterName) );
+ }
+
+ return query;
+
+ }
+
+ private StringBuilder getHqlCriterionForParameterWithOptionalIndex(
+ Map<String,String> requestParameters,
+ Map<String,String> hqlParameters,
+ String codeParameterName,
+ String dbPropertyName,
+ String hqlParameterName,
+ int aliasIndex ) {
+
+ StringBuilder queryPhrase = new StringBuilder();
+ String aliasIndex2 = aliasIndex + "" + aliasIndex;
+
+ if ( requestParameters.get( codeParameterName ) != null ) {
+
+ queryPhrase
+ .append(" and ( a in ( \n")
+ .append(" select p").append(aliasIndex).append(".asset from AssetProperty p").append(aliasIndex).append(" \n")
+ .append(" where p").append(aliasIndex).append(".propertyName = '").append( dbPropertyName ).append("' \n")
+ .append(" and p").append(aliasIndex).append(".code = :").append( hqlParameterName ).append(") \n")
+ .append(" or a not in ( \n")
+ .append(" select p").append(aliasIndex2).append(".asset from AssetProperty p").append(aliasIndex2).append(" \n")
+ .append(" where p").append(aliasIndex2).append(".propertyName = '").append( dbPropertyName ).append("') \n")
+ .append(" ) \n");
+
+ hqlParameters.put( hqlParameterName, requestParameters.get( codeParameterName ) );
+ }
+
+ return queryPhrase;
+ }
+
+ private StringBuilder getHqlMainSerchCriteria (
+ Map<String, String> requestParameters,
+ Map<String,String> hqlParameters,
+ Map<String,Set<String>> hqlInPhraseParameters,
+ int aliasIndex ) {
+
+ StringBuilder queryPhrase = new StringBuilder();
+ String mainSearchCriteriaCode = null;
+ String mainSearchCriteriaCodeSystem = null;
+ int criteriaIndex = 0;
+ boolean moreCriteria = true;
+
+
+ // and ((m) or (m1) or (m2) ... )
+ while ( moreCriteria && criteriaIndex <= maxSupportedQueryCriteria ) {
+
+ if ( criteriaIndex == 0 ) {
+ queryPhrase.append(" and ( \n");
+ mainSearchCriteriaCode = requestParameters.get("mainSearchCriteria.v.c");
+ mainSearchCriteriaCodeSystem = requestParameters.get("mainSearchCriteria.v.cs");
+ }
+ else {
+ mainSearchCriteriaCode = requestParameters.get("mainSearchCriteria.v.c" + criteriaIndex);
+ mainSearchCriteriaCodeSystem = requestParameters.get("mainSearchCriteria.v.cs" + criteriaIndex);
+ }
+
+ if ( mainSearchCriteriaCode != null ) {
+
+ if ( criteriaIndex > 0 ) {
+ queryPhrase.append(" or \n");
+ }
+ queryPhrase
+ .append("(a.assetId in \n")
+ .append("(select p").append(aliasIndex).append(".asset from AssetProperty p").append(aliasIndex).append(" \n")
+ .append(" where (p").append(aliasIndex).append(".propertyName = 'mainSearchCriteria.v' \n")
+ .append(" and p").append(aliasIndex).append(".codeSystem = :mainSearchCriteriaCodeSystem \n");
+
+ hqlParameters.put( "mainSearchCriteriaCodeSystem", mainSearchCriteriaCodeSystem );
+
+ if ( CodeExpanderDao.RXNORM_CODE_SYSTEM_OID.equals( mainSearchCriteriaCodeSystem ) ) {
+
+ String hqlParameterName = "mainSearchCriteriaCodeList" + criteriaIndex;
+ queryPhrase.append(" and p").append(aliasIndex).append(".code in (:").append( hqlParameterName ).append("))) \n ) \n");
+ Set<Code> expansionCodes = codeExpanderDao.getExpansionCodes( CodeExpanderDao.RXNORM_CODE_SYSTEM_OID, mainSearchCriteriaCode );
+ Set<String> codes = getCodesOnly( expansionCodes );
+ hqlInPhraseParameters.put(hqlParameterName, codes);
+
+ }
+ else {
+ String hqlParameterName = "mainSearchCriteriaCode" + criteriaIndex;
+ queryPhrase.append(" and p").append(aliasIndex).append(".code = :").append( hqlParameterName ).append(")) \n ) \n");
+ hqlParameters.put( hqlParameterName, mainSearchCriteriaCode );
+ }
+
+ }
+ else {
+ moreCriteria = false;
+ }
+
+ criteriaIndex++;
+ }
+
+ queryPhrase.append(" ) \n");
+
+ return queryPhrase;
+ }
+
+ private StringBuilder getHqlCriterionForAge(
+ Map<String,String> requestParameters,
+ Map<String,Set<String>> hqlInPhraseParameters,
+ String ageParameterName,
+ String ageUnitsParameterName,
+ String dbPropertyName,
+ String hqlParameterName,
+ int aliasIndex ) {
+
+ StringBuilder queryPhrase = new StringBuilder();
+ String aliasIndex2 = aliasIndex + "" + aliasIndex;
+ String ageValue = requestParameters.get( ageParameterName );
+ String ageUnitsCode = requestParameters.get( ageUnitsParameterName );
+
+ if ( ageValue != null && ageUnitsCode != null ) {
+
+ List<Code> hqlAgeGroupCodes = AgeToAgeGroupConversionHelper.ageToAgeGroup(Integer.parseInt(ageValue) , ageUnitsCode);
+
+ Set<String> hqlAgeGroupCodesSet = new HashSet<String>();
+ for ( Code ageGroupCode:hqlAgeGroupCodes ) {
+ hqlAgeGroupCodesSet.add(ageGroupCode.getCode());
+ }
+
+ queryPhrase
+ .append(" and ( a in ( \n")
+ .append(" select p").append(aliasIndex).append(".asset from AssetProperty p").append(aliasIndex).append(" \n")
+ .append(" where p").append(aliasIndex).append(".propertyName = '").append( dbPropertyName ).append("' \n")
+ .append(" and p").append(aliasIndex).append(".code in (:").append( hqlParameterName ).append(")) \n")
+ .append(" or a not in ( \n")
+ .append(" select p").append(aliasIndex2).append(".asset from AssetProperty p").append(aliasIndex2).append(" \n")
+ .append(" where p").append(aliasIndex2).append(".propertyName = '").append( dbPropertyName ).append("') \n")
+ .append(" ) \n");
+
+ hqlInPhraseParameters.put( hqlParameterName, hqlAgeGroupCodesSet);
+ }
+
+ return queryPhrase;
+ }
+
+ private Set<String> getCodesOnly( Set<Code> codes ) {
+
+ Set<String> codesOnly = new HashSet<String>();
+
+ for ( Code code_: codes ) {
+ codesOnly.add( code_.getCode() );
+ }
+
+ return codesOnly;
+ }
+
+}
diff --git a/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderRequestParameterDaoImpl.java b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderRequestParameterDaoImpl.java
new file mode 100644
index 0000000..0d50122
--- /dev/null
+++ b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderRequestParameterDaoImpl.java
@@ -0,0 +1,77 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.openinfobutton.responder.dao.impl;
+
+import java.util.Collection;
+import java.util.List;
+import org.hibernate.criterion.Example;
+import org.hibernate.criterion.Order;
+import org.hibernate.criterion.Restrictions;
+import org.openinfobutton.app.dao.DaoBase;
+import org.openinfobutton.app.model.RequestParameter;
+import org.openinfobutton.responder.dao.ResponderRequestParameterDao;
+import org.springframework.stereotype.Repository;
+
+/**
+ *
+ * @author rick
+ */
+ at Repository
+public class ResponderRequestParameterDaoImpl extends DaoBase<RequestParameter> implements ResponderRequestParameterDao {
+
+ List<RequestParameter> supportedOpenInfobuttonRequestParameters = null;
+
+ @Override
+ public Collection<RequestParameter> getRequiredOpenInfobuttonRequestParameters() {
+ return this.getOpenInfobuttonRequestParametersByMinCardinality(1);
+ }
+
+ @Override
+ public void setAllOpenInfobuttonRequestParameters(List<RequestParameter> supportedOpenInfobuttonRequestParameters) {
+ this.supportedOpenInfobuttonRequestParameters = supportedOpenInfobuttonRequestParameters;
+ }
+
+ @Override
+ public List<RequestParameter> getSupportedOpenInfobuttonRequestParametersOrdered() {
+
+ if (supportedOpenInfobuttonRequestParameters == null) {
+ supportedOpenInfobuttonRequestParameters = getSessionFactory()
+ .getCurrentSession()
+ .createCriteria(RequestParameter.class)
+ .add( Restrictions.isNotNull("parameterRoot") )
+ .add( Restrictions.isNotNull("parameterName") )
+ .add( Restrictions.isNotNull("typeCode") )
+ .addOrder(Order.asc("parameterName"))
+ .list();
+ }
+
+ return supportedOpenInfobuttonRequestParameters;
+ }
+
+ @Override
+ public Collection<RequestParameter> getOpenInfobuttonRequestParametersByMinCardinality(int minCardinality) {
+ return getSessionFactory()
+ .getCurrentSession()
+ .createCriteria(RequestParameter.class)
+ .add(Restrictions.eq("cardinalityMin", new Long(minCardinality)))
+ .list();
+ }
+
+ @Override
+ public RequestParameter getOpenInfobuttonRequestParameterByName(String paramaterName) {
+
+ RequestParameter requestParameterExample = new RequestParameter();
+ requestParameterExample.setParameterName(paramaterName);
+
+ return (RequestParameter) getSessionFactory()
+ .getCurrentSession()
+ .createCriteria(RequestParameter.class)
+ .add(Example.create(requestParameterExample))
+ .list()
+ .get(0);
+
+ }
+
+}
diff --git a/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderValueSetDaoImpl.java b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderValueSetDaoImpl.java
new file mode 100644
index 0000000..74e0cf7
--- /dev/null
+++ b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderValueSetDaoImpl.java
@@ -0,0 +1,34 @@
+package org.openinfobutton.responder.dao.impl;
+
+import java.math.BigDecimal;
+import java.util.List;
+import org.hibernate.criterion.Order;
+import org.hibernate.criterion.Restrictions;
+import org.openinfobutton.app.dao.DaoBase;
+import org.openinfobutton.app.model.ValueSet;
+import org.openinfobutton.app.model.ValueSetCode;
+import org.openinfobutton.responder.dao.ResponderValueSetDao;
+import org.springframework.stereotype.Repository;
+
+/**
+ *
+ * @author rick
+ */
+ at Repository
+public class ResponderValueSetDaoImpl extends DaoBase<ValueSet> implements ResponderValueSetDao {
+
+ @Override
+ public List<ValueSetCode> getValueSetCodes(BigDecimal valueSetId) {
+
+ List<ValueSetCode> results = getSessionFactory()
+ .getCurrentSession()
+ .createCriteria(ValueSetCode.class)
+ .add(Restrictions.eq("valueSetId", valueSetId))
+ .addOrder(Order.asc("listOrder"))
+ .addOrder(Order.asc("codeDisplayName"))
+ .list();
+
+ return results;
+ }
+
+}
diff --git a/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/service/ResponderService.java b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/service/ResponderService.java
new file mode 100644
index 0000000..7011481
--- /dev/null
+++ b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/service/ResponderService.java
@@ -0,0 +1,29 @@
+package org.openinfobutton.responder.service;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import org.openinfobutton.app.model.Asset;
+import org.openinfobutton.app.model.RequestParameter;
+import org.springframework.web.bind.MissingServletRequestParameterException;
+
+/**
+ *
+ * @author rick
+ */
+public interface ResponderService {
+
+ Set<String> getRxNormQueryExpansionTermTypes();
+
+ Map<String, String> getKnowledgeRequestParameterMap(Map httpRequestParameters);
+
+ Map<String, Map<String, String>> getIndexPropertyInterpretationMap();
+
+ Collection<Asset> findAssetsByInfobuttonRequest(Map<String, String> requestParameters);
+
+ Properties getApplicationProperties(String propertyGroup);
+
+ boolean requestContainsRequiredParameters(Map<String, String> requestParameters) throws MissingServletRequestParameterException;
+
+}
diff --git a/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/service/impl/ResponderServiceImpl.java b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/service/impl/ResponderServiceImpl.java
new file mode 100644
index 0000000..bab67c4
--- /dev/null
+++ b/Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/service/impl/ResponderServiceImpl.java
@@ -0,0 +1,222 @@
+package org.openinfobutton.responder.service.impl;
+
+import java.math.BigDecimal;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import org.openinfobutton.app.model.AppProperty;
+import org.openinfobutton.app.model.Asset;
+import org.openinfobutton.app.model.RequestParameter;
+import org.openinfobutton.app.model.ValueSetCode;
+import org.openinfobutton.responder.dao.ResponderAppPropertyDao;
+import org.openinfobutton.responder.dao.ResponderAssetDao;
+import org.openinfobutton.responder.dao.ResponderRequestParameterDao;
+import org.openinfobutton.responder.dao.ResponderValueSetDao;
+import org.openinfobutton.responder.service.ResponderService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.MissingServletRequestParameterException;
+
+/**
+ *
+ * @author rick
+ */
+ at Service
+public class ResponderServiceImpl implements ResponderService {
+
+// private static final Logger log = Logger.getLogger(ResponderServiceImpl.class);
+
+ @Autowired
+ private ResponderRequestParameterDao responderRequestParameterDao;
+
+ @Autowired
+ private ResponderAssetDao responderAssetDao;
+
+ @Autowired
+ private ResponderValueSetDao responderValueSetDao;
+
+ @Autowired
+ private ResponderAppPropertyDao responderAppPropertyDao;
+
+ private Map<String, Map<String, String>> requestParameterCodeMap;
+
+ private Properties appProperties;
+
+ private Set<String> rxNormQueryExpansionTermTypes;
+
+
+ @Override
+ @Transactional
+ public Set<String> getRxNormQueryExpansionTermTypes() { //TODO this could be moved to the query implementation
+
+ if ( rxNormQueryExpansionTermTypes == null ) {
+ return rxNormQueryExpansionTermTypes;
+ }
+
+ rxNormQueryExpansionTermTypes = new HashSet<String>();
+
+ Properties valueSetIds = getApplicationProperties("app.valueset.id");
+ String rxNormQueryExpansionValueSetId = (String)valueSetIds.get("RXNORM_QUERY_EXPANSION_TERM_TYPE_CODES");
+ List<ValueSetCode> valueSet = responderValueSetDao.getValueSetCodes( new BigDecimal( rxNormQueryExpansionValueSetId ) );
+
+ for ( ValueSetCode termType:valueSet ) {
+ rxNormQueryExpansionTermTypes.add( termType.getCode() );
+ }
+
+ return rxNormQueryExpansionTermTypes;
+
+ }
+
+ public Map<String, Map<String, String>> getIndexPropertyInterpretationMap(Collection<RequestParameter> requestParameters) {
+
+ if ( requestParameterCodeMap != null ) { // if already built, don't need to rebuild; static
+ return requestParameterCodeMap;
+ }
+
+ requestParameterCodeMap = new HashMap<String,Map<String,String>>();
+
+ String lastParameterRoot = null;
+ Map<String, String> parameterMap = new HashMap<String, String>();
+
+ for (RequestParameter requestParameter : requestParameters) {
+
+ if (requestParameter.getParameterName() == null || "".equals(requestParameter.getParameterName())
+ && requestParameter.getParameterRoot() == null || "".equals(requestParameter.getParameterRoot())
+ && requestParameter.getTypeCode() == null || "".equals(requestParameter.getTypeCode())) {
+
+ System.out.println("Supported request parameters must have a parameterName, parameterRoot, and typeCode. "
+ + "Invalid parameter id = " + requestParameter.getRequestParameterId() );
+ }
+
+ if ( lastParameterRoot != null && !lastParameterRoot.equals( requestParameter.getParameterRoot() ) ) {
+
+ requestParameterCodeMap.put(lastParameterRoot, parameterMap);
+ parameterMap = new HashMap<String, String>();
+
+ }
+
+ parameterMap.put( requestParameter.getTypeCode(), requestParameter.getParameterName() );
+ lastParameterRoot = requestParameter.getParameterRoot();
+
+ }
+
+ requestParameterCodeMap.put(lastParameterRoot, parameterMap);
+
+ return requestParameterCodeMap;
+ }
+
+ @Override
+ @Transactional
+ public Map<String, Map<String, String>> getIndexPropertyInterpretationMap() {
+
+ if ( requestParameterCodeMap != null ) { // if already built, don't need to rebuild; static
+ return requestParameterCodeMap;
+ }
+
+ Collection<RequestParameter> requestParameters = responderRequestParameterDao.getSupportedOpenInfobuttonRequestParametersOrdered();
+
+ return getIndexPropertyInterpretationMap(requestParameters);
+
+ }
+
+ @Override
+ public Map<String, String> getKnowledgeRequestParameterMap(Map httpRequestParameters) {
+
+ Map<String, String> requestParameters = new HashMap<String, String>();
+
+ for (Object parameterName : httpRequestParameters.keySet()) {
+
+ String parameterNameString = (String) parameterName;
+ String[] parameterValues = (String[]) httpRequestParameters.get(parameterNameString);
+
+ int i = 0;
+ for (String parameterValue : parameterValues) { // multiple parameters with the same name are not supported by the specification
+
+ if (i == 0) {
+ requestParameters.put(parameterNameString, parameterValue);
+ } else {
+ throw new IllegalArgumentException("Invalid request argument: there are mutiple values for " + parameterNameString
+ + ". Parameters that support multple values require an index number appended to the end of the parameter name."
+ + " Example: Two values for 'mainSearchCriteria.c.c' requires a second parameter 'mainsearchCriteria.c.c1'.");
+ }
+ i++;
+ }
+
+ }
+
+ return requestParameters;
+ }
+
+ @Override
+ @Transactional
+ public boolean requestContainsRequiredParameters(Map<String, String> requestParameters) throws MissingServletRequestParameterException {
+
+ StringBuffer errorMessage = new StringBuffer();
+
+ Collection<RequestParameter> requiredRequestParmeters = responderRequestParameterDao.getRequiredOpenInfobuttonRequestParameters();
+
+ int i = 0;
+ for (RequestParameter requiredRequestParmeter:requiredRequestParmeters) {
+ if ( ! requestParameters.containsKey( requiredRequestParmeter.getParameterName() ) ) {
+ if ( i > 1 ) {
+ errorMessage.append(", ");
+ }
+ errorMessage.append( requiredRequestParmeter.getParameterName() );
+ i++;
+ }
+ }
+
+ if ( errorMessage.length() > 0 ) {
+
+ String messagePrefix = null;
+ String messageSuffix = null;
+ if ( i > 1 ) {
+ messagePrefix = " are";
+ messageSuffix = "s.";
+ }
+ else {
+ messagePrefix = " is a";
+ messageSuffix = ".";
+ }
+
+ throw new MissingServletRequestParameterException(errorMessage.toString(), messagePrefix + " required request parameter" + messageSuffix);
+ }
+
+ return true;
+
+ }
+
+ @Override
+ @Transactional
+ public Properties getApplicationProperties(String propertyGroup ) {
+
+ if ( appProperties != null ) { // only retrieve from the db and configure once when empty, doesn't change
+ return appProperties;
+ }
+
+ appProperties = new Properties();
+
+ Collection<AppProperty> appPropertyCollection = responderAppPropertyDao.getAppPropertyGroup( propertyGroup );
+
+ for ( AppProperty appProperty: appPropertyCollection ) {
+ appProperties.put( appProperty.getPropertyName(), appProperty.getPropertyValue() );
+ }
+
+ return appProperties;
+
+ }
+
+ @Override
+ @Transactional
+ public Collection<Asset> findAssetsByInfobuttonRequest(Map<String, String> requestParameters) {
+
+ return responderAssetDao.findByInfobuttonRequest(requestParameters);
+
+ }
+
+}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e33d0d0b8fc8f20e87c39085c34d3523f45a8311
commit e33d0d0b8fc8f20e87c39085c34d3523f45a8311
Author: Joseph Snyder <joe.snyder at kitware.com>
AuthorDate: Tue Jun 3 18:30:46 2014 +0000
Commit: Joseph Snyder <joe.snyder at kitware.com>
CommitDate: Tue Jun 3 18:53:40 2014 +0000
CTest: Rename coverage implementation for "Python" to "Cobertura"
The coverage.py tool writes out an XML that conforms to the Cobertura
Coverage tool standard. Rename the cmParsePythonCoverage files to
instead be cmParseCoberturaCoverage.
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 8ecf83c..fe6cc1b 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -519,7 +519,7 @@ set(CTEST_SRCS cmCTest.cxx
CTest/cmParseCacheCoverage.cxx
CTest/cmParseGTMCoverage.cxx
CTest/cmParsePHPCoverage.cxx
- CTest/cmParsePythonCoverage.cxx
+ CTest/cmParseCoberturaCoverage.cxx
CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
CTest/cmCTestGenericHandler.cxx
CTest/cmCTestHandlerCommand.cxx
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index cb6e56e..da27c8c 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -11,7 +11,7 @@
============================================================================*/
#include "cmCTestCoverageHandler.h"
#include "cmParsePHPCoverage.h"
-#include "cmParsePythonCoverage.h"
+#include "cmParseCoberturaCoverage.h"
#include "cmParseGTMCoverage.h"
#include "cmParseCacheCoverage.h"
#include "cmCTest.h"
@@ -401,7 +401,7 @@ int cmCTestCoverageHandler::ProcessHandler()
{
return error;
}
- file_count += this->HandlePythonCoverage(&cont);
+ file_count += this->HandleCoberturaCoverage(&cont);
error = cont.Error;
if ( file_count < 0 )
{
@@ -779,10 +779,10 @@ int cmCTestCoverageHandler::HandlePHPCoverage(
}
//----------------------------------------------------------------------
-int cmCTestCoverageHandler::HandlePythonCoverage(
+int cmCTestCoverageHandler::HandleCoberturaCoverage(
cmCTestCoverageHandlerContainer* cont)
{
- cmParsePythonCoverage cov(*cont, this->CTest);
+ cmParseCoberturaCoverage cov(*cont, this->CTest);
// Assume the coverage.xml is in the source directory
std::string coverageXMLFile = this->CTest->GetBinaryDir() + "/coverage.xml";
@@ -790,14 +790,14 @@ int cmCTestCoverageHandler::HandlePythonCoverage(
if(cmSystemTools::FileExists(coverageXMLFile.c_str()))
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- "Parsing coverage.py XML file: " << coverageXMLFile
+ "Parsing Cobertura XML file: " << coverageXMLFile
<< std::endl);
cov.ReadCoverageXML(coverageXMLFile.c_str());
}
else
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- "Cannot find coverage.py XML file: " << coverageXMLFile
+ "Cannot find Cobertura XML file: " << coverageXMLFile
<< std::endl);
}
return static_cast<int>(cont->TotalCoverage.size());
diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h
index 0a0fe81..38a3353 100644
--- a/Source/CTest/cmCTestCoverageHandler.h
+++ b/Source/CTest/cmCTestCoverageHandler.h
@@ -76,7 +76,7 @@ private:
int HandlePHPCoverage(cmCTestCoverageHandlerContainer* cont);
//! Handle coverage for Python with coverage.py
- int HandlePythonCoverage(cmCTestCoverageHandlerContainer* cont);
+ int HandleCoberturaCoverage(cmCTestCoverageHandlerContainer* cont);
//! Handle coverage for mumps
int HandleMumpsCoverage(cmCTestCoverageHandlerContainer* cont);
diff --git a/Source/CTest/cmParsePythonCoverage.cxx b/Source/CTest/cmParseCoberturaCoverage.cxx
similarity index 90%
rename from Source/CTest/cmParsePythonCoverage.cxx
rename to Source/CTest/cmParseCoberturaCoverage.cxx
index 817b8dc..0f5daba 100644
--- a/Source/CTest/cmParsePythonCoverage.cxx
+++ b/Source/CTest/cmParseCoberturaCoverage.cxx
@@ -1,12 +1,12 @@
#include "cmStandardIncludes.h"
#include "cmSystemTools.h"
#include "cmXMLParser.h"
-#include "cmParsePythonCoverage.h"
+#include "cmParseCoberturaCoverage.h"
#include <cmsys/Directory.hxx>
#include <cmsys/FStream.hxx>
//----------------------------------------------------------------------------
-class cmParsePythonCoverage::XMLParser: public cmXMLParser
+class cmParseCoberturaCoverage::XMLParser: public cmXMLParser
{
public:
XMLParser(cmCTest* ctest, cmCTestCoverageHandlerContainer& cont)
@@ -104,16 +104,16 @@ private:
};
-cmParsePythonCoverage::cmParsePythonCoverage(
+cmParseCoberturaCoverage::cmParseCoberturaCoverage(
cmCTestCoverageHandlerContainer& cont,
cmCTest* ctest)
:Coverage(cont), CTest(ctest)
{
}
-bool cmParsePythonCoverage::ReadCoverageXML(const char* xmlFile)
+bool cmParseCoberturaCoverage::ReadCoverageXML(const char* xmlFile)
{
- cmParsePythonCoverage::XMLParser parser(this->CTest, this->Coverage);
+ cmParseCoberturaCoverage::XMLParser parser(this->CTest, this->Coverage);
parser.ParseFile(xmlFile);
return true;
}
diff --git a/Source/CTest/cmParsePythonCoverage.h b/Source/CTest/cmParseCoberturaCoverage.h
similarity index 89%
rename from Source/CTest/cmParsePythonCoverage.h
rename to Source/CTest/cmParseCoberturaCoverage.h
index 668c7f9..4204b10 100644
--- a/Source/CTest/cmParsePythonCoverage.h
+++ b/Source/CTest/cmParseCoberturaCoverage.h
@@ -10,8 +10,8 @@
See the License for more information.
============================================================================*/
-#ifndef cmParsePythonCoverage_h
-#define cmParsePythonCoverage_h
+#ifndef cmParseCoberturaCoverage_h
+#define cmParseCoberturaCoverage_h
#include "cmStandardIncludes.h"
#include "cmCTestCoverageHandler.h"
@@ -25,13 +25,13 @@
* Java-based Cobertura coverage application. This helper class parses
* that XML file to fill the coverage-handler container.
*/
-class cmParsePythonCoverage
+class cmParseCoberturaCoverage
{
public:
//! Create the coverage parser by passing in the coverage handler
//! container and the cmCTest object
- cmParsePythonCoverage(cmCTestCoverageHandlerContainer& cont,
+ cmParseCoberturaCoverage(cmCTestCoverageHandlerContainer& cont,
cmCTest* ctest);
//! Read the XML produced by running `coverage xml`
-----------------------------------------------------------------------
Summary of changes:
Help/variable/CTEST_COVERAGE_COMMAND.rst | 55 ++
Source/CMakeLists.txt | 2 +-
Source/CTest/cmCTestCoverageHandler.cxx | 12 +-
Source/CTest/cmCTestCoverageHandler.h | 2 +-
...onCoverage.cxx => cmParseCoberturaCoverage.cxx} | 77 +-
...PythonCoverage.h => cmParseCoberturaCoverage.h} | 11 +-
Tests/CMakeLists.txt | 18 +
.../DartConfiguration.tcl.in | 4 +-
Tests/CoberturaCoverage/coverage.xml.in | 967 ++++++++++++++++++++
.../OpenInfobuttonResponderController.java | 122 +++
.../responder/dao/ResponderAppPropertyDao.java | 11 +
.../responder/dao/ResponderAssetDao.java | 16 +
.../dao/ResponderRequestParameterDao.java | 24 +
.../responder/dao/ResponderValueSetDao.java | 12 +
.../dao/impl/ResponderAppPropertyDaoImpl.java | 26 +
.../responder/dao/impl/ResponderAssetDaoImpl.java | 287 ++++++
.../dao/impl/ResponderRequestParameterDaoImpl.java | 77 ++
.../dao/impl/ResponderValueSetDaoImpl.java | 34 +
.../responder/service/ResponderService.java | 29 +
.../service/impl/ResponderServiceImpl.java | 222 +++++
20 files changed, 1980 insertions(+), 28 deletions(-)
rename Source/CTest/{cmParsePythonCoverage.cxx => cmParseCoberturaCoverage.cxx} (57%)
rename Source/CTest/{cmParsePythonCoverage.h => cmParseCoberturaCoverage.h} (85%)
copy Tests/{MumpsCoverage => CoberturaCoverage}/DartConfiguration.tcl.in (63%)
create mode 100644 Tests/CoberturaCoverage/coverage.xml.in
create mode 100644 Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/controller/OpenInfobuttonResponderController.java
create mode 100644 Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderAppPropertyDao.java
create mode 100644 Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderAssetDao.java
create mode 100644 Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderRequestParameterDao.java
create mode 100644 Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/ResponderValueSetDao.java
create mode 100644 Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderAppPropertyDaoImpl.java
create mode 100644 Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderAssetDaoImpl.java
create mode 100644 Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderRequestParameterDaoImpl.java
create mode 100644 Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/dao/impl/ResponderValueSetDaoImpl.java
create mode 100644 Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/service/ResponderService.java
create mode 100644 Tests/CoberturaCoverage/src/main/java/org/openinfobutton/responder/service/impl/ResponderServiceImpl.java
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list