diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-10-29 19:42:23 +0100 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-10-29 19:42:23 +0100 |
commit | f8a818373d39053d0a539dae689d09d13f8877bc (patch) | |
tree | 75f01b7cb0e3287108627edbb7a6754792dc17cf /src/main/scala | |
parent | 101ba17e3b39a9b11888219705cde9a150a3bf02 (diff) | |
download | RSAComb-f8a818373d39053d0a539dae689d09d13f8877bc.tar.gz RSAComb-f8a818373d39053d0a539dae689d09d13f8877bc.zip |
Add partial unit tests for filtering program computation
The committed tests will fail, but the reason is still not clear.
Diffstat (limited to 'src/main/scala')
-rw-r--r-- | src/main/scala/rsacomb/FilteringProgram.scala | 4 | ||||
-rw-r--r-- | src/main/scala/rsacomb/RDFoxUtil.scala | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/rsacomb/FilteringProgram.scala b/src/main/scala/rsacomb/FilteringProgram.scala index 2be236b..9c19b7f 100644 --- a/src/main/scala/rsacomb/FilteringProgram.scala +++ b/src/main/scala/rsacomb/FilteringProgram.scala | |||
@@ -8,8 +8,8 @@ class FilteringProgram(query: Query, constants: List[Term]) extends RDFTriple { | |||
8 | /* Makes mplicit conversion OWLAPI IRI <-> RDFox IRI available */ | 8 | /* Makes mplicit conversion OWLAPI IRI <-> RDFox IRI available */ |
9 | import RDFoxUtil._ | 9 | import RDFoxUtil._ |
10 | 10 | ||
11 | private val answer: List[Term] = query.getAnswerVariables.asScala.toList | 11 | val answer: List[Term] = query.getAnswerVariables.asScala.toList |
12 | private val bounded: List[Term] = this.getBoundedVariables | 12 | val bounded: List[Term] = this.getBoundedVariables |
13 | 13 | ||
14 | val facts: List[Atom] = constants.map(named) | 14 | val facts: List[Atom] = constants.map(named) |
15 | val rules: List[Rule] = this.generateFilteringProgram().map(reifyRule) | 15 | val rules: List[Rule] = this.generateFilteringProgram().map(reifyRule) |
diff --git a/src/main/scala/rsacomb/RDFoxUtil.scala b/src/main/scala/rsacomb/RDFoxUtil.scala index 8a144c6..4e0a118 100644 --- a/src/main/scala/rsacomb/RDFoxUtil.scala +++ b/src/main/scala/rsacomb/RDFoxUtil.scala | |||
@@ -51,9 +51,9 @@ object RDFoxUtil { | |||
51 | (server, data) | 51 | (server, data) |
52 | } | 52 | } |
53 | 53 | ||
54 | def parseQuery(query: String): Query = { | 54 | def parseQuery(query: String, prefixes: Prefixes = RSA.Prefixes): Query = { |
55 | val parser = new SPARQLParser( | 55 | val parser = new SPARQLParser( |
56 | RSA.Prefixes, | 56 | prefixes, |
57 | new ByteArrayInputStream(query.getBytes()) | 57 | new ByteArrayInputStream(query.getBytes()) |
58 | ) | 58 | ) |
59 | parser.parseSingleQuery() | 59 | parser.parseSingleQuery() |