public void actionPerformed(ActionEvent actionEvent) { MinCardiOneReplacer replacer = new MinCardiOneReplacer(getOWLModelManager().getOWLDataFactory()); List<OWLOntologyChange> changes = new ArrayList<>(); int count = 0; for (OWLOntology ont : getOWLModelManager().getActiveOntologies()){ for (OWLAxiom ax : ont.getAxioms()){ if (ax.isLogicalAxiom()){ // duplicates, but switching min 1 with svf OWLAxiom ax2 = replacer.duplicateObject(ax); // so if they are different, the axiom using the svf // needs to replace the axiom using the min 1 in the ontology if (!ax.equals(ax2)){ changes.add(new RemoveAxiom(ont, ax)); changes.add(new AddAxiom(ont, ax2)); count++; } } } } getOWLModelManager().applyChanges(changes); logger.info("Converted " + count + " qualified min 1 restrictions to someValuesFrom restrictions"); }
public void actionPerformed(ActionEvent actionEvent) { MinCardiOneReplacer replacer = new MinCardiOneReplacer(getOWLModelManager().getOWLDataFactory()); List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>(); int count = 0; for (OWLOntology ont : getOWLModelManager().getActiveOntologies()){ for (OWLAxiom ax : ont.getAxioms()){ if (ax.isLogicalAxiom()){ // duplicates, but switching min 1 with svf OWLAxiom ax2 = replacer.duplicateObject(ax); // so if they are different, the axiom using the svf // needs to replace the axiom using the min 1 in the ontology if (!ax.equals(ax2)){ changes.add(new RemoveAxiom(ont, ax)); changes.add(new AddAxiom(ont, ax2)); count++; } } } } getOWLModelManager().applyChanges(changes); logger.info("Converted " + count + " qualified min 1 restrictions to someValuesFrom restrictions"); }
public void actionPerformed(ActionEvent actionEvent) { MinCardiOneReplacer replacer = new MinCardiOneReplacer(getOWLModelManager().getOWLDataFactory()); List<OWLOntologyChange> changes = new ArrayList<>(); int count = 0; for (OWLOntology ont : getOWLModelManager().getActiveOntologies()){ for (OWLAxiom ax : ont.getAxioms()){ if (ax.isLogicalAxiom()){ // duplicates, but switching min 1 with svf OWLAxiom ax2 = replacer.duplicateObject(ax); // so if they are different, the axiom using the svf // needs to replace the axiom using the min 1 in the ontology if (!ax.equals(ax2)){ changes.add(new RemoveAxiom(ont, ax)); changes.add(new AddAxiom(ont, ax2)); count++; } } } } getOWLModelManager().applyChanges(changes); logger.info("Converted " + count + " qualified min 1 restrictions to someValuesFrom restrictions"); }
public void actionPerformed(ActionEvent actionEvent) { MinCardiOneReplacer replacer = new MinCardiOneReplacer(getOWLModelManager().getOWLDataFactory()); List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>(); int count = 0; for (OWLOntology ont : getOWLModelManager().getActiveOntologies()){ for (OWLAxiom ax : ont.getAxioms()){ if (ax.isLogicalAxiom()){ // duplicates, but switching min 1 with svf OWLAxiom ax2 = replacer.duplicateObject(ax); // so if they are different, the axiom using the svf // needs to replace the axiom using the min 1 in the ontology if (!ax.equals(ax2)){ changes.add(new RemoveAxiom(ont, ax)); changes.add(new AddAxiom(ont, ax2)); count++; } } } } getOWLModelManager().applyChanges(changes); logger.info("Converted " + count + " qualified min 1 restrictions to someValuesFrom restrictions"); }