diff options
| author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-09-22 19:32:26 +0200 |
|---|---|---|
| committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-09-22 19:46:48 +0200 |
| commit | 82b47e5601c063251e7388cdc71358bec81ce534 (patch) | |
| tree | 472ef46d8088a85fe27f591586cbc4f8ad8bc8dc | |
| parent | 76287688a368174790e320ce4150f28939233216 (diff) | |
| download | RSAComb-82b47e5601c063251e7388cdc71358bec81ce534.tar.gz RSAComb-82b47e5601c063251e7388cdc71358bec81ce534.zip | |
Add method to compute the set of individuals in an input ontology
| -rw-r--r-- | examples/example1.owl | 2 | ||||
| -rw-r--r-- | src/main/scala/rsacomb/RSAOntology.scala | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/examples/example1.owl b/examples/example1.owl index 88de981..75a464e 100644 --- a/examples/example1.owl +++ b/examples/example1.owl | |||
| @@ -77,4 +77,4 @@ | |||
| 77 | <rdfs:subPropertyOf rdf:resource="#T" /> | 77 | <rdfs:subPropertyOf rdf:resource="#T" /> |
| 78 | </owl:ObjectProperty> | 78 | </owl:ObjectProperty> |
| 79 | 79 | ||
| 80 | </rdf:RDF> \ No newline at end of file | 80 | </rdf:RDF> |
diff --git a/src/main/scala/rsacomb/RSAOntology.scala b/src/main/scala/rsacomb/RSAOntology.scala index 309106a..4b872e5 100644 --- a/src/main/scala/rsacomb/RSAOntology.scala +++ b/src/main/scala/rsacomb/RSAOntology.scala | |||
| @@ -33,8 +33,12 @@ trait RSAOntology { | |||
| 33 | /* TDOO: implement method to retrieve all ontology named individuals | 33 | /* TDOO: implement method to retrieve all ontology named individuals |
| 34 | */ | 34 | */ |
| 35 | lazy val individuals: List[IRI] = { | 35 | lazy val individuals: List[IRI] = { |
| 36 | //ontology.getIndividualsInSignature().asScala.map(_.getIRI).toList | 36 | ontology |
| 37 | List() | 37 | .getIndividualsInSignature() |
| 38 | .asScala | ||
| 39 | .map(_.getIRI) | ||
| 40 | .map(RDFoxUtil.owlapi2rdfox) | ||
| 41 | .toList | ||
| 38 | } | 42 | } |
| 39 | 43 | ||
| 40 | /* Steps for RSA check | 44 | /* Steps for RSA check |
| @@ -197,7 +201,7 @@ trait RSAOntology { | |||
| 197 | } | 201 | } |
| 198 | 202 | ||
| 199 | def filteringProgram(query: Query): List[Rule] = | 203 | def filteringProgram(query: Query): List[Rule] = |
| 200 | FilteringProgram(query, List()).rules | 204 | FilteringProgram(query, individuals).rules |
| 201 | 205 | ||
| 202 | } // implicit class RSAOntology | 206 | } // implicit class RSAOntology |
| 203 | 207 | ||
