diff options
| author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-11-18 18:07:53 +0000 |
|---|---|---|
| committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-11-18 18:07:53 +0000 |
| commit | 4df351d3b1d11fc045005323c38ba3528de631ea (patch) | |
| tree | 35f809e3def7d55602ed124f7b194db29407ba33 /src/main/scala/rsacomb/RSAAxiom.scala | |
| parent | e1a04294ed8737444e40323474f4084cb64c1d55 (diff) | |
| download | RSAComb-4df351d3b1d11fc045005323c38ba3528de631ea.tar.gz RSAComb-4df351d3b1d11fc045005323c38ba3528de631ea.zip | |
Rework RSA as a utility object
Diffstat (limited to 'src/main/scala/rsacomb/RSAAxiom.scala')
| -rw-r--r-- | src/main/scala/rsacomb/RSAAxiom.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/scala/rsacomb/RSAAxiom.scala b/src/main/scala/rsacomb/RSAAxiom.scala index 3cd9a9d..08de5b7 100644 --- a/src/main/scala/rsacomb/RSAAxiom.scala +++ b/src/main/scala/rsacomb/RSAAxiom.scala | |||
| @@ -38,6 +38,17 @@ trait RSAAxiom { | |||
| 38 | case object T5 extends RSAAxiomType // A ⊑ ∃R.B | 38 | case object T5 extends RSAAxiomType // A ⊑ ∃R.B |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | object RSAAxiom { | ||
| 42 | |||
| 43 | def hashed( | ||
| 44 | cls1: OWLClass, | ||
| 45 | prop: OWLObjectPropertyExpression, | ||
| 46 | cls2: OWLClass | ||
| 47 | ): String = | ||
| 48 | (cls1, prop, cls2).hashCode.toString | ||
| 49 | |||
| 50 | } | ||
| 51 | |||
| 41 | /* Implements additional features on top of `OWLAxiom` from | 52 | /* Implements additional features on top of `OWLAxiom` from |
| 42 | * the OWLAPI. | 53 | * the OWLAPI. |
| 43 | */ | 54 | */ |
| @@ -137,6 +148,8 @@ trait RSAAxiom { | |||
| 137 | } | 148 | } |
| 138 | cls2 <- Some(someValues.getFiller) collect { case a: OWLClass => a } | 149 | cls2 <- Some(someValues.getFiller) collect { case a: OWLClass => a } |
| 139 | } yield (cls1, prop, cls2) | 150 | } yield (cls1, prop, cls2) |
| 151 | |||
| 152 | lazy val hashed: String = (RSAAxiom.hashed _) tupled toTriple.get | ||
| 140 | } | 153 | } |
| 141 | 154 | ||
| 142 | } // trait RSAAxiom | 155 | } // trait RSAAxiom |
