Changeset 454
- Timestamp:
- 05/17/11 22:29:59 (2 years ago)
- Location:
- trunk/ontoCAT/src/uk/ac/ebi/ontocat/file
- Files:
-
- 1 deleted
- 1 edited
-
FixBrokenObjectPropertiesIRIStrategy.java (deleted)
-
ReasonedFileOntologyService.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ontoCAT/src/uk/ac/ebi/ontocat/file/ReasonedFileOntologyService.java
r450 r454 23 23 import org.semanticweb.owlapi.model.OWLObjectProperty; 24 24 import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; 25 import org.semanticweb.owlapi.model.OWLOntology;26 25 import org.semanticweb.owlapi.reasoner.OWLReasoner; 27 26 import org.semanticweb.owlapi.reasoner.OWLReasonerFactory; 28 import org.semanticweb.owlapi.util.OWLEntityURIConverter;29 27 30 28 import uk.ac.ebi.ontocat.OntologyService; … … 97 95 } 98 96 99 // FIXME: Apply the URI conversion strategy to fix 100 // the OWL API 3.2.2 object property issue 101 // this fixes the uris and merges the duplicated 102 // object properties 97 // FIXME: fix for OWL API 3.2.2 object property bug 98 // which duplicates object properties by introducing 99 // incorrect URIs in OBOConsumer 100 // this goes through all the properties and removes 101 // the ones that are not used anywhere (duplicates) 103 102 private void fixPropertiesURIs() { 104 Set<OWLOntology> ontologies = new HashSet<OWLOntology>(); 105 ontologies.add(ontology); 106 OWLEntityURIConverter converter = new OWLEntityURIConverter( 107 loader.getManager(), ontologies, 108 new FixBrokenObjectPropertiesIRIStrategy()); 109 loader.getManager().applyChanges(converter.getChanges()); 103 for (OWLObjectProperty prop : ontology.getObjectPropertiesInSignature()) { 104 if (prop.getReferencingAxioms(ontology).size() == 1) { 105 loader.getManager().removeAxiom( 106 ontology, 107 loader.getManager().getOWLDataFactory() 108 .getOWLDeclarationAxiom(prop)); 109 } 110 } 110 111 } 111 112
Note: See TracChangeset
for help on using the changeset viewer.