Esempio n. 1
0
  @Override
  public void actionPerformed(ActionEvent e) {
    JList list = (JList) DIHelper.getInstance().getLocalProp(Constants.REPO_LIST);
    // get the selected repository
    Object[] repos = (Object[]) list.getSelectedValues();

    for (int repoIndex = 0; repoIndex < repos.length; repoIndex++) {
      String repoName = repos[repoIndex] + "";
      IEngine engine = (IEngine) DIHelper.getInstance().getLocalProp(repoName);
      if (engine.isConnected()) {
        logger.info("Attempting to disconnect " + repoName);
        engine.closeDB();
        logger.info("Successfully disconnected " + repoName);
      } else logger.info(" Repository is not connected " + repoName);
    }
  }
Esempio n. 2
0
  @Override
  public void actionPerformed(ActionEvent e) {
    // TODO Auto-generated method stub
    JToggleButton spql = (JToggleButton) DIHelper.getInstance().getLocalProp(Constants.SPARQLBTN);
    JTextArea sparqlArea =
        (JTextArea) DIHelper.getInstance().getLocalProp(Constants.SPARQL_AREA_FIELD);
    JRadioButton rdBtnGraph =
        (JRadioButton) DIHelper.getInstance().getLocalProp(Constants.RADIO_GRAPH);
    JRadioButton rdBtnGrid =
        (JRadioButton) DIHelper.getInstance().getLocalProp(Constants.RADIO_GRID);
    JRadioButton rdBtnRaw = (JRadioButton) DIHelper.getInstance().getLocalProp(Constants.RADIO_RAW);

    if (spql.isSelected()) {
      rdBtnGraph.setEnabled(true);
      rdBtnGrid.setEnabled(true);
      rdBtnRaw.setEnabled(true);
      sparqlArea.setEnabled(true);
    } else {
      rdBtnGraph.setEnabled(false);
      rdBtnGrid.setEnabled(false);
      rdBtnRaw.setEnabled(false);
      sparqlArea.setEnabled(false);
    }
  }