diff options
Diffstat (limited to 'src/main/scala/rsacomb/RSA.scala')
| -rw-r--r-- | src/main/scala/rsacomb/RSA.scala | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main/scala/rsacomb/RSA.scala b/src/main/scala/rsacomb/RSA.scala index 79617c7..c0d4e51 100644 --- a/src/main/scala/rsacomb/RSA.scala +++ b/src/main/scala/rsacomb/RSA.scala | |||
| @@ -8,6 +8,18 @@ import tech.oxfordsemantic.jrdfox.Prefixes | |||
| 8 | import tech.oxfordsemantic.jrdfox.logic.IRI | 8 | import tech.oxfordsemantic.jrdfox.logic.IRI |
| 9 | import org.semanticweb.owlapi.apibinding.OWLManager | 9 | import org.semanticweb.owlapi.apibinding.OWLManager |
| 10 | import org.semanticweb.owlapi.model.OWLOntology | 10 | import org.semanticweb.owlapi.model.OWLOntology |
| 11 | import rsacomb.RSAOntology | ||
| 12 | |||
| 13 | // Debug only | ||
| 14 | import tech.oxfordsemantic.jrdfox.logic.{ | ||
| 15 | Formula, | ||
| 16 | Atom, | ||
| 17 | Variable, | ||
| 18 | Query, | ||
| 19 | QueryType, | ||
| 20 | Conjunction | ||
| 21 | } | ||
| 22 | import scala.collection.JavaConverters._ | ||
| 11 | 23 | ||
| 12 | object RSA extends RSAOntology { | 24 | object RSA extends RSAOntology { |
| 13 | 25 | ||
| @@ -18,6 +30,18 @@ object RSA extends RSAOntology { | |||
| 18 | Prefixes.declarePrefix("rdfs:", "http://www.w3.org/2000/01/rdf-schema#") | 30 | Prefixes.declarePrefix("rdfs:", "http://www.w3.org/2000/01/rdf-schema#") |
| 19 | Prefixes.declarePrefix("owl:", "http://www.w3.org/2002/07/owl#") | 31 | Prefixes.declarePrefix("owl:", "http://www.w3.org/2002/07/owl#") |
| 20 | 32 | ||
| 33 | val varX = Variable.create("X") | ||
| 34 | val varY = Variable.create("Y") | ||
| 35 | val varZ = Variable.create("Z") | ||
| 36 | val testAnswerVars = List[Variable](varX, varY, varZ).asJava; | ||
| 37 | val testFormula: Formula = | ||
| 38 | Conjunction.create( | ||
| 39 | Atom.rdf(varX, IRI.TOP_OBJECT_PROPERTY, varY), | ||
| 40 | Atom.rdf(varY, IRI.TOP_OBJECT_PROPERTY, varZ) | ||
| 41 | ) | ||
| 42 | val test_query = | ||
| 43 | Query.create(QueryType.SELECT, false, testAnswerVars, testFormula) | ||
| 44 | |||
| 21 | def internal(name: String): IRI = | 45 | def internal(name: String): IRI = |
| 22 | IRI.create( | 46 | IRI.create( |
| 23 | Prefixes.getPrefixIRIsByPrefixName.get("internal:").getIRI + name | 47 | Prefixes.getPrefixIRIsByPrefixName.get("internal:").getIRI + name |
