private void handlePossibleOntologyIdUpdate() { OWLOntologyID id = createOWLOntologyIDFromView(); if (isOntologyIRIChange(id)) { EntityIRIUpdaterOntologyChangeStrategy changeStrategy = new EntityIRIUpdaterOntologyChangeStrategy(); Set<OWLEntity> entities = changeStrategy.getEntitiesToRename(activeOntology(), initialOntologyID, id); if (!entities.isEmpty()) { boolean rename = showConfirmRenameDialog(id, entities); if (rename) { List<OWLOntologyChange> changes = changeStrategy.getChangesForRename(activeOntology(), initialOntologyID, id); System.out.println("Generated " + changes.size() + " changes"); System.out.println("Applying changes..."); getOWLModelManager().applyChanges(changes); System.out.println(" ... applied changes."); initialOntologyID = id; } } } }
private void updateView() { list.setRootObject(new OntologyAnnotationContainer(activeOntology())); updateViewFromModel(); }
private void updateView() { list.setRootObject(new OntologyAnnotationContainer(activeOntology())); updateViewFromModel(); }
private void updateView() { list.setRootObject(new OntologyAnnotationContainer(activeOntology())); updateViewFromModel(); }
/** * Updates the model from the view - unless the changes in the view were triggered by changes in the model. */ private void updateModelFromView() { if (updatingViewFromModel) { return; } try { updatingModelFromView = true; OWLOntologyID id = createOWLOntologyIDFromView(); if (id != null && !activeOntology().getOntologyID().equals(id)) { getOWLModelManager().applyChange(new SetOntologyID(activeOntology(), id)); } } finally { updatingModelFromView = false; } }
private void handlePossibleOntologyIdUpdate() { OWLOntologyID id = createOWLOntologyIDFromView(); if (isOntologyIRIChange(id)) { EntityIRIUpdaterOntologyChangeStrategy changeStrategy = new EntityIRIUpdaterOntologyChangeStrategy(); Set<OWLEntity> entities = changeStrategy.getEntitiesToRename(activeOntology(), initialOntologyID, id); if (!entities.isEmpty()) { boolean rename = showConfirmRenameDialog(id, entities); if (rename) { List<OWLOntologyChange> changes = changeStrategy.getChangesForRename(activeOntology(), initialOntologyID, id); getOWLModelManager().applyChanges(changes); initialOntologyID = id; } } } }
/** * Updates the model from the view - unless the changes in the view were triggered by changes in the model. */ private void updateModelFromView() { if (updatingViewFromModel) { return; } try { updatingModelFromView = true; OWLOntologyID id = createOWLOntologyIDFromView(); if (id != null && !activeOntology().getOntologyID().equals(id)) { getOWLModelManager().applyChange(new SetOntologyID(activeOntology(), id)); } } finally { updatingModelFromView = false; } }
/** * Updates the model from the view - unless the changes in the view were triggered by changes in the model. */ private void updateModelFromView() { if (updatingViewFromModel) { return; } try { updatingModelFromView = true; OWLOntologyID id = createOWLOntologyIDFromView(); if (id != null && !activeOntology().getOntologyID().equals(id)) { getOWLModelManager().applyChange(new SetOntologyID(activeOntology(), id)); } } finally { updatingModelFromView = false; } }
private void handlePossibleOntologyIdUpdate() { OWLOntologyID id = createOWLOntologyIDFromView(); if (isOntologyIRIChange(id)) { EntityIRIUpdaterOntologyChangeStrategy changeStrategy = new EntityIRIUpdaterOntologyChangeStrategy(); Set<OWLEntity> entities = changeStrategy.getEntitiesToRename(activeOntology(), initialOntologyID, id); if (!entities.isEmpty()) { boolean rename = showConfirmRenameDialog(id, entities); if (rename) { List<OWLOntologyChange> changes = changeStrategy.getChangesForRename(activeOntology(), initialOntologyID, id); getOWLModelManager().applyChanges(changes); initialOntologyID = id; } } } }
list.setRootObject(new OntologyAnnotationContainer(activeOntology())); listener = new OWLModelManagerListener() { public void handleChange(OWLModelManagerChangeEvent event) {
list.setRootObject(new OntologyAnnotationContainer(activeOntology())); listener = event -> handleModelManagerChangeEvent(event); getOWLModelManager().addListener(listener);
list.setRootObject(new OntologyAnnotationContainer(activeOntology())); listener = event -> handleModelManagerChangeEvent(event); getOWLModelManager().addListener(listener);