diff options
Diffstat (limited to 'src/main/scala/rsacomb/RSAOntology.scala')
| -rw-r--r-- | src/main/scala/rsacomb/RSAOntology.scala | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/main/scala/rsacomb/RSAOntology.scala b/src/main/scala/rsacomb/RSAOntology.scala index 52e13e6..78460ff 100644 --- a/src/main/scala/rsacomb/RSAOntology.scala +++ b/src/main/scala/rsacomb/RSAOntology.scala | |||
| @@ -233,7 +233,7 @@ trait RSAOntology { | |||
| 233 | private def rsaGraph( | 233 | private def rsaGraph( |
| 234 | data: DataStoreConnection | 234 | data: DataStoreConnection |
| 235 | ): Graph[Resource, UnDiEdge] = { | 235 | ): Graph[Resource, UnDiEdge] = { |
| 236 | val query = "SELECT ?X ?Y WHERE { ?X internal:E ?Y }" | 236 | val query = "SELECT ?X ?Y WHERE { ?X rsa:E ?Y }" |
| 237 | val cursor = | 237 | val cursor = |
| 238 | data.createCursor(RSA.Prefixes, query, new HashMap[String, String]()); | 238 | data.createCursor(RSA.Prefixes, query, new HashMap[String, String]()); |
| 239 | var mul = cursor.open() | 239 | var mul = cursor.open() |
| @@ -280,8 +280,8 @@ trait RSAOntology { | |||
| 280 | val role = axiom.objectPropertyExpressionsInSignature(0) | 280 | val role = axiom.objectPropertyExpressionsInSignature(0) |
| 281 | if (this.confl(role).contains(role)) { | 281 | if (this.confl(role).contains(role)) { |
| 282 | Set( | 282 | Set( |
| 283 | RSA.internal("v0_" ++ RSA.hashed(axiom)), | 283 | RSA.rsa("v0_" ++ RSA.hashed(axiom)), |
| 284 | RSA.internal("v1_" ++ RSA.hashed(axiom)) | 284 | RSA.rsa("v1_" ++ RSA.hashed(axiom)) |
| 285 | ) | 285 | ) |
| 286 | } else { | 286 | } else { |
| 287 | Set() | 287 | Set() |
| @@ -308,9 +308,9 @@ trait RSAOntology { | |||
| 308 | // if conflR.contains(roleS) | 308 | // if conflR.contains(roleS) |
| 309 | // individual = | 309 | // individual = |
| 310 | // if (axiom.hashCode < axiom1.hashCode) { | 310 | // if (axiom.hashCode < axiom1.hashCode) { |
| 311 | // RSA.internal("v0_" ++ axiom1.hashCode.toString()) | 311 | // RSA.rsa("v0_" ++ axiom1.hashCode.toString()) |
| 312 | // } else { | 312 | // } else { |
| 313 | // RSA.internal("v1_" ++ axiom1.hashCode.toString()) | 313 | // RSA.rsa("v1_" ++ axiom1.hashCode.toString()) |
| 314 | // } | 314 | // } |
| 315 | // } yield individual | 315 | // } yield individual |
| 316 | // } | 316 | // } |
| @@ -347,11 +347,11 @@ trait RSAOntology { | |||
| 347 | tripleDSC = RSA.hashed(classD, roleS, classC) | 347 | tripleDSC = RSA.hashed(classD, roleS, classC) |
| 348 | individual = | 348 | individual = |
| 349 | if (tripleARB > tripleDSC) { | 349 | if (tripleARB > tripleDSC) { |
| 350 | RSA.internal("v1_" ++ tripleDSC) | 350 | RSA.rsa("v1_" ++ tripleDSC) |
| 351 | } else { | 351 | } else { |
| 352 | // Note that this is also the case for | 352 | // Note that this is also the case for |
| 353 | // `tripleARB == tripleDSC` | 353 | // `tripleARB == tripleDSC` |
| 354 | RSA.internal("v0_" ++ tripleDSC) | 354 | RSA.rsa("v0_" ++ tripleDSC) |
| 355 | } | 355 | } |
| 356 | } yield individual | 356 | } yield individual |
| 357 | } | 357 | } |
| @@ -366,7 +366,7 @@ trait RSAOntology { | |||
| 366 | val named: List[Rule] = | 366 | val named: List[Rule] = |
| 367 | individuals.map(a => | 367 | individuals.map(a => |
| 368 | Rule.create( | 368 | Rule.create( |
| 369 | TupleTableAtom.rdf(a, IRI.RDF_TYPE, RSA.internal("NAMED")) | 369 | TupleTableAtom.rdf(a, IRI.RDF_TYPE, RSA.rsa("NAMED")) |
| 370 | ) | 370 | ) |
| 371 | ) | 371 | ) |
| 372 | 372 | ||
| @@ -539,7 +539,7 @@ trait RSAOntology { | |||
| 539 | private def rules1(axiom: OWLSubClassOfAxiom): List[Rule] = { | 539 | private def rules1(axiom: OWLSubClassOfAxiom): List[Rule] = { |
| 540 | val unfold = ontology.unfold(axiom).toList | 540 | val unfold = ontology.unfold(axiom).toList |
| 541 | // Fresh Variables | 541 | // Fresh Variables |
| 542 | val v0 = RSA.internal("v0_" ++ RSA.hashed(axiom)) | 542 | val v0 = RSA.rsa("v0_" ++ RSA.hashed(axiom)) |
| 543 | val varX = Variable.create("X") | 543 | val varX = Variable.create("X") |
| 544 | // Predicates | 544 | // Predicates |
| 545 | val atomA: TupleTableAtom = { | 545 | val atomA: TupleTableAtom = { |
| @@ -549,8 +549,8 @@ trait RSAOntology { | |||
| 549 | def in(t: Term): TupleTableAtom = { | 549 | def in(t: Term): TupleTableAtom = { |
| 550 | TupleTableAtom.rdf( | 550 | TupleTableAtom.rdf( |
| 551 | t, | 551 | t, |
| 552 | RSA.internal("IN"), | 552 | RSA.rsa("IN"), |
| 553 | RSA.internal(unfold.hashCode.toString) | 553 | RSA.rsa(unfold.hashCode.toString) |
| 554 | ) | 554 | ) |
| 555 | } | 555 | } |
| 556 | def notIn(t: Term): Negation = Negation.create(in(t)) | 556 | def notIn(t: Term): Negation = Negation.create(in(t)) |
| @@ -590,9 +590,9 @@ trait RSAOntology { | |||
| 590 | .getProperty | 590 | .getProperty |
| 591 | if (ontology.confl(roleR) contains roleR) { | 591 | if (ontology.confl(roleR) contains roleR) { |
| 592 | // Fresh Variables | 592 | // Fresh Variables |
| 593 | val v0 = RSA.internal("v0_" ++ RSA.hashed(axiom)) | 593 | val v0 = RSA.rsa("v0_" ++ RSA.hashed(axiom)) |
| 594 | val v1 = RSA.internal("v1_" ++ RSA.hashed(axiom)) | 594 | val v1 = RSA.rsa("v1_" ++ RSA.hashed(axiom)) |
| 595 | val v2 = RSA.internal("v2_" ++ RSA.hashed(axiom)) | 595 | val v2 = RSA.rsa("v2_" ++ RSA.hashed(axiom)) |
| 596 | // Predicates | 596 | // Predicates |
| 597 | def atomA(t: Term): TupleTableAtom = { | 597 | def atomA(t: Term): TupleTableAtom = { |
| 598 | val cls = axiom.getSubClass.asInstanceOf[OWLClass].getIRI | 598 | val cls = axiom.getSubClass.asInstanceOf[OWLClass].getIRI |
| @@ -630,7 +630,7 @@ trait RSAOntology { | |||
| 630 | .asInstanceOf[OWLObjectSomeValuesFrom] | 630 | .asInstanceOf[OWLObjectSomeValuesFrom] |
| 631 | .getProperty | 631 | .getProperty |
| 632 | // Fresh Variables | 632 | // Fresh Variables |
| 633 | val v1 = RSA.internal("v1_" ++ RSA.hashed(axiom)) | 633 | val v1 = RSA.rsa("v1_" ++ RSA.hashed(axiom)) |
| 634 | // Predicates | 634 | // Predicates |
| 635 | def atomA(t: Term): TupleTableAtom = { | 635 | def atomA(t: Term): TupleTableAtom = { |
| 636 | val cls = axiom.getSubClass.asInstanceOf[OWLClass].getIRI | 636 | val cls = axiom.getSubClass.asInstanceOf[OWLClass].getIRI |
