public AnticipateOntologyIdPage(OWLEditorKit owlEditorKit) { super(ID, "Import verification", owlEditorKit); checker = () -> checkImport(); }
public void run() { getWizard().setCurrentPanel(getNextPanelDescriptor()); } });
public Object getNextPanelDescriptor() { return needsImportPage() ? SelectImportLocationPage.ID : ImportConfirmationPage.ID; }
public void displayingPanel() { getWizard().setNextFinishButtonEnabled(false); Thread t = new Thread(checker); t.start(); } }
public OntologyImportWizard(Frame owner, OWLEditorKit owlEditorKit) { super(owner); setTitle("Import ontology wizard"); registerWizardPanel(ImportTypePage.ID, new ImportTypePage(owlEditorKit)); registerWizardPanel(LocalFilePage.ID, new LocalFilePage(owlEditorKit)); registerWizardPanel(URLPage.ID, new URLPage(owlEditorKit)); registerWizardPanel(LoadedOntologyPage.ID, new LoadedOntologyPage(owlEditorKit)); registerWizardPanel(AnticipateOntologyIdPage.ID, new AnticipateOntologyIdPage(owlEditorKit)); registerWizardPanel(SelectImportLocationPage.ID, new SelectImportLocationPage(owlEditorKit)); registerWizardPanel(ImportConfirmationPage.ID, new ImportConfirmationPage(owlEditorKit)); setCurrentPanel(ImportTypePage.ID); }
public void displayingPanel() { getWizard().setNextFinishButtonEnabled(false); Thread t = new Thread(checker); t.start(); } }
public OntologyImportWizard(Frame owner, OWLEditorKit owlEditorKit) { super(owner); setTitle("Import ontology wizard"); registerWizardPanel(ImportTypePage.ID, new ImportTypePage(owlEditorKit)); registerWizardPanel(LocalFilePage.ID, new LocalFilePage(owlEditorKit)); registerWizardPanel(URLPage.ID, new URLPage(owlEditorKit)); registerWizardPanel(LoadedOntologyPage.ID, new LoadedOntologyPage(owlEditorKit)); registerWizardPanel(LibraryPage.ID, new LibraryPage(owlEditorKit)); registerWizardPanel(AnticipateOntologyIdPage.ID, new AnticipateOntologyIdPage(owlEditorKit)); registerWizardPanel(SelectImportLocationPage.ID, new SelectImportLocationPage(owlEditorKit)); registerWizardPanel(ImportConfirmationPage.ID, new ImportConfirmationPage(owlEditorKit)); setCurrentPanel(ImportTypePage.ID); }
public void run() { getWizard().setCurrentPanel(getNextPanelDescriptor()); } });
public void displayingPanel() { getWizard().setNextFinishButtonEnabled(false); Thread t = new Thread(checker); t.start(); } }
public OntologyImportWizard(Frame owner, OWLEditorKit owlEditorKit) { super(owner); setTitle("Import ontology wizard"); registerWizardPanel(ImportTypePage.ID, new ImportTypePage(owlEditorKit)); registerWizardPanel(LocalFilePage.ID, new LocalFilePage(owlEditorKit)); registerWizardPanel(URLPage.ID, new URLPage(owlEditorKit)); registerWizardPanel(LoadedOntologyPage.ID, new LoadedOntologyPage(owlEditorKit)); registerWizardPanel(LibraryPage.ID, new LibraryPage(owlEditorKit)); registerWizardPanel(AnticipateOntologyIdPage.ID, new AnticipateOntologyIdPage(owlEditorKit)); registerWizardPanel(SelectImportLocationPage.ID, new SelectImportLocationPage(owlEditorKit)); registerWizardPanel(ImportConfirmationPage.ID, new ImportConfirmationPage(owlEditorKit)); setCurrentPanel(ImportTypePage.ID); }
public AnticipateOntologyIdPage(OWLEditorKit owlEditorKit) { super(ID, "Import verification", owlEditorKit); checker = () -> checkImport(); }
public Object getNextPanelDescriptor() { return needsImportPage() ? SelectImportLocationPage.ID : ImportConfirmationPage.ID; }
protected void checkImport() { for (ImportInfo parameters : ((OntologyImportWizard) getWizard()).getImports()) { if (parameters.getOntologyID() != null) { continue; } try { MasterOntologyIDExtractor extractor = new MasterOntologyIDExtractor(); Optional<OWLOntologyID> id = extractor.getOntologyId(parameters.getPhysicalLocation()); if (id.isPresent()) { parameters.setOntologyID(id.get()); } else { parameters.setOntologyID(null); } } catch (Throwable t) { LoggerFactory.getLogger(AnticipateOntologyIdPage.class) .error("An error occurred whilst extracting the Ontology Id from the imported ontology: {}", t); } } SwingUtilities.invokeLater(() -> { getWizard().setCurrentPanel(getNextPanelDescriptor()); }); }
public void displayingPanel() { getWizard().setNextFinishButtonEnabled(false); Thread t = new Thread(checker); t.start(); } }
public OntologyImportWizard(Frame owner, OWLEditorKit owlEditorKit) { super(owner); setTitle("Import ontology wizard"); registerWizardPanel(ImportTypePage.ID, new ImportTypePage(owlEditorKit)); registerWizardPanel(LocalFilePage.ID, new LocalFilePage(owlEditorKit)); registerWizardPanel(URLPage.ID, new URLPage(owlEditorKit)); registerWizardPanel(LoadedOntologyPage.ID, new LoadedOntologyPage(owlEditorKit)); registerWizardPanel(LibraryPage.ID, new LibraryPage(owlEditorKit)); registerWizardPanel(AnticipateOntologyIdPage.ID, new AnticipateOntologyIdPage(owlEditorKit)); registerWizardPanel(SelectImportLocationPage.ID, new SelectImportLocationPage(owlEditorKit)); registerWizardPanel(ImportConfirmationPage.ID, new ImportConfirmationPage(owlEditorKit)); setCurrentPanel(ImportTypePage.ID); }
public void run() { checkImport(); } };
public Object getNextPanelDescriptor() { return needsImportPage() ? SelectImportLocationPage.ID : ImportConfirmationPage.ID; }
protected void checkImport() { for (ImportInfo parameters : ((OntologyImportWizard) getWizard()).getImports()) { if (parameters.getOntologyID() != null) { continue; } try { MasterOntologyIDExtractor extractor = new MasterOntologyIDExtractor(); Optional<OWLOntologyID> id = extractor.getOntologyId(parameters.getPhysicalLocation()); if (id.isPresent()) { parameters.setOntologyID(id.get()); } else { parameters.setOntologyID(null); } } catch (Throwable t) { LoggerFactory.getLogger(AnticipateOntologyIdPage.class) .error("An error occurred whilst extracting the Ontology Id from the imported ontology: {}", t); } } SwingUtilities.invokeLater(() -> { getWizard().setCurrentPanel(getNextPanelDescriptor()); }); }
private boolean needsImportPage() { OntologyImportWizard wizard = (OntologyImportWizard) getWizard(); Set<ImportInfo> imports = wizard.getImports(); if (imports == null || imports.size() != 1) { /* size > 1 means we are in the library imports - no manual step */
public void run() { checkImport(); } };