diff options
Diffstat (limited to 'src')
6 files changed, 15 insertions, 12 deletions
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/CanonicalModel.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/CanonicalModel.scala index d5956ae..0f3b16a 100644 --- a/src/main/scala/uk/ac/ox/cs/rsacomb/CanonicalModel.scala +++ b/src/main/scala/uk/ac/ox/cs/rsacomb/CanonicalModel.scala | |||
| @@ -28,14 +28,14 @@ import uk.ac.ox.cs.rsacomb.converter.{ | |||
| 28 | RDFoxAxiomConverter, | 28 | RDFoxAxiomConverter, |
| 29 | RDFoxPropertyExprConverter | 29 | RDFoxPropertyExprConverter |
| 30 | } | 30 | } |
| 31 | import uk.ac.ox.cs.rsacomb.implicits.RSAAxiom | ||
| 32 | import uk.ac.ox.cs.rsacomb.suffix.{Empty, Forward, Backward, Inverse} | 31 | import uk.ac.ox.cs.rsacomb.suffix.{Empty, Forward, Backward, Inverse} |
| 33 | import uk.ac.ox.cs.rsacomb.util.RSA | 32 | import uk.ac.ox.cs.rsacomb.util.RSA |
| 34 | 33 | ||
| 35 | class CanonicalModel(val ontology: RSAOntology) extends RSAAxiom { | 34 | class CanonicalModel(val ontology: RSAOntology) { |
| 36 | 35 | ||
| 37 | import implicits.RDFox._ | 36 | import implicits.RDFox._ |
| 38 | import implicits.JavaCollections._ | 37 | import implicits.JavaCollections._ |
| 38 | import uk.ac.ox.cs.rsacomb.implicits.RSAAxiom._ | ||
| 39 | 39 | ||
| 40 | val rolesAdditionalRules: List[Rule] = { | 40 | val rolesAdditionalRules: List[Rule] = { |
| 41 | // Given a role (predicate) compute additional logic rules | 41 | // Given a role (predicate) compute additional logic rules |
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/FilteringProgram.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/FilteringProgram.scala index b07ba92..52be937 100644 --- a/src/main/scala/uk/ac/ox/cs/rsacomb/FilteringProgram.scala +++ b/src/main/scala/uk/ac/ox/cs/rsacomb/FilteringProgram.scala | |||
| @@ -9,7 +9,6 @@ import tech.oxfordsemantic.jrdfox.logic.datalog.{ | |||
| 9 | Negation | 9 | Negation |
| 10 | } | 10 | } |
| 11 | import tech.oxfordsemantic.jrdfox.logic.expression.{Term, Variable} | 11 | import tech.oxfordsemantic.jrdfox.logic.expression.{Term, Variable} |
| 12 | import uk.ac.ox.cs.rsacomb.implicits.RSAAtom | ||
| 13 | import uk.ac.ox.cs.rsacomb.sparql.ConjunctiveQuery | 12 | import uk.ac.ox.cs.rsacomb.sparql.ConjunctiveQuery |
| 14 | import uk.ac.ox.cs.rsacomb.suffix.{Forward, Backward} | 13 | import uk.ac.ox.cs.rsacomb.suffix.{Forward, Backward} |
| 15 | import uk.ac.ox.cs.rsacomb.util.{RSA, RDFoxUtil} | 14 | import uk.ac.ox.cs.rsacomb.util.{RSA, RDFoxUtil} |
| @@ -35,8 +34,12 @@ object FilteringProgram { | |||
| 35 | * | 34 | * |
| 36 | * Instances can be created using the companion object. | 35 | * Instances can be created using the companion object. |
| 37 | */ | 36 | */ |
| 38 | class FilteringProgram(query: ConjunctiveQuery, constants: List[Term]) | 37 | class FilteringProgram(query: ConjunctiveQuery, constants: List[Term]) { |
| 39 | extends RSAAtom { | 38 | |
| 39 | /** Extends capabilities of | ||
| 40 | * [[tech.oxfordsemantic.jrdfox.logic.datalog.TupleTableAtom TupleTableAtom]] | ||
| 41 | */ | ||
| 42 | import uk.ac.ox.cs.rsacomb.implicits.RSAAtom._ | ||
| 40 | 43 | ||
| 41 | /** Implicit parameter used in RSA internal predicates. | 44 | /** Implicit parameter used in RSA internal predicates. |
| 42 | * | 45 | * |
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala index 19a6280..ceb24de 100644 --- a/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala +++ b/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala | |||
| @@ -49,7 +49,6 @@ import tech.oxfordsemantic.jrdfox.logic._ | |||
| 49 | import org.semanticweb.owlapi.model.OWLObjectInverseOf | 49 | import org.semanticweb.owlapi.model.OWLObjectInverseOf |
| 50 | 50 | ||
| 51 | import uk.ac.ox.cs.rsacomb.converter.{RDFoxAxiomConverter, SkolemStrategy} | 51 | import uk.ac.ox.cs.rsacomb.converter.{RDFoxAxiomConverter, SkolemStrategy} |
| 52 | import uk.ac.ox.cs.rsacomb.implicits.RSAAxiom | ||
| 53 | import uk.ac.ox.cs.rsacomb.suffix._ | 52 | import uk.ac.ox.cs.rsacomb.suffix._ |
| 54 | import uk.ac.ox.cs.rsacomb.sparql._ | 53 | import uk.ac.ox.cs.rsacomb.sparql._ |
| 55 | import uk.ac.ox.cs.rsacomb.util.{RDFoxUtil, RSA} | 54 | import uk.ac.ox.cs.rsacomb.util.{RDFoxUtil, RSA} |
| @@ -78,7 +77,9 @@ object RSAOntology { | |||
| 78 | } | 77 | } |
| 79 | } | 78 | } |
| 80 | 79 | ||
| 81 | class RSAOntology(val ontology: OWLOntology) extends RSAAxiom { | 80 | class RSAOntology(val ontology: OWLOntology) { |
| 81 | |||
| 82 | import uk.ac.ox.cs.rsacomb.implicits.RSAAxiom._ | ||
| 82 | 83 | ||
| 83 | // Gather TBox/RBox/ABox from original ontology | 84 | // Gather TBox/RBox/ABox from original ontology |
| 84 | val tbox: List[OWLAxiom] = | 85 | val tbox: List[OWLAxiom] = |
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/implicits/RSAAtom.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/implicits/RSAAtom.scala index a8afc72..615722b 100644 --- a/src/main/scala/uk/ac/ox/cs/rsacomb/implicits/RSAAtom.scala +++ b/src/main/scala/uk/ac/ox/cs/rsacomb/implicits/RSAAtom.scala | |||
| @@ -28,7 +28,7 @@ import uk.ac.ox.cs.rsacomb.RSAOntology | |||
| 28 | * ``` | 28 | * ``` |
| 29 | */ | 29 | */ |
| 30 | 30 | ||
| 31 | trait RSAAtom { | 31 | object RSAAtom { |
| 32 | 32 | ||
| 33 | implicit class RSAAtom(val atom: TupleTableAtom) { | 33 | implicit class RSAAtom(val atom: TupleTableAtom) { |
| 34 | 34 | ||
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/implicits/RSAAxiom.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/implicits/RSAAxiom.scala index e39d5b2..39d9d66 100644 --- a/src/main/scala/uk/ac/ox/cs/rsacomb/implicits/RSAAxiom.scala +++ b/src/main/scala/uk/ac/ox/cs/rsacomb/implicits/RSAAxiom.scala | |||
| @@ -24,7 +24,7 @@ import scala.collection.JavaConverters._ | |||
| 24 | 24 | ||
| 25 | /* Wrapper trait for the implicit class `RSAAxiom`. | 25 | /* Wrapper trait for the implicit class `RSAAxiom`. |
| 26 | */ | 26 | */ |
| 27 | trait RSAAxiom { | 27 | object RSAAxiom { |
| 28 | 28 | ||
| 29 | /* Identifies some of the axiom types in a Horn-ALCHOIQ ontology | 29 | /* Identifies some of the axiom types in a Horn-ALCHOIQ ontology |
| 30 | * in normal form. Refer to the paper for more details on the | 30 | * in normal form. Refer to the paper for more details on the |
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/util/RDFoxUtil.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/util/RDFoxUtil.scala index 99a9614..f7abde3 100644 --- a/src/main/scala/uk/ac/ox/cs/rsacomb/util/RDFoxUtil.scala +++ b/src/main/scala/uk/ac/ox/cs/rsacomb/util/RDFoxUtil.scala | |||
| @@ -18,10 +18,9 @@ import tech.oxfordsemantic.jrdfox.logic.datalog.{ | |||
| 18 | import tech.oxfordsemantic.jrdfox.logic.expression.{Resource} | 18 | import tech.oxfordsemantic.jrdfox.logic.expression.{Resource} |
| 19 | import tech.oxfordsemantic.jrdfox.logic.sparql.statement.SelectQuery | 19 | import tech.oxfordsemantic.jrdfox.logic.sparql.statement.SelectQuery |
| 20 | import uk.ac.ox.cs.rsacomb.suffix.Nth | 20 | import uk.ac.ox.cs.rsacomb.suffix.Nth |
| 21 | import uk.ac.ox.cs.rsacomb.implicits.RSAAtom | ||
| 22 | 21 | ||
| 23 | /** A collection of helper methods for RDFox */ | 22 | /** A collection of helper methods for RDFox */ |
| 24 | object RDFoxUtil extends RSAAtom { | 23 | object RDFoxUtil { |
| 25 | 24 | ||
| 26 | /** Simplify conversion between Java and Scala `List`s */ | 25 | /** Simplify conversion between Java and Scala `List`s */ |
| 27 | import uk.ac.ox.cs.rsacomb.implicits.JavaCollections._ | 26 | import uk.ac.ox.cs.rsacomb.implicits.JavaCollections._ |
| @@ -29,7 +28,7 @@ object RDFoxUtil extends RSAAtom { | |||
| 29 | /** Extends capabilities of | 28 | /** Extends capabilities of |
| 30 | * [[tech.oxfordsemantic.jrdfox.logic.datalog.TupleTableAtom TupleTableAtom]]. | 29 | * [[tech.oxfordsemantic.jrdfox.logic.datalog.TupleTableAtom TupleTableAtom]]. |
| 31 | */ | 30 | */ |
| 32 | //import uk.ac.ox.cs.rsacomb.implicits.RSAAtom._ | 31 | import uk.ac.ox.cs.rsacomb.implicits.RSAAtom._ |
| 33 | 32 | ||
| 34 | /** Type alias for a collection of answers to a | 33 | /** Type alias for a collection of answers to a |
| 35 | * [[tech.oxfordsemantic.jrdfox.logic.sparql.statement.Query]]. | 34 | * [[tech.oxfordsemantic.jrdfox.logic.sparql.statement.Query]]. |
