Skip to content

Commit

Permalink
remove functional check; done via EntitySearcher.isFunctional() instead
Browse files Browse the repository at this point in the history
  • Loading branch information
cweedall committed May 7, 2024
1 parent 7e5b8cd commit f4a4309
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/main/java/edu/isi/oba/MapperSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,10 @@ private Map<String, Schema> getDataProperties() {
}

if (inspect) {
Boolean isFunctional = false;
boolean isFunctional = EntitySearcher.isFunctional(odp, this.ontologies.stream());

for (OWLOntology ontology: this.ontologies) {
ranges.addAll(ontology.getDataPropertyRangeAxioms(odp));
functional = ontology.getAxioms(AxiomType.FUNCTIONAL_DATA_PROPERTY);
for (OWLFunctionalDataPropertyAxiom functionalAxiom:functional) {
if (functionalAxiom.getProperty().equals(odp)) {
isFunctional = true;
}
}
}

if (ranges.isEmpty()) {
Expand Down Expand Up @@ -321,17 +316,11 @@ private Map<String, Schema> getObjectProperties() {
}

if (inspect) {
Boolean isFunctional = false;
boolean isFunctional = EntitySearcher.isFunctional(odp, this.ontologies.stream());

Set<OWLObjectPropertyRangeAxiom> ranges = new HashSet<>();
for (OWLOntology ontology: this.ontologies) {
ranges.addAll(ontology.getObjectPropertyRangeAxioms(odp));

functional = ontology.getAxioms(AxiomType.FUNCTIONAL_OBJECT_PROPERTY);
for (OWLFunctionalObjectPropertyAxiom functionalAxiom:functional) {
if (functionalAxiom.getProperty().equals(odp)) {
isFunctional = true;
}
}
}

if (ranges.isEmpty()) {
Expand Down

0 comments on commit f4a4309

Please sign in to comment.