Example #1
0
  private void RunAllQueriesBtnMouseClicked(
      java.awt.event.MouseEvent evt) { // GEN-FIRST:event_RunAllQueriesBtnMouseClicked
    // TODO add your handling code here:

    qThread = new PBVCPluginQueryThread(this, "", queryList, owlModel);
    Thread qthr = new Thread(qThread);
    qthr.start();
  } // GEN-LAST:event_RunAllQueriesBtnMouseClicked
Example #2
0
  private void RunThisQueryBtnMouseClicked(
      java.awt.event.MouseEvent evt) { // GEN-FIRST:event_RunThisQueryBtnMouseClicked
    // TODO add your handling code here:
    qThread =
        new PBVCPluginQueryThread(
            this, QueriesCmb.getSelectedItem().toString(), SparqlTxtArea.getText(), owlModel);
    Thread qthr = new Thread(qThread);
    qthr.start();

    RunThisQueryBtn.setEnabled(false);
  } // GEN-LAST:event_RunThisQueryBtnMouseClicked
  public void test_getTagsFolder() {

    try {
      Thread.sleep(2000);
    } catch (InterruptedException e1) {

      e1.printStackTrace();
    }

    String response_body = "";
    HttpMethod get_col_tags =
        new GetMethod(
            SLING_URL + COLLECTION_URL + slug + "/" + TAGS_FOLDER + "/" + "sling:resourceType");
    try {
      client.executeMethod(get_col_tags);
    } catch (HttpException e) {

      e.printStackTrace();
    } catch (IOException e) {

      e.printStackTrace();
    }

    try {
      response_body = get_col_tags.getResponseBodyAsString();
    } catch (IOException e) {

      e.printStackTrace();
    }

    assertEquals(response_body, TAGS_RESOURCE_TYPE);
    get_col_tags.releaseConnection();
  }
  public void test_getContentsFolder() {

    try {
      Thread.sleep(2000);
    } catch (InterruptedException e1) {

      e1.printStackTrace();
    }

    // Get the content
    HttpMethod get_col_contents =
        new GetMethod(
            SLING_URL + COLLECTION_URL + slug + "/" + CONTENTS_FOLDER + "/" + "sling:resourceType");
    try {
      client.executeMethod(get_col_contents);
    } catch (HttpException e) {

      e.printStackTrace();
    } catch (IOException e) {

      e.printStackTrace();
    }
    // handle response.
    String response_body = "";
    try {
      response_body = get_col_contents.getResponseBodyAsString();
    } catch (IOException e) {

      e.printStackTrace();
    }

    assertEquals(response_body, CONTENTS_RESOURCE_TYPE);
  }