diff options
Diffstat (limited to 'src/main/scala/rsacomb/RSAAxiom.scala')
| -rw-r--r-- | src/main/scala/rsacomb/RSAAxiom.scala | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/scala/rsacomb/RSAAxiom.scala b/src/main/scala/rsacomb/RSAAxiom.scala index 588c72a..9e9a016 100644 --- a/src/main/scala/rsacomb/RSAAxiom.scala +++ b/src/main/scala/rsacomb/RSAAxiom.scala | |||
| @@ -16,9 +16,10 @@ trait RSAAxiom { | |||
| 16 | */ | 16 | */ |
| 17 | private sealed trait RSAAxiomType | 17 | private sealed trait RSAAxiomType |
| 18 | private object RSAAxiomType { | 18 | private object RSAAxiomType { |
| 19 | case object T3 extends RSAAxiomType // ∃R.A ⊑ B | 19 | case object T3 extends RSAAxiomType // ∃R.A ⊑ B |
| 20 | case object T4 extends RSAAxiomType // A ⊑ ≤1R.B | 20 | case object T3top extends RSAAxiomType // ∃R.⊤ ⊑ B |
| 21 | case object T5 extends RSAAxiomType // A ⊑ ∃R.B | 21 | case object T4 extends RSAAxiomType // A ⊑ ≤1R.B |
| 22 | case object T5 extends RSAAxiomType // A ⊑ ∃R.B | ||
| 22 | } | 23 | } |
| 23 | 24 | ||
| 24 | /* Implements additional features on top of `OWLAxiom` from | 25 | /* Implements additional features on top of `OWLAxiom` from |
| @@ -43,6 +44,8 @@ trait RSAAxiom { | |||
| 43 | val sub = axiom.getSubClass().getClassExpressionType() | 44 | val sub = axiom.getSubClass().getClassExpressionType() |
| 44 | val sup = axiom.getSuperClass().getClassExpressionType() | 45 | val sup = axiom.getSuperClass().getClassExpressionType() |
| 45 | t match { | 46 | t match { |
| 47 | case RSAAxiomType.T3top => // ∃R.⊤ ⊑ B | ||
| 48 | axiom.isT5 && axiom.getSubClass().asInstanceOf[OWLObjectSomeValuesFrom].getFiller.isOWLThing | ||
| 46 | case RSAAxiomType.T3 => // ∃R.A ⊑ B | 49 | case RSAAxiomType.T3 => // ∃R.A ⊑ B |
| 47 | sub == ClassExpressionType.OBJECT_SOME_VALUES_FROM && sup == ClassExpressionType.OWL_CLASS | 50 | sub == ClassExpressionType.OBJECT_SOME_VALUES_FROM && sup == ClassExpressionType.OWL_CLASS |
| 48 | case RSAAxiomType.T4 => // A ⊑ ≤1R.B | 51 | case RSAAxiomType.T4 => // A ⊑ ≤1R.B |
| @@ -67,6 +70,7 @@ trait RSAAxiom { | |||
| 67 | } | 70 | } |
| 68 | 71 | ||
| 69 | /* Exposed methods */ | 72 | /* Exposed methods */ |
| 73 | def isT3top: Boolean = isOfType(RSAAxiomType.T3top) | ||
| 70 | def isT3: Boolean = isOfType(RSAAxiomType.T3) | 74 | def isT3: Boolean = isOfType(RSAAxiomType.T3) |
| 71 | def isT4: Boolean = isOfType(RSAAxiomType.T4) | 75 | def isT4: Boolean = isOfType(RSAAxiomType.T4) |
| 72 | def isT5: Boolean = isOfType(RSAAxiomType.T5) | 76 | def isT5: Boolean = isOfType(RSAAxiomType.T5) |
