From f2909a748a300f94cf6067fc84416e408d3e6de8 Mon Sep 17 00:00:00 2001 From: RncLsn Date: Wed, 6 May 2015 18:11:08 +0100 Subject: Switch from JUnit to TestNG. Plus minor fixes. --- .../libraries/Maven__com_beust_jcommander_1_12.xml | 13 ++ ...m_fasterxml_jackson_core_jackson_core_2_2_1.xml | 13 ++ .../Maven__commons_codec_commons_codec_1_4.xml | 13 ++ .../Maven__commons_dbcp_commons_dbcp_1_3.xml | 13 ++ ...__commons_httpclient_commons_httpclient_3_1.xml | 13 ++ .idea/libraries/Maven__junit_junit_4_10.xml | 13 ++ .../Maven__net_sf_opencsv_opencsv_2_0.xml | 13 ++ ...n__net_sourceforge_owlapi_owlapi_api_3_4_10.xml | 13 ++ ...sourceforge_owlapi_owlapi_apibinding_3_4_10.xml | 13 ++ ...t_sourceforge_owlapi_owlapi_contract_3_4_10.xml | 13 ++ ...urceforge_owlapi_owlapi_distribution_3_4_10.xml | 13 ++ ...__net_sourceforge_owlapi_owlapi_impl_3_4_10.xml | 13 ++ ..._sourceforge_owlapi_owlapi_oboformat_3_4_10.xml | 13 ++ ...et_sourceforge_owlapi_owlapi_parsers_3_4_10.xml | 13 ++ ..._net_sourceforge_owlapi_owlapi_tools_3_4_10.xml | 13 ++ .idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml | 13 ++ .../Maven__org_hamcrest_hamcrest_core_1_1.xml | 13 ++ ...rg_openrdf_sesame_sesame_http_client_2_7_13.xml | 13 ++ ..._openrdf_sesame_sesame_http_protocol_2_7_13.xml | 13 ++ ...ven__org_openrdf_sesame_sesame_model_2_7_13.xml | 13 ++ ...ven__org_openrdf_sesame_sesame_query_2_7_13.xml | 13 ++ ...esame_sesame_queryalgebra_evaluation_2_7_13.xml | 13 ++ ...rdf_sesame_sesame_queryalgebra_model_2_7_13.xml | 13 ++ ...penrdf_sesame_sesame_queryparser_api_2_7_13.xml | 13 ++ ...nrdf_sesame_sesame_queryparser_serql_2_7_13.xml | 13 ++ ...rdf_sesame_sesame_queryparser_sparql_2_7_13.xml | 13 ++ ...nrdf_sesame_sesame_queryresultio_api_2_7_13.xml | 13 ++ ...f_sesame_sesame_queryresultio_binary_2_7_13.xml | 13 ++ ...same_sesame_queryresultio_sparqljson_2_7_13.xml | 13 ++ ...esame_sesame_queryresultio_sparqlxml_2_7_13.xml | 13 ++ ...rdf_sesame_sesame_queryresultio_text_2_7_13.xml | 13 ++ ...openrdf_sesame_sesame_repository_api_2_7_13.xml | 13 ++ ...esame_sesame_repository_contextaware_2_7_13.xml | 13 ++ ...rdf_sesame_sesame_repository_dataset_2_7_13.xml | 13 ++ ...enrdf_sesame_sesame_repository_event_2_7_13.xml | 13 ++ ...penrdf_sesame_sesame_repository_http_2_7_13.xml | 13 ++ ...rdf_sesame_sesame_repository_manager_2_7_13.xml | 13 ++ ...penrdf_sesame_sesame_repository_sail_2_7_13.xml | 13 ++ ...nrdf_sesame_sesame_repository_sparql_2_7_13.xml | 13 ++ ...n__org_openrdf_sesame_sesame_rio_api_2_7_13.xml | 13 ++ ...org_openrdf_sesame_sesame_rio_binary_2_7_13.xml | 13 ++ ..._openrdf_sesame_sesame_rio_datatypes_2_7_13.xml | 13 ++ ..._openrdf_sesame_sesame_rio_languages_2_7_13.xml | 13 ++ ...en__org_openrdf_sesame_sesame_rio_n3_2_7_13.xml | 13 ++ ...org_openrdf_sesame_sesame_rio_nquads_2_7_13.xml | 13 ++ ...g_openrdf_sesame_sesame_rio_ntriples_2_7_13.xml | 13 ++ ...rg_openrdf_sesame_sesame_rio_rdfjson_2_7_13.xml | 13 ++ ...org_openrdf_sesame_sesame_rio_rdfxml_2_7_13.xml | 13 ++ ...__org_openrdf_sesame_sesame_rio_trig_2_7_13.xml | 13 ++ ...__org_openrdf_sesame_sesame_rio_trix_2_7_13.xml | 13 ++ ...org_openrdf_sesame_sesame_rio_turtle_2_7_13.xml | 13 ++ ...n__org_openrdf_sesame_sesame_runtime_2_7_13.xml | 13 ++ ...__org_openrdf_sesame_sesame_sail_api_2_7_13.xml | 13 ++ ...penrdf_sesame_sesame_sail_federation_2_7_13.xml | 13 ++ ...penrdf_sesame_sesame_sail_inferencer_2_7_13.xml | 13 ++ ...rg_openrdf_sesame_sesame_sail_memory_2_7_13.xml | 13 ++ ...openrdf_sesame_sesame_sail_nativerdf_2_7_13.xml | 13 ++ ...org_openrdf_sesame_sesame_sail_rdbms_2_7_13.xml | 13 ++ ...aven__org_openrdf_sesame_sesame_util_2_7_13.xml | 13 ++ .../libraries/Maven__org_slf4j_slf4j_api_1_6_1.xml | 13 ++ .idea/libraries/Maven__org_testng_testng_6_7.xml | 13 ++ .idea/libraries/Maven__org_yaml_snakeyaml_1_6.xml | 13 ++ config/log4j.properties | 18 +++ config/test.properties | 1 + pom.xml | 11 ++ src/log4j.properties | 18 --- .../model/cqparser/ConjunctiveQueryWalker.java | 2 +- src/uk/ac/ox/cs/pagoda/util/Utility.java | 16 +- target/.gitignore | 2 - test/AllTests.xml | 12 ++ test/FullEvaluation.xml | 18 +++ test/uk/ac/ox/cs/pagoda/junit/AllTests.java | 48 ------ test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java | 165 ------------------- test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java | 109 ------------- test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java | 14 -- test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java | 173 -------------------- .../uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java | 86 ---------- test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java | 59 ------- test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java | 27 ---- test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java | 18 --- test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java | 24 --- test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java | 38 ----- test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java | 42 ----- test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java | 27 ---- test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java | 18 --- test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java | 48 ------ .../ac/ox/cs/pagoda/test_units/ClauseTester.java | 164 +++++++++++++++++++ .../ac/ox/cs/pagoda/test_units/CostEvaluation.java | 109 +++++++++++++ .../uk/ac/ox/cs/pagoda/test_units/JAIR_PAGOdA.java | 180 +++++++++++++++++++++ .../ox/cs/pagoda/test_units/JAIR_Scalability.java | 88 ++++++++++ .../ox/cs/pagoda/test_units/LightEvaluation.java | 62 +++++++ .../ac/ox/cs/pagoda/test_units/PagodaDBPedia.java | 30 ++++ test/uk/ac/ox/cs/pagoda/test_units/PagodaELU.java | 18 +++ test/uk/ac/ox/cs/pagoda/test_units/PagodaFLY.java | 24 +++ test/uk/ac/ox/cs/pagoda/test_units/PagodaLUBM.java | 68 ++++++++ test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java | 45 ++++++ .../ox/cs/pagoda/test_units/PagodaNPD_bench.java | 30 ++++ test/uk/ac/ox/cs/pagoda/test_units/PagodaRLU.java | 18 +++ test/uk/ac/ox/cs/pagoda/test_units/PagodaUOBM.java | 79 +++++++++ test/uk/ac/ox/cs/pagoda/tester/PagodaTester.java | 16 +- 100 files changed, 1805 insertions(+), 926 deletions(-) create mode 100644 .idea/libraries/Maven__com_beust_jcommander_1_12.xml create mode 100644 .idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_2_1.xml create mode 100644 .idea/libraries/Maven__commons_codec_commons_codec_1_4.xml create mode 100644 .idea/libraries/Maven__commons_dbcp_commons_dbcp_1_3.xml create mode 100644 .idea/libraries/Maven__commons_httpclient_commons_httpclient_3_1.xml create mode 100644 .idea/libraries/Maven__junit_junit_4_10.xml create mode 100644 .idea/libraries/Maven__net_sf_opencsv_opencsv_2_0.xml create mode 100644 .idea/libraries/Maven__net_sourceforge_owlapi_owlapi_api_3_4_10.xml create mode 100644 .idea/libraries/Maven__net_sourceforge_owlapi_owlapi_apibinding_3_4_10.xml create mode 100644 .idea/libraries/Maven__net_sourceforge_owlapi_owlapi_contract_3_4_10.xml create mode 100644 .idea/libraries/Maven__net_sourceforge_owlapi_owlapi_distribution_3_4_10.xml create mode 100644 .idea/libraries/Maven__net_sourceforge_owlapi_owlapi_impl_3_4_10.xml create mode 100644 .idea/libraries/Maven__net_sourceforge_owlapi_owlapi_oboformat_3_4_10.xml create mode 100644 .idea/libraries/Maven__net_sourceforge_owlapi_owlapi_parsers_3_4_10.xml create mode 100644 .idea/libraries/Maven__net_sourceforge_owlapi_owlapi_tools_3_4_10.xml create mode 100644 .idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml create mode 100644 .idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_http_client_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_http_protocol_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_model_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_query_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_queryalgebra_evaluation_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_queryalgebra_model_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_api_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_serql_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_sparql_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_api_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_binary_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_sparqljson_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_sparqlxml_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_text_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_repository_api_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_repository_contextaware_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_repository_dataset_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_repository_event_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_repository_http_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_repository_manager_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_repository_sail_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_repository_sparql_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_api_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_binary_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_datatypes_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_languages_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_n3_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_nquads_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_ntriples_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_rdfjson_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_rdfxml_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_trig_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_trix_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_rio_turtle_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_runtime_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_sail_api_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_sail_federation_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_sail_inferencer_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_sail_memory_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_sail_nativerdf_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_sail_rdbms_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_openrdf_sesame_sesame_util_2_7_13.xml create mode 100644 .idea/libraries/Maven__org_slf4j_slf4j_api_1_6_1.xml create mode 100644 .idea/libraries/Maven__org_testng_testng_6_7.xml create mode 100644 .idea/libraries/Maven__org_yaml_snakeyaml_1_6.xml create mode 100644 config/log4j.properties create mode 100644 config/test.properties delete mode 100644 src/log4j.properties delete mode 100644 target/.gitignore create mode 100644 test/AllTests.xml create mode 100644 test/FullEvaluation.xml delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/AllTests.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java delete mode 100644 test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/ClauseTester.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/JAIR_PAGOdA.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/JAIR_Scalability.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/LightEvaluation.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/PagodaDBPedia.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/PagodaELU.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/PagodaFLY.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/PagodaLUBM.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD_bench.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/PagodaRLU.java create mode 100644 test/uk/ac/ox/cs/pagoda/test_units/PagodaUOBM.java diff --git a/.idea/libraries/Maven__com_beust_jcommander_1_12.xml b/.idea/libraries/Maven__com_beust_jcommander_1_12.xml new file mode 100644 index 0000000..2b9ea17 --- /dev/null +++ b/.idea/libraries/Maven__com_beust_jcommander_1_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_2_1.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_2_1.xml new file mode 100644 index 0000000..c8360e5 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_codec_commons_codec_1_4.xml b/.idea/libraries/Maven__commons_codec_commons_codec_1_4.xml new file mode 100644 index 0000000..2b149c4 --- /dev/null +++ b/.idea/libraries/Maven__commons_codec_commons_codec_1_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_dbcp_commons_dbcp_1_3.xml b/.idea/libraries/Maven__commons_dbcp_commons_dbcp_1_3.xml new file mode 100644 index 0000000..ebd31e4 --- /dev/null +++ b/.idea/libraries/Maven__commons_dbcp_commons_dbcp_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_httpclient_commons_httpclient_3_1.xml b/.idea/libraries/Maven__commons_httpclient_commons_httpclient_3_1.xml new file mode 100644 index 0000000..66e6537 --- /dev/null +++ b/.idea/libraries/Maven__commons_httpclient_commons_httpclient_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__junit_junit_4_10.xml b/.idea/libraries/Maven__junit_junit_4_10.xml new file mode 100644 index 0000000..ed8bf5f --- /dev/null +++ b/.idea/libraries/Maven__junit_junit_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sf_opencsv_opencsv_2_0.xml b/.idea/libraries/Maven__net_sf_opencsv_opencsv_2_0.xml new file mode 100644 index 0000000..76b343e --- /dev/null +++ b/.idea/libraries/Maven__net_sf_opencsv_opencsv_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_api_3_4_10.xml b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_api_3_4_10.xml new file mode 100644 index 0000000..6ea84f0 --- /dev/null +++ b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_api_3_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_apibinding_3_4_10.xml b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_apibinding_3_4_10.xml new file mode 100644 index 0000000..4a74a31 --- /dev/null +++ b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_apibinding_3_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_contract_3_4_10.xml b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_contract_3_4_10.xml new file mode 100644 index 0000000..ff992a4 --- /dev/null +++ b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_contract_3_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_distribution_3_4_10.xml b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_distribution_3_4_10.xml new file mode 100644 index 0000000..dbe2cb6 --- /dev/null +++ b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_distribution_3_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_impl_3_4_10.xml b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_impl_3_4_10.xml new file mode 100644 index 0000000..38600b6 --- /dev/null +++ b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_impl_3_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_oboformat_3_4_10.xml b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_oboformat_3_4_10.xml new file mode 100644 index 0000000..b223003 --- /dev/null +++ b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_oboformat_3_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_parsers_3_4_10.xml b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_parsers_3_4_10.xml new file mode 100644 index 0000000..1576413 --- /dev/null +++ b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_parsers_3_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_tools_3_4_10.xml b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_tools_3_4_10.xml new file mode 100644 index 0000000..bf8a4d0 --- /dev/null +++ b/.idea/libraries/Maven__net_sourceforge_owlapi_owlapi_tools_3_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml b/.idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml new file mode 100644 index 0000000..d6f17aa --- /dev/null +++ b/.idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml new file mode 100644 index 0000000..acdf443 --- /dev/null +++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_http_client_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_http_client_2_7_13.xml new file mode 100644 index 0000000..dd22d4a --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_http_client_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_http_protocol_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_http_protocol_2_7_13.xml new file mode 100644 index 0000000..7889ad6 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_http_protocol_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_model_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_model_2_7_13.xml new file mode 100644 index 0000000..45725f9 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_model_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_query_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_query_2_7_13.xml new file mode 100644 index 0000000..889e8b1 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_query_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryalgebra_evaluation_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryalgebra_evaluation_2_7_13.xml new file mode 100644 index 0000000..eb57a1f --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryalgebra_evaluation_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryalgebra_model_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryalgebra_model_2_7_13.xml new file mode 100644 index 0000000..86a7dd0 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryalgebra_model_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_api_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_api_2_7_13.xml new file mode 100644 index 0000000..5ddfb00 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_api_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_serql_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_serql_2_7_13.xml new file mode 100644 index 0000000..aa4ac65 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_serql_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_sparql_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_sparql_2_7_13.xml new file mode 100644 index 0000000..14cdd58 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryparser_sparql_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_api_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_api_2_7_13.xml new file mode 100644 index 0000000..b1b95c7 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_api_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_binary_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_binary_2_7_13.xml new file mode 100644 index 0000000..cba13a3 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_binary_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_sparqljson_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_sparqljson_2_7_13.xml new file mode 100644 index 0000000..99e46ae --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_sparqljson_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_sparqlxml_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_sparqlxml_2_7_13.xml new file mode 100644 index 0000000..1424e8f --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_sparqlxml_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_text_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_text_2_7_13.xml new file mode 100644 index 0000000..a60664a --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_queryresultio_text_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_api_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_api_2_7_13.xml new file mode 100644 index 0000000..3898d28 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_api_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_contextaware_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_contextaware_2_7_13.xml new file mode 100644 index 0000000..ff88a73 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_contextaware_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_dataset_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_dataset_2_7_13.xml new file mode 100644 index 0000000..e6a6616 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_dataset_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_event_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_event_2_7_13.xml new file mode 100644 index 0000000..15a5630 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_event_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_http_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_http_2_7_13.xml new file mode 100644 index 0000000..38165f2 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_http_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_manager_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_manager_2_7_13.xml new file mode 100644 index 0000000..cb9ecc6 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_manager_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_sail_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_sail_2_7_13.xml new file mode 100644 index 0000000..0bdac86 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_sail_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_sparql_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_sparql_2_7_13.xml new file mode 100644 index 0000000..bf6a5e1 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_repository_sparql_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_api_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_api_2_7_13.xml new file mode 100644 index 0000000..2db30bf --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_api_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_binary_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_binary_2_7_13.xml new file mode 100644 index 0000000..03c46cf --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_binary_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_datatypes_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_datatypes_2_7_13.xml new file mode 100644 index 0000000..c5c5088 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_datatypes_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_languages_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_languages_2_7_13.xml new file mode 100644 index 0000000..825799e --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_languages_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_n3_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_n3_2_7_13.xml new file mode 100644 index 0000000..287d1c8 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_n3_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_nquads_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_nquads_2_7_13.xml new file mode 100644 index 0000000..a6de600 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_nquads_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_ntriples_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_ntriples_2_7_13.xml new file mode 100644 index 0000000..4a2ef50 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_ntriples_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_rdfjson_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_rdfjson_2_7_13.xml new file mode 100644 index 0000000..8a6d5a4 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_rdfjson_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_rdfxml_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_rdfxml_2_7_13.xml new file mode 100644 index 0000000..53bdb15 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_rdfxml_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_trig_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_trig_2_7_13.xml new file mode 100644 index 0000000..736a55d --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_trig_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_trix_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_trix_2_7_13.xml new file mode 100644 index 0000000..8045595 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_trix_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_turtle_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_turtle_2_7_13.xml new file mode 100644 index 0000000..857a710 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_rio_turtle_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_runtime_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_runtime_2_7_13.xml new file mode 100644 index 0000000..fbbc6ab --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_runtime_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_api_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_api_2_7_13.xml new file mode 100644 index 0000000..e8ba5bc --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_api_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_federation_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_federation_2_7_13.xml new file mode 100644 index 0000000..9483bf5 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_federation_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_inferencer_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_inferencer_2_7_13.xml new file mode 100644 index 0000000..4d09415 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_inferencer_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_memory_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_memory_2_7_13.xml new file mode 100644 index 0000000..1bbe45c --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_memory_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_nativerdf_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_nativerdf_2_7_13.xml new file mode 100644 index 0000000..da24cb2 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_nativerdf_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_rdbms_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_rdbms_2_7_13.xml new file mode 100644 index 0000000..b378c3f --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_sail_rdbms_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openrdf_sesame_sesame_util_2_7_13.xml b/.idea/libraries/Maven__org_openrdf_sesame_sesame_util_2_7_13.xml new file mode 100644 index 0000000..5c7b506 --- /dev/null +++ b/.idea/libraries/Maven__org_openrdf_sesame_sesame_util_2_7_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_6_1.xml b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_6_1.xml new file mode 100644 index 0000000..38036e9 --- /dev/null +++ b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_6_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_testng_testng_6_7.xml b/.idea/libraries/Maven__org_testng_testng_6_7.xml new file mode 100644 index 0000000..264ea06 --- /dev/null +++ b/.idea/libraries/Maven__org_testng_testng_6_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_yaml_snakeyaml_1_6.xml b/.idea/libraries/Maven__org_yaml_snakeyaml_1_6.xml new file mode 100644 index 0000000..0f8bd19 --- /dev/null +++ b/.idea/libraries/Maven__org_yaml_snakeyaml_1_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/config/log4j.properties b/config/log4j.properties new file mode 100644 index 0000000..25da4d4 --- /dev/null +++ b/config/log4j.properties @@ -0,0 +1,18 @@ +#log4j.rootLogger=INFO, CONSOLE +log4j.rootLogger=DEBUG, CONSOLE, FILE + +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c{1}- %m%n +log4j.appender.CONSOLE.Target=System.out +log4j.appender.CONSOLE.Threshold=INFO + +#log = ./output +log = . +log4j.appender.FILE=org.apache.log4j.RollingFileAppender +log4j.appender.FILE.File=${log}/log4j.log +log4j.appender.FILE.MaxFileSize=10MB +log4j.appender.FILE.MaxBackupIndex=3 +log4j.appender.FILE.layout=org.apache.log4j.PatternLayout +log4j.appender.FILE.layout.conversionPattern=%m%n +log4j.appender.FILE.append=false diff --git a/config/test.properties b/config/test.properties new file mode 100644 index 0000000..c4a25d0 --- /dev/null +++ b/config/test.properties @@ -0,0 +1 @@ +ontoDir=/home/alessandro/Big_files/Ontologies/ \ No newline at end of file diff --git a/pom.xml b/pom.xml index fad1545..096a14d 100644 --- a/pom.xml +++ b/pom.xml @@ -82,6 +82,12 @@ sesame-runtime 2.7.13 + + org.openrdf.sesame + sesame-rio-rdfxml + 2.7.13 + compile + org.apache.jena jena-arq @@ -97,5 +103,10 @@ jgrapht-jdk1.5 0.7.3 + + org.testng + testng + 6.7 + diff --git a/src/log4j.properties b/src/log4j.properties deleted file mode 100644 index 25da4d4..0000000 --- a/src/log4j.properties +++ /dev/null @@ -1,18 +0,0 @@ -#log4j.rootLogger=INFO, CONSOLE -log4j.rootLogger=DEBUG, CONSOLE, FILE - -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c{1}- %m%n -log4j.appender.CONSOLE.Target=System.out -log4j.appender.CONSOLE.Threshold=INFO - -#log = ./output -log = . -log4j.appender.FILE=org.apache.log4j.RollingFileAppender -log4j.appender.FILE.File=${log}/log4j.log -log4j.appender.FILE.MaxFileSize=10MB -log4j.appender.FILE.MaxBackupIndex=3 -log4j.appender.FILE.layout=org.apache.log4j.PatternLayout -log4j.appender.FILE.layout.conversionPattern=%m%n -log4j.appender.FILE.append=false diff --git a/src/org/semanticweb/karma2/model/cqparser/ConjunctiveQueryWalker.java b/src/org/semanticweb/karma2/model/cqparser/ConjunctiveQueryWalker.java index f95ac12..f10b761 100644 --- a/src/org/semanticweb/karma2/model/cqparser/ConjunctiveQueryWalker.java +++ b/src/org/semanticweb/karma2/model/cqparser/ConjunctiveQueryWalker.java @@ -67,7 +67,7 @@ public class ConjunctiveQueryWalker { assert (prefixList.getType() == ConjunctiveQueryLexer.PREFIX_LIST); Prefixes prefixes = walkPrefixList(prefixList); CommonTree rulebody = iterator.next(); - assert (prefixList.getType() == ConjunctiveQueryLexer.RULE); + assert (rulebody.getType() == ConjunctiveQueryLexer.RULE); return walkRuleNode(rulebody, prefixes); } diff --git a/src/uk/ac/ox/cs/pagoda/util/Utility.java b/src/uk/ac/ox/cs/pagoda/util/Utility.java index cb05de4..7138ca9 100644 --- a/src/uk/ac/ox/cs/pagoda/util/Utility.java +++ b/src/uk/ac/ox/cs/pagoda/util/Utility.java @@ -10,6 +10,8 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintStream; +import java.nio.file.Files; +import java.nio.file.Paths; import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -24,9 +26,11 @@ import java.util.Stack; import org.apache.log4j.Logger; import org.semanticweb.HermiT.model.Atom; +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; + public class Utility { - private static final Logger LOGS = null; // Logger.getLogger(""); + private static final Logger LOGS = Logger.getLogger("PAGOdA"); public static final String JAVA_FILE_SEPARATOR = "/"; public static final String FILE_SEPARATOR = System.getProperty("file.separator"); @@ -255,4 +259,14 @@ public class Utility { return iri.replace(FILE_SEPARATOR, JAVA_FILE_SEPARATOR).replace(" ", "%20"); } + public static String combinePaths(String path1, String path2) { + File file1 = new File(path1); + File file2 = new File(file1, path2); + return file2.getPath(); + } + + public static void copyFile(String src, String dst) throws IOException { + Files.copy(Paths.get(src), Paths.get(dst), REPLACE_EXISTING); + } + } diff --git a/target/.gitignore b/target/.gitignore deleted file mode 100644 index 4569837..0000000 --- a/target/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/classes/ -/test-classes/ diff --git a/test/AllTests.xml b/test/AllTests.xml new file mode 100644 index 0000000..8ce5fcf --- /dev/null +++ b/test/AllTests.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/test/FullEvaluation.xml b/test/FullEvaluation.xml new file mode 100644 index 0000000..f0f047d --- /dev/null +++ b/test/FullEvaluation.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/uk/ac/ox/cs/pagoda/junit/AllTests.java b/test/uk/ac/ox/cs/pagoda/junit/AllTests.java deleted file mode 100644 index fb38787..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/AllTests.java +++ /dev/null @@ -1,48 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import java.io.BufferedWriter; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.OutputStreamWriter; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -@RunWith(Suite.class) -@SuiteClasses({ PagodaUOBM.class - }) -public class AllTests { - - public static void copy(String source, String dest) { - InputStream is = null; - OutputStream os = null; - try { - is = new FileInputStream(source); - os = new FileOutputStream(dest); - byte[] buffer = new byte[1024]; - int length; - while ((length = is.read(buffer)) > 0) { - os.write(buffer, 0, length); - } - is.close(); - os.close(); - - BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(source))); - writer.write(""); - writer.close(); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - -// File src = new File(source); -// src.delete(); - } - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java b/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java deleted file mode 100644 index d23f186..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java +++ /dev/null @@ -1,165 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import static org.junit.Assert.*; - -import org.junit.Test; -import org.semanticweb.HermiT.model.Atom; -import org.semanticweb.HermiT.model.AtomicConcept; -import org.semanticweb.HermiT.model.AtomicRole; -import org.semanticweb.HermiT.model.DLClause; -import org.semanticweb.HermiT.model.Equality; -import org.semanticweb.HermiT.model.Variable; -import org.semanticweb.owlapi.apibinding.OWLManager; -import org.semanticweb.owlapi.model.OWLOntology; -import org.semanticweb.owlapi.model.OWLOntologyManager; - -import uk.ac.ox.cs.pagoda.approx.Clause; -import uk.ac.ox.cs.pagoda.approx.Clausifier; - -public class ClauseTester { - - @Test - public void test_simple() { - Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); - AtomicConcept A = AtomicConcept.create("A"); - AtomicRole r = AtomicRole.create("r"); - Atom[] bodyAtoms = new Atom[] { - Atom.create(A, x), - Atom.create(r, x, y1), - Atom.create(r, x, y2) - }; - - Atom[] headAtoms = new Atom[] { - Atom.create(Equality.INSTANCE, y1, y2) - }; - - OWLOntologyManager m = OWLManager.createOWLOntologyManager(); - OWLOntology emptyOntology = null; - try { - emptyOntology = m.createOntology(); - } catch (Exception e) { - e.printStackTrace(); - fail("failed to create a new ontology"); - } - Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); - System.out.println(c.toString()); - } - - @Test - public void test_more() { - Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"), y3 = Variable.create("y3"); - AtomicConcept A = AtomicConcept.create("A"); - AtomicRole r = AtomicRole.create("r"); - Atom[] bodyAtoms = new Atom[] { - Atom.create(A, x), - Atom.create(r, x, y1), - Atom.create(r, x, y2), - Atom.create(r, x, y3), - }; - - Atom[] headAtoms = new Atom[] { - Atom.create(Equality.INSTANCE, y1, y2), - Atom.create(Equality.INSTANCE, y1, y3), - Atom.create(Equality.INSTANCE, y2, y3) - }; - - OWLOntologyManager m = OWLManager.createOWLOntologyManager(); - OWLOntology emptyOntology = null; - try { - emptyOntology = m.createOntology(); - } catch (Exception e) { - e.printStackTrace(); - fail("failed to create a new ontology"); - } - Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); - System.out.println(c.toString()); - } - - @Test - public void test_inverse() { - Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); - AtomicConcept A = AtomicConcept.create("A"); - AtomicRole r = AtomicRole.create("r"); - Atom[] bodyAtoms = new Atom[] { - Atom.create(A, x), - Atom.create(r, y1, x), - Atom.create(r, y2, x) - }; - - Atom[] headAtoms = new Atom[] { - Atom.create(Equality.INSTANCE, y1, y2) - }; - - OWLOntologyManager m = OWLManager.createOWLOntologyManager(); - OWLOntology emptyOntology = null; - try { - emptyOntology = m.createOntology(); - } catch (Exception e) { - e.printStackTrace(); - fail("failed to create a new ontology"); - } - Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); - System.out.println(c.toString()); - } - - @Test - public void test_fillter() { - Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); - AtomicConcept A = AtomicConcept.create("A"); - AtomicConcept B = AtomicConcept.create("B"); - AtomicRole r = AtomicRole.create("r"); - Atom[] bodyAtoms = new Atom[] { - Atom.create(A, x), - Atom.create(r, y1, x), - Atom.create(r, y2, x), - Atom.create(B, y1), - Atom.create(B, y2) - }; - - Atom[] headAtoms = new Atom[] { - Atom.create(Equality.INSTANCE, y1, y2) - }; - - OWLOntologyManager m = OWLManager.createOWLOntologyManager(); - OWLOntology emptyOntology = null; - try { - emptyOntology = m.createOntology(); - } catch (Exception e) { - e.printStackTrace(); - fail("failed to create a new ontology"); - } - Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); - System.out.println(c.toString()); - } - - @Test - public void test_negFillter() { - Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); - AtomicConcept A = AtomicConcept.create("A"); - AtomicConcept B = AtomicConcept.create("B"); - AtomicRole r = AtomicRole.create("r"); - Atom[] bodyAtoms = new Atom[] { - Atom.create(A, x), - Atom.create(r, y1, x), - Atom.create(r, y2, x) - }; - - Atom[] headAtoms = new Atom[] { - Atom.create(Equality.INSTANCE, y1, y2), - Atom.create(B, y1), - Atom.create(B, y2) - }; - - OWLOntologyManager m = OWLManager.createOWLOntologyManager(); - OWLOntology emptyOntology = null; - try { - emptyOntology = m.createOntology(); - } catch (Exception e) { - e.printStackTrace(); - fail("failed to create a new ontology"); - } - Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); - System.out.println(c.toString()); - } - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java b/test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java deleted file mode 100644 index 87b01ed..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java +++ /dev/null @@ -1,109 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import org.junit.Test; -import org.semanticweb.owlapi.model.OWLOntology; - -import uk.ac.ox.cs.pagoda.owl.OWLHelper; -import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner; -import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner.Type; -import uk.ac.ox.cs.pagoda.tester.PagodaTester; -import uk.ac.ox.cs.pagoda.util.Timer; -import uk.ac.ox.cs.pagoda.util.Utility; - -public class CostEvaluation { - - @Test - public void lubm100() { - int number = 1; - PagodaTester.main( - PagodaTester.onto_dir + "lubm/univ-bench.owl", - PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", - PagodaTester.onto_dir + "lubm/queries/test_all_pagoda.sparql" - ); -// AllTests.copy("output/log4j.log", "results-backup/jair/lubm" + number + ".out"); - } - - public void lubm1000() { - int number = 1000; - String[] args = new String[] { - PagodaTester.onto_dir + "lubm/univ-bench.owl", - PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", - PagodaTester.onto_dir + "lubm/queries/test_all_pagoda.sparql" - }; - OWLOntology ontology = OWLHelper.loadOntology(args[0]); - QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true); - Timer t = new Timer(); - reasoner.loadOntology(ontology); - reasoner.importData(args[1]); - if (!reasoner.preprocess()) - return ; - Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds."); - - reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2])); -// AllTests.copy("output/log4j.log", "results-backup/jair/lubm" + number + ".out"); - } - - @Test - public void uobm5() { - int number = 1; - String[] args = new String[] { - PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", - PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", - PagodaTester.onto_dir + "uobm/queries/standard_all_pagoda.sparql" - }; - PagodaTester.main(args); -// AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); - } - - public void uobm100() { - int number = 200; - String[] args = new String[] { - PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", - PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", - PagodaTester.onto_dir + "uobm/queries/standard_group3_all.sparql" - }; - PagodaTester.main(args); -// AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); - } - - public void uobm500() { - int number = 500; - String[] args = new String[] { - PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", - PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", - PagodaTester.onto_dir + "uobm/queries/standard_all_pagoda.sparql" - }; - - OWLOntology ontology = OWLHelper.loadOntology(args[0]); - QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true); - Timer t = new Timer(); - reasoner.loadOntology(ontology); - reasoner.importData(args[1]); - if (!reasoner.preprocess()) - return ; - Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds."); - - reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2])); -// AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); - } - - - public static void main(String... args) { - args = new String[] { - PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", - PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", - PagodaTester.onto_dir + "dbpedia/queries/atomic_ground.sparql" - }; - - OWLOntology ontology = OWLHelper.loadOntology(args[0]); - QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true); - Timer t = new Timer(); - reasoner.loadOntology(ontology); - reasoner.importData(args[1]); - if (!reasoner.preprocess()) - return ; - Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds."); - - reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2])); - } -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java b/test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java deleted file mode 100644 index 3406ed2..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java +++ /dev/null @@ -1,14 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -@RunWith(Suite.class) -@SuiteClasses({ LightEvaluation.class, - CostEvaluation.class - }) - -public class FullEvaluation { - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java b/test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java deleted file mode 100644 index 2a148cc..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java +++ /dev/null @@ -1,173 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import org.junit.Test; - -import uk.ac.ox.cs.pagoda.tester.PagodaTester; - -public class JAIR_PAGOdA { - - public void lubm1() { - String[] args = new String[] { - PagodaTester.onto_dir + "lubm/univ-bench.owl", - PagodaTester.onto_dir + "lubm/data/lubm1.ttl", - PagodaTester.onto_dir + "lubm/queries/test.sparql" - }; - PagodaTester.main(args); - AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda"); - } - - - public void lubm1_conj() { - String[] args = new String[] { - PagodaTester.onto_dir + "lubm/univ-bench.owl", - PagodaTester.onto_dir + "lubm/data/lubm1.ttl", - PagodaTester.onto_dir + "lubm/queries/test_pellet.sparql" - }; - PagodaTester.main(args); - AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda_conj"); - } - - - public void lubm1_rolledUp() { - String[] args = new String[] { - "/home/yzhou/backup/20141212/univ-bench-queries.owl", - PagodaTester.onto_dir + "lubm/data/lubm1.ttl", - PagodaTester.onto_dir + "lubm/queries/atomic_lubm.sparql" - }; - PagodaTester.main(args); - AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda_rolledUp"); - } - - - public void uobm1() { - String[] args = new String[] { - PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", - PagodaTester.onto_dir + "uobm/data/uobm1.ttl", - PagodaTester.onto_dir + "uobm/queries/standard.sparql" - }; - PagodaTester.main(args); - AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda"); - } - - - public void uobm1_conj() { - String[] args = new String[] { - PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", - PagodaTester.onto_dir + "uobm/data/uobm1.ttl", - PagodaTester.onto_dir + "uobm/queries/standard_pellet.sparql" - }; - PagodaTester.main(args); - AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda_conj"); - } - - - public void uobm1_rolledUp() { - String[] args = new String[] { - "/home/yzhou/backup/20141212/univ-bench-dl-queries.owl", - PagodaTester.onto_dir + "uobm/data/uobm1.ttl", - PagodaTester.onto_dir + "uobm/queries/atomic_uobm.sparql" - }; - PagodaTester.main(args); -// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda_rolledUp"); - } - - - public void fly() { - String[] args = new String[] { - PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", - null, - PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" - }; - PagodaTester.main(args); -// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda"); - } - - @Test - public void fly_conj() { - String[] args = new String[] { - PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", - null, - PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" - }; - PagodaTester.main(args); - AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda_conj"); - } - - - public void fly_rolledUp() { - PagodaTester.main(new String[] { -// PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", - PagodaTester.onto_dir + "fly/fly-all-in-one_rolledUp.owl", - null, - PagodaTester.onto_dir + "fly/queries/fly_atomic.sparql" - }); -// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda_rolledUp"); - } - - public void dbpedia() { - PagodaTester.main( - PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", - PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", - PagodaTester.onto_dir + "dbpedia/queries/atomic_ground.sparql" - , "dbpedia.ans" - ); - -// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/dbpedia/pagoda"); - } - - public void npd() { - PagodaTester.main( - PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", - PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", - PagodaTester.onto_dir + "npd/queries/atomic_ground.sparql" - , "npd.ans" - ); - -// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/npd/pagoda"); - } - - public void reactome() { - PagodaTester.main( - PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", - PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/reactome_sample_10.ttl", -// null, -// PagodaTester.onto_dir + "bio2rdf/reactome/queries/atomic_ground.sparql" - PagodaTester.onto_dir + "bio2rdf/reactome/queries/example.sparql" - , "pagoda_reactome.ans" - ); - AllTests.copy("log4j.log", "output/jair/pagoda_reactome.example"); - -// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_10p"); - } - - public void chembl() { - PagodaTester.main( - PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", - PagodaTester.onto_dir + "bio2rdf/chembl/graph sampling/sample_1.nt", -// PagodaTester.onto_dir + "bio2rdf/chembl/queries/atomic_ground.sparql" - PagodaTester.onto_dir + "bio2rdf/chembl/queries/example.sparql" - , "pagoda_chembl.ans" - ); - AllTests.copy("log4j.log", "output/jair/pagoda_chembl.example"); -// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_1p"); - } - - public void uniprot() { - PagodaTester.main( - PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", - PagodaTester.onto_dir + "bio2rdf/uniprot/graph sampling/sample_1.nt", -// null, -// PagodaTester.onto_dir + "bio2rdf/uniprot/queries/atomic_ground.sparql" - PagodaTester.onto_dir + "bio2rdf/uniprot/queries/example.sparql" - , "pagoda_uniprot.ans" - ); - AllTests.copy("log4j.log", "output/jair/pagoda_uniprot.example"); -// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_1p"); - } - - - public static void main(String... args) { - new JAIR_PAGOdA().fly(); - } - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java b/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java deleted file mode 100644 index 5e2b1d7..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java +++ /dev/null @@ -1,86 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import org.junit.Test; - -import uk.ac.ox.cs.pagoda.tester.PagodaTester; -import uk.ac.ox.cs.pagoda.util.Properties; - -public class JAIR_Scalability { - - private static final String date = "_0123"; - - @Test - public void reactome() { - testReactome(10, false); - } - - @Test - public void chembl() { - testChEMBL(1, false); - } - - @Test - public void uniprot() { - testUniProt(1, false); - } - - public void testReactome(int percentage, boolean save) { - String[] args = new String[] { - PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", - PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/simplifed_sample_" + percentage + ".ttl", - PagodaTester.onto_dir + "bio2rdf/reactome/queries/test.sparql" - , "reactome.ans" - }; - if (percentage == 10) - args[1] = args[1].replace("simplifed", "reactome"); - - PagodaTester.main(args); - if (save) - AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_" + percentage + "p" + date); - } - - public void testChEMBL(int percentage, boolean save) { - String[] args = new String[] { - PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", - PagodaTester.onto_dir + "bio2rdf/chembl/sample_" + percentage + ".nt", -// PagodaTester.onto_dir + "bio2rdf/chembl/queries/atomic_ground.sparql" - PagodaTester.onto_dir + "bio2rdf/chembl/queries/test.sparql" - , "chembl.ans" - }; - if (percentage == 1 || percentage == 10 || percentage == 50) - args[1] = args[1].replace("chembl", "chembl/graph sampling"); - else - if (percentage == 100) - args[1] = "/home/yzhou/RDFData/ChEMBL/facts/ChEMBL.ttl"; - - PagodaTester.main(args); - if (save) - AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_" + percentage + "p" + date); - } - - public void testUniProt(int percentage, boolean save) { - String[] args = new String[] { - PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", - PagodaTester.onto_dir + "bio2rdf/uniprot/sample_" + percentage + ".nt", -// PagodaTester.onto_dir + "bio2rdf/uniprot/queries/atomic_ground.sparql" - PagodaTester.onto_dir + "bio2rdf/uniprot/queries/test.sparql" - , "uniprot.ans" - }; - - if (percentage == 1 || percentage == 10 || percentage == 50) - args[1] = args[1].replace("uniprot", "uniprot/graph sampling"); - else - if (percentage == 100) - args[1] = "/home/yzhou/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/data/uniprot_cleaned.nt"; - - PagodaTester.main(args); - if (save) - AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_" + percentage + "p" + date); - } - - public static void main(String... args) { - Properties.ShellModeDefault = true; - new JAIR_Scalability().testUniProt(50, false); - } - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java b/test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java deleted file mode 100644 index 1ddca15..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java +++ /dev/null @@ -1,59 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import org.junit.Test; -import uk.ac.ox.cs.pagoda.tester.PagodaTester; - -public class LightEvaluation { - - @Test - public void uobm1() { - int number = 1; - PagodaTester.main( - PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", - PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", - PagodaTester.onto_dir + "uobm/queries/standard.sparql" - ); - AllTests.copy("log4j.log", "output/jair/uobm1.out"); - } - - @Test - public void lubm100() { - int number = 100; - PagodaTester.main( - PagodaTester.onto_dir + "lubm/univ-bench.owl", - PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", - PagodaTester.onto_dir + "lubm/queries/test.sparql" - ); - AllTests.copy("log4j.log", "results-backup/current/lubm100.out"); - } - - @Test - public void fly() { - PagodaTester.main( - PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", - PagodaTester.onto_dir + "fly/queries/fly.sparql" - ); - AllTests.copy("log4j.log", "results-backup/current/fly.out"); - } - - @Test - public void dbpedia() { - PagodaTester.main( - PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", - PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", - PagodaTester.onto_dir + "dbpedia/atomic.sparql" - ); - AllTests.copy("log4j.log", "results-backup/current/dbpedia.out"); - } - - @Test - public void npdWithoutDataType() { - PagodaTester.main( - PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", - PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", - PagodaTester.onto_dir + "npd/queries/atomic.sparql" - ); - AllTests.copy("log4j.log", "results-backup/current/npd_minus.out"); - } - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java deleted file mode 100644 index 37ffb44..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java +++ /dev/null @@ -1,27 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import static org.junit.Assert.fail; - -import org.junit.Test; - -import uk.ac.ox.cs.pagoda.tester.PagodaTester; -import uk.ac.ox.cs.pagoda.tester.Statistics; - -public class PagodaDBPedia { - - @Test - public void test() { - PagodaTester.main( - PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", - PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", - PagodaTester.onto_dir + "dbpedia/atomic.sparql" - ); - - Statistics stat = new Statistics("output/log4j.log"); - String diff = stat.diff("results-backup/benchmark/dbpedia.out"); - AllTests.copy("output/log4j.log", "results-backup/current/dbpedia.out"); - if (!diff.isEmpty()) - fail(diff); - } - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java deleted file mode 100644 index d999a6e..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java +++ /dev/null @@ -1,18 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import org.junit.Test; -import uk.ac.ox.cs.pagoda.tester.PagodaTester; - -public class PagodaELU { - - @Test void test() { - int number = 1; - PagodaTester.main( - PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", - PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", - PagodaTester.onto_dir + "uobm/queries/standard.sparql" - ); - } - - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java deleted file mode 100644 index 4631837..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java +++ /dev/null @@ -1,24 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import org.junit.Test; - -import uk.ac.ox.cs.pagoda.tester.PagodaTester; - -public class PagodaFLY { - - @Test - public void test() { - PagodaTester.main( - PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", - PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" - ); - -// Statistics stat = new Statistics("output/log4j.log"); -// String diff = stat.diff("results-backup/benchmark/fly.out"); -// AllTests.copy("output/log4j.log", "results-backup/current/fly.out"); -// if (!diff.isEmpty()) -// fail(diff); - } - - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java deleted file mode 100644 index f8fef0e..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java +++ /dev/null @@ -1,38 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import static org.junit.Assert.*; - -import org.junit.Test; - -import uk.ac.ox.cs.pagoda.tester.PagodaTester; -import uk.ac.ox.cs.pagoda.tester.Statistics; - -public class PagodaLUBM { - - public void test_all(int number) { - PagodaTester.main( - PagodaTester.onto_dir + "lubm/univ-bench.owl", - PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", - PagodaTester.onto_dir + "lubm/queries/test_all_pagoda.sparql" - ); - - AllTests.copy("log4j.log", "output/jair/lubm" + number + ".out"); - } - - @Test - public void test1() { test_all(1); } - - public void test() { - int number = 100; - test_all(number); - } - - public void check(int number) { - Statistics stat = new Statistics("output/log4j.log"); - String diff = stat.diff("results-backup/benchmark/lubm" + number + ".out"); - AllTests.copy("output/log4j.log", "results-backup/current/lubm" + number + ".out"); - if (!diff.isEmpty()) - fail(diff); - } - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java deleted file mode 100644 index 96edbb4..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java +++ /dev/null @@ -1,42 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import static org.junit.Assert.fail; - -import org.junit.Test; - -import uk.ac.ox.cs.pagoda.tester.PagodaTester; -import uk.ac.ox.cs.pagoda.tester.Statistics; - -public class PagodaNPD { - - @Test - public void testNPDwithoutDataType() { - PagodaTester.main( - PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", - PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", - PagodaTester.onto_dir + "npd/queries/atomic.sparql" - ); - - Statistics stat = new Statistics("output/log4j.log"); - String diff = stat.diff("results-backup/benchmark/npd_minus.out"); - AllTests.copy("output/log4j.log", "results-backup/current/npd_minus.out"); - if (!diff.isEmpty()) - fail(diff); - } - - @Test - public void testNPD() { - PagodaTester.main( - PagodaTester.onto_dir + "npd/npd-all.owl", - PagodaTester.onto_dir + "npd/data/npd-data-dump-processed.ttl", - PagodaTester.onto_dir + "npd/queries/atomic.sparql" - ); - - Statistics stat = new Statistics("output/log4j.log"); - String diff = stat.diff("results-backup/benchmark/npd.out"); - AllTests.copy("output/log4j.log", "results-backup/current/npd.out"); - if (!diff.isEmpty()) - fail(diff); - } - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java deleted file mode 100644 index df1a57d..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java +++ /dev/null @@ -1,27 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import static org.junit.Assert.fail; - -import org.junit.Test; - -import uk.ac.ox.cs.pagoda.tester.PagodaTester; -import uk.ac.ox.cs.pagoda.tester.Statistics; - -public class PagodaNPD_bench { - - @Test - public void test() { - PagodaTester.main( - PagodaTester.onto_dir + "npd-benchmark/npd-v2-ql_a.owl", - PagodaTester.onto_dir + "npd-benchmark/npd-v2-ql_a.ttl", - PagodaTester.onto_dir + "npd-benchmark/queries/all.sparql" - ); - - Statistics stat = new Statistics("output/log4j.log"); - String diff = stat.diff("results-backup/benchmark/npd-bench.out"); - AllTests.copy("output/log4j.log", "results-backup/current/npd-bench.out"); - if (!diff.isEmpty()) - fail(diff); - } - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java deleted file mode 100644 index 5d93302..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java +++ /dev/null @@ -1,18 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import org.junit.Test; -import uk.ac.ox.cs.pagoda.tester.PagodaTester; - -public class PagodaRLU { - - @Test - public void testRL() { - int number = 1; - PagodaTester.main( - PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", - PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", - PagodaTester.onto_dir + "uobm/queries/standard.sparql" - ); - } - -} diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java deleted file mode 100644 index 5b56c6d..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java +++ /dev/null @@ -1,48 +0,0 @@ -package uk.ac.ox.cs.pagoda.junit; - -import org.junit.Test; - -import uk.ac.ox.cs.pagoda.tester.PagodaTester; -import uk.ac.ox.cs.pagoda.tester.Statistics; - -public class PagodaUOBM { - - public void test_all(int number ) { - PagodaTester.main( - PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", - PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", - PagodaTester.onto_dir + "uobm/queries/standard_all_pagoda.sparql" -// PagodaTester.onto_dir + "uobm/queries/standard_group3_all_less.sparql;" + -// PagodaTester.onto_dir + "uobm/queries/G3.sparql;" + -// PagodaTester.onto_dir + "uobm/queries/last.sparql" - ); - - AllTests.copy("log4j.log", "output/jair/newuobm/uobm" + number + ".out"); - } - - public void test_upToSum(int number) { - PagodaTester.main( - PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", - PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", - PagodaTester.onto_dir + "uobm/queries/standard_group3_all.sparql" - ); - -// AllTests.copy("log4j.log", "output/jair/uobm" + number + ".out"); - } - - @Test - public void test1() { test_all(1); } - - public void test500() { test_upToSum(500); } - - public static void main(String... args) { - new PagodaUOBM().test_all(1); - } - - public void check() { - Statistics stat = new Statistics("results-backup/current/uobm1.out"); - String diff = stat.diff("results-backup/benchmark/uobm1.out"); - System.out.println(diff); - } - -} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/ClauseTester.java b/test/uk/ac/ox/cs/pagoda/test_units/ClauseTester.java new file mode 100644 index 0000000..a0f16d4 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/ClauseTester.java @@ -0,0 +1,164 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import org.semanticweb.HermiT.model.Atom; +import org.semanticweb.HermiT.model.AtomicConcept; +import org.semanticweb.HermiT.model.AtomicRole; +import org.semanticweb.HermiT.model.DLClause; +import org.semanticweb.HermiT.model.Equality; +import org.semanticweb.HermiT.model.Variable; +import org.semanticweb.owlapi.apibinding.OWLManager; +import org.semanticweb.owlapi.model.OWLOntology; +import org.semanticweb.owlapi.model.OWLOntologyManager; + +import org.testng.Assert; +import org.testng.annotations.Test; +import uk.ac.ox.cs.pagoda.approx.Clause; +import uk.ac.ox.cs.pagoda.approx.Clausifier; + +public class ClauseTester { + + @Test + public void test_simple() { + Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); + AtomicConcept A = AtomicConcept.create("A"); + AtomicRole r = AtomicRole.create("r"); + Atom[] bodyAtoms = new Atom[] { + Atom.create(A, x), + Atom.create(r, x, y1), + Atom.create(r, x, y2) + }; + + Atom[] headAtoms = new Atom[] { + Atom.create(Equality.INSTANCE, y1, y2) + }; + + OWLOntologyManager m = OWLManager.createOWLOntologyManager(); + OWLOntology emptyOntology = null; + try { + emptyOntology = m.createOntology(); + } catch (Exception e) { + e.printStackTrace(); + Assert.fail("failed to create a new ontology"); + } + Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); + System.out.println(c.toString()); + } + + @Test + public void test_more() { + Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"), y3 = Variable.create("y3"); + AtomicConcept A = AtomicConcept.create("A"); + AtomicRole r = AtomicRole.create("r"); + Atom[] bodyAtoms = new Atom[] { + Atom.create(A, x), + Atom.create(r, x, y1), + Atom.create(r, x, y2), + Atom.create(r, x, y3), + }; + + Atom[] headAtoms = new Atom[] { + Atom.create(Equality.INSTANCE, y1, y2), + Atom.create(Equality.INSTANCE, y1, y3), + Atom.create(Equality.INSTANCE, y2, y3) + }; + + OWLOntologyManager m = OWLManager.createOWLOntologyManager(); + OWLOntology emptyOntology = null; + try { + emptyOntology = m.createOntology(); + } catch (Exception e) { + e.printStackTrace(); + Assert.fail("failed to create a new ontology"); + } + Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); + System.out.println(c.toString()); + } + + @Test + public void test_inverse() { + Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); + AtomicConcept A = AtomicConcept.create("A"); + AtomicRole r = AtomicRole.create("r"); + Atom[] bodyAtoms = new Atom[] { + Atom.create(A, x), + Atom.create(r, y1, x), + Atom.create(r, y2, x) + }; + + Atom[] headAtoms = new Atom[] { + Atom.create(Equality.INSTANCE, y1, y2) + }; + + OWLOntologyManager m = OWLManager.createOWLOntologyManager(); + OWLOntology emptyOntology = null; + try { + emptyOntology = m.createOntology(); + } catch (Exception e) { + e.printStackTrace(); + Assert.fail("failed to create a new ontology"); + } + Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); + System.out.println(c.toString()); + } + + @Test + public void test_fillter() { + Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); + AtomicConcept A = AtomicConcept.create("A"); + AtomicConcept B = AtomicConcept.create("B"); + AtomicRole r = AtomicRole.create("r"); + Atom[] bodyAtoms = new Atom[] { + Atom.create(A, x), + Atom.create(r, y1, x), + Atom.create(r, y2, x), + Atom.create(B, y1), + Atom.create(B, y2) + }; + + Atom[] headAtoms = new Atom[] { + Atom.create(Equality.INSTANCE, y1, y2) + }; + + OWLOntologyManager m = OWLManager.createOWLOntologyManager(); + OWLOntology emptyOntology = null; + try { + emptyOntology = m.createOntology(); + } catch (Exception e) { + e.printStackTrace(); + Assert.fail("failed to create a new ontology"); + } + Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); + System.out.println(c.toString()); + } + + @Test + public void test_negFillter() { + Variable x = Variable.create("X"), y1 = Variable.create("y1"), y2 = Variable.create("y2"); + AtomicConcept A = AtomicConcept.create("A"); + AtomicConcept B = AtomicConcept.create("B"); + AtomicRole r = AtomicRole.create("r"); + Atom[] bodyAtoms = new Atom[] { + Atom.create(A, x), + Atom.create(r, y1, x), + Atom.create(r, y2, x) + }; + + Atom[] headAtoms = new Atom[] { + Atom.create(Equality.INSTANCE, y1, y2), + Atom.create(B, y1), + Atom.create(B, y2) + }; + + OWLOntologyManager m = OWLManager.createOWLOntologyManager(); + OWLOntology emptyOntology = null; + try { + emptyOntology = m.createOntology(); + } catch (Exception e) { + e.printStackTrace(); + Assert.fail("failed to create a new ontology"); + } + Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); + System.out.println(c.toString()); + } + +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java b/test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java new file mode 100644 index 0000000..4e32297 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java @@ -0,0 +1,109 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import org.semanticweb.owlapi.model.OWLOntology; + +import org.testng.annotations.Test; +import uk.ac.ox.cs.pagoda.owl.OWLHelper; +import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner; +import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner.Type; +import uk.ac.ox.cs.pagoda.tester.PagodaTester; +import uk.ac.ox.cs.pagoda.util.Timer; +import uk.ac.ox.cs.pagoda.util.Utility; + +public class CostEvaluation { + + @Test + public void lubm100() { + int number = 1; + PagodaTester.main( + PagodaTester.onto_dir + "lubm/univ-bench.owl", + PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", + PagodaTester.onto_dir + "lubm/queries/test_all_pagoda.sparql" + ); +// AllTests.copy("output/log4j.log", "results-backup/jair/lubm" + number + ".out"); + } + + public void lubm1000() { + int number = 1000; + String[] args = new String[] { + PagodaTester.onto_dir + "lubm/univ-bench.owl", + PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", + PagodaTester.onto_dir + "lubm/queries/test_all_pagoda.sparql" + }; + OWLOntology ontology = OWLHelper.loadOntology(args[0]); + QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true); + Timer t = new Timer(); + reasoner.loadOntology(ontology); + reasoner.importData(args[1]); + if (!reasoner.preprocess()) + return ; + Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds."); + + reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2])); +// AllTests.copy("output/log4j.log", "results-backup/jair/lubm" + number + ".out"); + } + + @Test + public void uobm5() { + int number = 1; + String[] args = new String[] { + PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", + PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", + PagodaTester.onto_dir + "uobm/queries/standard_all_pagoda.sparql" + }; + PagodaTester.main(args); +// AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); + } + + public void uobm100() { + int number = 200; + String[] args = new String[] { + PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", + PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", + PagodaTester.onto_dir + "uobm/queries/standard_group3_all.sparql" + }; + PagodaTester.main(args); +// AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); + } + + public void uobm500() { + int number = 500; + String[] args = new String[] { + PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", + PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", + PagodaTester.onto_dir + "uobm/queries/standard_all_pagoda.sparql" + }; + + OWLOntology ontology = OWLHelper.loadOntology(args[0]); + QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true); + Timer t = new Timer(); + reasoner.loadOntology(ontology); + reasoner.importData(args[1]); + if (!reasoner.preprocess()) + return ; + Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds."); + + reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2])); +// AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); + } + + + public static void main(String... args) { + args = new String[] { + PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", + PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", + PagodaTester.onto_dir + "dbpedia/queries/atomic_ground.sparql" + }; + + OWLOntology ontology = OWLHelper.loadOntology(args[0]); + QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true); + Timer t = new Timer(); + reasoner.loadOntology(ontology); + reasoner.importData(args[1]); + if (!reasoner.preprocess()) + return ; + Utility.logInfo("Preprocessing Done in " + t.duration() + " seconds."); + + reasoner.evaluate(reasoner.getQueryManager().collectQueryRecords(args[2])); + } +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/JAIR_PAGOdA.java b/test/uk/ac/ox/cs/pagoda/test_units/JAIR_PAGOdA.java new file mode 100644 index 0000000..ff616f7 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/JAIR_PAGOdA.java @@ -0,0 +1,180 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import org.testng.annotations.Test; +import uk.ac.ox.cs.pagoda.tester.PagodaTester; +import uk.ac.ox.cs.pagoda.util.Utility; + +import java.io.IOException; + +public class JAIR_PAGOdA { + + @Test + public void lubm1() throws IOException { + String[] args = new String[] { + PagodaTester.onto_dir + "lubm/univ-bench.owl", + PagodaTester.onto_dir + "lubm/data/lubm1.ttl", + PagodaTester.onto_dir + "lubm/queries/test.sparql" + }; + PagodaTester.main(args); + Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda"); + } + + @Test + public void lubm1_conj() throws IOException { + String[] args = new String[] { + PagodaTester.onto_dir + "lubm/univ-bench.owl", + PagodaTester.onto_dir + "lubm/data/lubm1.ttl", + PagodaTester.onto_dir + "lubm/queries/test_pellet.sparql" + }; + PagodaTester.main(args); + Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda_conj"); + } + + @Test + public void lubm1_rolledUp() throws IOException { + String[] args = new String[] { + "/home/yzhou/backup/20141212/univ-bench-queries.owl", + PagodaTester.onto_dir + "lubm/data/lubm1.ttl", + PagodaTester.onto_dir + "lubm/queries/atomic_lubm.sparql" + }; + PagodaTester.main(args); + Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda_rolledUp"); + } + + @Test + public void uobm1() throws IOException { + String[] args = new String[] { + PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", + PagodaTester.onto_dir + "uobm/data/uobm1.ttl", + PagodaTester.onto_dir + "uobm/queries/standard.sparql" + }; + PagodaTester.main(args); + Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda"); + } + + @Test + public void uobm1_conj() throws IOException { + String[] args = new String[] { + PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", + PagodaTester.onto_dir + "uobm/data/uobm1.ttl", + PagodaTester.onto_dir + "uobm/queries/standard_pellet.sparql" + }; + PagodaTester.main(args); + Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda_conj"); + } + + @Test + public void uobm1_rolledUp() { + String[] args = new String[] { + "/home/yzhou/backup/20141212/univ-bench-dl-queries.owl", + PagodaTester.onto_dir + "uobm/data/uobm1.ttl", + PagodaTester.onto_dir + "uobm/queries/atomic_uobm.sparql" + }; + PagodaTester.main(args); +// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda_rolledUp"); + } + + @Test + public void fly() { + String[] args = new String[] { + PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", + null, + PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" + }; + PagodaTester.main(args); +// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda"); + } + + @Test + public void fly_conj() throws IOException { + String[] args = new String[] { + PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", + null, + PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" + }; + PagodaTester.main(args); + Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda_conj"); + } + + + public void fly_rolledUp() { + PagodaTester.main(new String[] { +// PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", + PagodaTester.onto_dir + "fly/fly-all-in-one_rolledUp.owl", + null, + PagodaTester.onto_dir + "fly/queries/fly_atomic.sparql" + }); +// Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda_rolledUp"); + } + + public void dbpedia() { + PagodaTester.main( + PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", + PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", + PagodaTester.onto_dir + "dbpedia/queries/atomic_ground.sparql" + , "dbpedia.ans" + ); + +// Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/dbpedia/pagoda"); + } + + public void npd() { + PagodaTester.main( + PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", + PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", + PagodaTester.onto_dir + "npd/queries/atomic_ground.sparql" + , "npd.ans" + ); + +// Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/npd/pagoda"); + } + + public void reactome() throws IOException { + PagodaTester.main( + PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", + PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/reactome_sample_10.ttl", +// null, +// PagodaTester.onto_dir + "bio2rdf/reactome/queries/atomic_ground.sparql" + PagodaTester.onto_dir + "bio2rdf/reactome/queries/example.sparql" + , "pagoda_reactome.ans" + ); + Utility.copyFile("log4j.log", "output/jair/pagoda_reactome.example"); + +// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_10p"); + } + + public void chembl() throws IOException { + PagodaTester.main( + PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", + PagodaTester.onto_dir + "bio2rdf/chembl/graph sampling/sample_1.nt", +// PagodaTester.onto_dir + "bio2rdf/chembl/queries/atomic_ground.sparql" + PagodaTester.onto_dir + "bio2rdf/chembl/queries/example.sparql" + , "pagoda_chembl.ans" + ); + Utility.copyFile("log4j.log", "output/jair/pagoda_chembl.example"); +// Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_1p"); + } + + public void uniprot() throws IOException { + PagodaTester.main( + PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", + PagodaTester.onto_dir + "bio2rdf/uniprot/graph sampling/sample_1.nt", +// null, +// PagodaTester.onto_dir + "bio2rdf/uniprot/queries/atomic_ground.sparql" + PagodaTester.onto_dir + "bio2rdf/uniprot/queries/example.sparql" + , "pagoda_uniprot.ans" + ); + Utility.copyFile("log4j.log", "output/jair/pagoda_uniprot.example"); +// AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_1p"); + } + + + public static void main(String... args) { + try { + new JAIR_PAGOdA().lubm1(); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/JAIR_Scalability.java b/test/uk/ac/ox/cs/pagoda/test_units/JAIR_Scalability.java new file mode 100644 index 0000000..43cb810 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/JAIR_Scalability.java @@ -0,0 +1,88 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import org.testng.annotations.Test; +import uk.ac.ox.cs.pagoda.tester.PagodaTester; +import uk.ac.ox.cs.pagoda.util.Properties; +import uk.ac.ox.cs.pagoda.util.Utility; + +import java.io.IOException; + +public class JAIR_Scalability { + + private static final String date = "_0123"; + + @Test + public void reactome() throws IOException { + testReactome(10, false); + } + + @Test + public void chembl() throws IOException { + testChEMBL(1, false); + } + + @Test + public void uniprot() throws IOException { + testUniProt(1, false); + } + + public void testReactome(int percentage, boolean save) throws IOException { + String[] args = new String[] { + PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", + PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/simplifed_sample_" + percentage + ".ttl", + PagodaTester.onto_dir + "bio2rdf/reactome/queries/test.sparql" + , "reactome.ans" + }; + if (percentage == 10) + args[1] = args[1].replace("simplifed", "reactome"); + + PagodaTester.main(args); + if (save) + Utility.copyFile("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_" + percentage + "p" + date); + } + + public void testChEMBL(int percentage, boolean save) throws IOException { + String[] args = new String[] { + PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", + PagodaTester.onto_dir + "bio2rdf/chembl/sample_" + percentage + ".nt", +// PagodaTester.onto_dir + "bio2rdf/chembl/queries/atomic_ground.sparql" + PagodaTester.onto_dir + "bio2rdf/chembl/queries/test.sparql" + , "chembl.ans" + }; + if (percentage == 1 || percentage == 10 || percentage == 50) + args[1] = args[1].replace("chembl", "chembl/graph sampling"); + else + if (percentage == 100) + args[1] = "/home/yzhou/RDFData/ChEMBL/facts/ChEMBL.ttl"; + + PagodaTester.main(args); + if (save) + Utility.copyFile("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_" + percentage + "p" + date); + } + + public void testUniProt(int percentage, boolean save) throws IOException { + String[] args = new String[] { + PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", + PagodaTester.onto_dir + "bio2rdf/uniprot/sample_" + percentage + ".nt", +// PagodaTester.onto_dir + "bio2rdf/uniprot/queries/atomic_ground.sparql" + PagodaTester.onto_dir + "bio2rdf/uniprot/queries/test.sparql" + , "uniprot.ans" + }; + + if (percentage == 1 || percentage == 10 || percentage == 50) + args[1] = args[1].replace("uniprot", "uniprot/graph sampling"); + else + if (percentage == 100) + args[1] = "/home/yzhou/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/data/uniprot_cleaned.nt"; + + PagodaTester.main(args); + if (save) + Utility.copyFile("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_" + percentage + "p" + date); + } + + public static void main(String... args) throws IOException { + Properties.ShellModeDefault = true; + new JAIR_Scalability().testUniProt(50, false); + } + +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/LightEvaluation.java b/test/uk/ac/ox/cs/pagoda/test_units/LightEvaluation.java new file mode 100644 index 0000000..29006de --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/LightEvaluation.java @@ -0,0 +1,62 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import org.junit.Test; +import uk.ac.ox.cs.pagoda.tester.PagodaTester; +import uk.ac.ox.cs.pagoda.util.Utility; + +import java.io.IOException; + +public class LightEvaluation { + + @Test + public void uobm1() throws IOException { + int number = 1; + PagodaTester.main( + PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", + PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", + PagodaTester.onto_dir + "uobm/queries/standard.sparql" + ); + Utility.copyFile("log4j.log", "output/jair/uobm1.out"); + } + + @Test + public void lubm100() throws IOException { + int number = 100; + PagodaTester.main( + PagodaTester.onto_dir + "lubm/univ-bench.owl", + PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", + PagodaTester.onto_dir + "lubm/queries/test.sparql" + ); + Utility.copyFile("log4j.log", "results-backup/current/lubm100.out"); + } + + @Test + public void fly() throws IOException { + PagodaTester.main( + PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", + PagodaTester.onto_dir + "fly/queries/fly.sparql" + ); + Utility.copyFile("log4j.log", "results-backup/current/fly.out"); + } + + @Test + public void dbpedia() throws IOException { + PagodaTester.main( + PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", + PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", + PagodaTester.onto_dir + "dbpedia/atomic.sparql" + ); + Utility.copyFile("log4j.log", "results-backup/current/dbpedia.out"); + } + + @Test + public void npdWithoutDataType() throws IOException { + PagodaTester.main( + PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", + PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", + PagodaTester.onto_dir + "npd/queries/atomic.sparql" + ); + Utility.copyFile("log4j.log", "results-backup/current/npd_minus.out"); + } + +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/PagodaDBPedia.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaDBPedia.java new file mode 100644 index 0000000..aaf542e --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaDBPedia.java @@ -0,0 +1,30 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import static org.junit.Assert.fail; + +import org.junit.Test; + +import uk.ac.ox.cs.pagoda.tester.PagodaTester; +import uk.ac.ox.cs.pagoda.tester.Statistics; +import uk.ac.ox.cs.pagoda.util.Utility; + +import java.io.IOException; + +public class PagodaDBPedia { + + @Test + public void test() throws IOException { + PagodaTester.main( + PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", + PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", + PagodaTester.onto_dir + "dbpedia/atomic.sparql" + ); + + Statistics stat = new Statistics("output/log4j.log"); + String diff = stat.diff("results-backup/benchmark/dbpedia.out"); + Utility.copyFile("output/log4j.log", "results-backup/current/dbpedia.out"); + if (!diff.isEmpty()) + fail(diff); + } + +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/PagodaELU.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaELU.java new file mode 100644 index 0000000..c2fa838 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaELU.java @@ -0,0 +1,18 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import org.junit.Test; +import uk.ac.ox.cs.pagoda.tester.PagodaTester; + +public class PagodaELU { + + @Test void test() { + int number = 1; + PagodaTester.main( + PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", + PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", + PagodaTester.onto_dir + "uobm/queries/standard.sparql" + ); + } + + +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/PagodaFLY.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaFLY.java new file mode 100644 index 0000000..2fe07f0 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaFLY.java @@ -0,0 +1,24 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import org.junit.Test; + +import uk.ac.ox.cs.pagoda.tester.PagodaTester; + +public class PagodaFLY { + + @Test + public void test() { + PagodaTester.main( + PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", + PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" + ); + +// Statistics stat = new Statistics("output/log4j.log"); +// String diff = stat.diff("results-backup/benchmark/fly.out"); +// AllTests.copy("output/log4j.log", "results-backup/current/fly.out"); +// if (!diff.isEmpty()) +// fail(diff); + } + + +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/PagodaLUBM.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaLUBM.java new file mode 100644 index 0000000..f40e41b --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaLUBM.java @@ -0,0 +1,68 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import org.testng.Assert; +import org.testng.annotations.Test; +import uk.ac.ox.cs.pagoda.tester.PagodaTester; +import uk.ac.ox.cs.pagoda.tester.Statistics; +import uk.ac.ox.cs.pagoda.util.Utility; + +import java.io.FileInputStream; +import java.io.IOException; +import java.util.Properties; + +public class PagodaLUBM { + + public static final String CONFIG_FILE = "config/test.properties"; + + private static boolean isInit = false; + private static String ontoDir; + + private static void init() { + if(isInit) return; + isInit = true; + + Properties config = new Properties(); + + try(FileInputStream in = new FileInputStream(CONFIG_FILE)) { + config.load(in); + in.close(); + } catch (IOException e) { + e.printStackTrace(); + } + + ontoDir = config.getProperty("ontoDir"); + } + + private void test_all(int number) { + init(); + PagodaTester.main( + Utility.combinePaths(ontoDir, "lubm/univ-bench.owl"), + Utility.combinePaths(ontoDir, "lubm/data/lubm" + number + ".ttl"), + Utility.combinePaths(ontoDir, "lubm/queries/test.sparql") + ); + +// assertTrue(false); +// AllTests.copy("log4j.log", "output/jair/lubm" + number + ".out"); + } + + @Test + public void test1() { + test_all(1); + } + +// @Test +// public void test() { +// int number = 100; +// test_all(number); +// } + + private void check(int number) throws IOException { + Statistics stat = new Statistics("output/log4j.log"); + // TODO insert proper file + String diff = stat.diff("results-backup/benchmark/lubm" + number + ".out"); + Utility.copyFile("output/log4j.log", "results-backup/current/lubm" + number + ".out"); + if (!diff.isEmpty()) + Assert.fail(diff); + } + +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java new file mode 100644 index 0000000..8fbe793 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java @@ -0,0 +1,45 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import static org.junit.Assert.fail; + +import org.junit.Test; + +import uk.ac.ox.cs.pagoda.tester.PagodaTester; +import uk.ac.ox.cs.pagoda.tester.Statistics; +import uk.ac.ox.cs.pagoda.util.Utility; + +import java.io.IOException; + +public class PagodaNPD { + + @Test + public void testNPDwithoutDataType() throws IOException { + PagodaTester.main( + PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", + PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", + PagodaTester.onto_dir + "npd/queries/atomic.sparql" + ); + + Statistics stat = new Statistics("output/log4j.log"); + String diff = stat.diff("results-backup/benchmark/npd_minus.out"); + Utility.copyFile("output/log4j.log", "results-backup/current/npd_minus.out"); + if (!diff.isEmpty()) + fail(diff); + } + + @Test + public void testNPD() throws IOException { + PagodaTester.main( + PagodaTester.onto_dir + "npd/npd-all.owl", + PagodaTester.onto_dir + "npd/data/npd-data-dump-processed.ttl", + PagodaTester.onto_dir + "npd/queries/atomic.sparql" + ); + + Statistics stat = new Statistics("output/log4j.log"); + String diff = stat.diff("results-backup/benchmark/npd.out"); + Utility.copyFile("output/log4j.log", "results-backup/current/npd.out"); + if (!diff.isEmpty()) + fail(diff); + } + +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD_bench.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD_bench.java new file mode 100644 index 0000000..1243180 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD_bench.java @@ -0,0 +1,30 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import static org.junit.Assert.fail; + +import org.junit.Test; + +import uk.ac.ox.cs.pagoda.tester.PagodaTester; +import uk.ac.ox.cs.pagoda.tester.Statistics; +import uk.ac.ox.cs.pagoda.util.Utility; + +import java.io.IOException; + +public class PagodaNPD_bench { + + @Test + public void test() throws IOException { + PagodaTester.main( + PagodaTester.onto_dir + "npd-benchmark/npd-v2-ql_a.owl", + PagodaTester.onto_dir + "npd-benchmark/npd-v2-ql_a.ttl", + PagodaTester.onto_dir + "npd-benchmark/queries/all.sparql" + ); + + Statistics stat = new Statistics("output/log4j.log"); + String diff = stat.diff("results-backup/benchmark/npd-bench.out"); + Utility.copyFile("output/log4j.log", "results-backup/current/npd-bench.out"); + if (!diff.isEmpty()) + fail(diff); + } + +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/PagodaRLU.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaRLU.java new file mode 100644 index 0000000..8b31c99 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaRLU.java @@ -0,0 +1,18 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import org.junit.Test; +import uk.ac.ox.cs.pagoda.tester.PagodaTester; + +public class PagodaRLU { + + @Test + public void testRL() { + int number = 1; + PagodaTester.main( + PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", + PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", + PagodaTester.onto_dir + "uobm/queries/standard.sparql" + ); + } + +} diff --git a/test/uk/ac/ox/cs/pagoda/test_units/PagodaUOBM.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaUOBM.java new file mode 100644 index 0000000..29a9056 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaUOBM.java @@ -0,0 +1,79 @@ +package uk.ac.ox.cs.pagoda.test_units; + +import org.testng.annotations.Test; +import uk.ac.ox.cs.pagoda.tester.PagodaTester; +import uk.ac.ox.cs.pagoda.tester.Statistics; +import uk.ac.ox.cs.pagoda.util.Utility; + +import java.io.FileInputStream; +import java.io.IOException; +import java.util.Properties; + +public class PagodaUOBM { + + public static final String CONFIG_FILE = "config/test.properties"; + + private static boolean isInit = false; + private static String ontoDir; + + private static void init() { + if(isInit) return; + isInit = true; + + Properties config = new Properties(); + + try(FileInputStream in = new FileInputStream(CONFIG_FILE)) { + config.load(in); + in.close(); + } catch (IOException e) { + e.printStackTrace(); + } + + ontoDir = config.getProperty("ontoDir"); + } + + private void test_all(int number ) { + init(); + + PagodaTester.main( + Utility.combinePaths(ontoDir, "uobm/univ-bench-dl.owl"), + Utility.combinePaths(ontoDir, "uobm/data/uobm" + number + ".ttl"), + Utility.combinePaths(ontoDir, "uobm/queries/test.sparql") +// + ";" + +// Utility.combinePaths(ontoDir, "uobm/queries/standard_group3_all_less.sparql") + ";" + +// Utility.combinePaths(ontoDir, "uobm/queries/G3.sparql") + ";" + +// Utility.combinePaths(ontoDir, "uobm/queries/last.sparql") + ); + +// AllTests.copy("log4j.log", "output/jair/newuobm/uobm" + number + ".out"); + } + + private void test_upToSum(int number) { + init(); + + PagodaTester.main( + PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", + PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", + PagodaTester.onto_dir + "uobm/queries/standard_group3_all.sparql" + ); + +// AllTests.copy("log4j.log", "output/jair/uobm" + number + ".out"); + } + + @Test + public void test1() { test_all(1); } + +// @Test + public void test500() { test_upToSum(500); } + +// public static void main(String... args) { +// new PagodaUOBM().test_all(1); +// } + + private void check() { + Statistics stat = new Statistics("results-backup/current/uobm1.out"); + String diff = stat.diff("results-backup/benchmark/uobm1.out"); + System.out.println(diff); + } + +} diff --git a/test/uk/ac/ox/cs/pagoda/tester/PagodaTester.java b/test/uk/ac/ox/cs/pagoda/tester/PagodaTester.java index 05a7d70..51b41f9 100644 --- a/test/uk/ac/ox/cs/pagoda/tester/PagodaTester.java +++ b/test/uk/ac/ox/cs/pagoda/tester/PagodaTester.java @@ -17,7 +17,7 @@ public class PagodaTester { // public static final String onto_dir = "/media/RDFData/yzhou/"; // public static final String onto_dir = "/users/yzhou/ontologies/"; // public static final String onto_dir = "/home/scratch/yzhou/ontologies/"; - public static final String onto_dir = "/home/yzhou/krr-nas-share/Yujiao/ontologies/"; + public static final String onto_dir = "/home/alessandro/Big_files/Ontologies/"; public static final String fly = onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl"; public static final String fly_query = onto_dir + "fly/queries/fly.sparql"; @@ -88,12 +88,12 @@ public class PagodaTester { public static final String atlas_tbox = onto_dir + "bio2rdf/atlas/gxaterms.owl"; public static final String atlas_abox = onto_dir + "bio2rdf/atlas/graph sampling/sample_1.nt"; - public static final String atlas_queries = onto_dir + "bio2rdf/atlas/queries/atomic_one.sparql"; - + public static final String atlas_queries = onto_dir + "bio2rdf/atlas/queries/atomic_one.sparql"; + public static void main(String... args) { if (args.length == 0) { // args = new String[] {test_tbox, test_abox, test_query}; -// args = new String[] {lubm_tbox, lubm_abox, lubm_query.replace(".sparql", "_all_pagoda.sparql")}; + args = new String[] {lubm_tbox, lubm_abox, lubm_query}; // args = new String[] {uobm_tbox, uobm_abox, uobm_query.replace(".sparql", "_all_pagoda.sparql")}; // args = new String[] {fly, "null", fly_query.replace(".sparql", "_pellet.sparql") }; // args = new String[] {dbpedia_tbox, dbpedia_abox, dbpedia_query}; @@ -129,10 +129,10 @@ public class PagodaTester { if (args.length > index) properties.setToClassify(Boolean.parseBoolean(args[index++].substring(1))); if (args.length > index) properties.setToCallHermiT(Boolean.parseBoolean(args[index++].substring(1))); - System.out.println("Ontology file: " + properties.getOntologyPath()); - System.out.println("Data files: " + properties.getDataPath()); - System.out.println("Query files: " + properties.getQueryPath()); - System.out.println("Answer file: " + properties.getAnswerPath()); + Utility.logInfo("Ontology file: " + properties.getOntologyPath()); + Utility.logInfo("Data files: " + properties.getDataPath()); + Utility.logInfo("Query files: " + properties.getQueryPath()); + Utility.logInfo("Answer file: " + properties.getAnswerPath()); QueryReasoner pagoda = null; -- cgit v1.2.3