Examples of Identification


Examples of com.compomics.util.experiment.identification.Identification

                                    geneFactory.initialize(geneMappingsFile, null);
                                    goFactory.initialize(goMappingsFile, progressDialog);

                                    PSParameter psParameter = new PSParameter();

                                    Identification identification = peptideShakerGUI.getIdentification();
                                    identification.loadProteinMatchParameters(psParameter, null);

                                    progressDialog.setTitle("Getting GO Mappings (2/3). Please Wait...");
                                    progressDialog.setPrimaryProgressCounterIndeterminate(false);
                                    progressDialog.setMaxPrimaryProgressCounter(identification.getProteinIdentification().size());
                                    progressDialog.setValue(0);
                                    int totalNumberOfGoMappedProteinsInProject = 0;

                                    for (String proteinKey : identification.getProteinIdentification()) {

                                        psParameter = (PSParameter) peptideShakerGUI.getIdentification().getProteinMatchParameter(proteinKey, psParameter);

                                        if (psParameter.getMatchValidationLevel().isValidated() && !ProteinMatch.isDecoy(proteinKey) && !psParameter.isHidden()) {
                                            ArrayList<String> goTerms = goFactory.getProteinGoAccessions(proteinKey);
View Full Code Here

Examples of com.crawljax.core.state.Identification

      // value combination
      candidateElements =
              formHandler.getCandidateElementsForInputs(sourceElement, eventableCondition);
    } else {
      // just add default element
      candidateElements.add(new CandidateElement(sourceElement, new Identification(
              Identification.How.xpath, xpath), relatedFrame));
    }

    for (CandidateElement candidateElement : candidateElements) {
      if (!clickOnce || checkedElements.markChecked(candidateElement)) {
View Full Code Here

Examples of com.crawljax.core.state.Identification

    String newXPath = new ElementResolver(eventable, browser).resolve();
    if (newXPath != null && !xpath.equals(newXPath)) {
      LOG.debug("XPath changed from {} to {} relatedFrame: {}", xpath, newXPath,
              eventable.getRelatedFrame());
      eventToFire =
              new Eventable(new Identification(Identification.How.xpath, newXPath),
                      eventType);
    }
    return eventToFire;
  }
View Full Code Here

Examples of com.crawljax.core.state.Identification

    String newXPath = new ElementResolver(eventable, browser).resolve();
    if (newXPath != null && !xpath.equals(newXPath)) {
      LOG.debug("XPath changed from {} to {} relatedFrame: {}", xpath, newXPath,
              eventable.getRelatedFrame());
      eventToFire =
              new Eventable(new Identification(Identification.How.xpath, newXPath),
                      eventType);
    }
    return eventToFire;
  }
View Full Code Here

Examples of com.crawljax.core.state.Identification

  }

  private static void addWaitConditions(CrawljaxConfigurationBuilder crawler) {
    crawler.crawlRules().addWaitCondition(
            new WaitCondition("testWaitCondition.html", 2000, new ExpectedVisibleCondition(
                    new Identification(How.id, "SLOW_WIDGET"))));
  }
View Full Code Here

Examples of com.crawljax.core.state.Identification

    when(index.getName()).thenReturn("Index");
    when(target.getId()).thenReturn(2);
    when(target.getName()).thenReturn("State 2");

    when(eventToTransferToTarget.getIdentification()).thenReturn(
            new Identification(How.name, "//DIV[@id='click]"));
    when(eventToTransferToTarget.getRelatedFrame()).thenReturn("");
    when(eventToTransferToTarget.getSourceStateVertex()).thenReturn(index);
    when(eventToTransferToTarget.getTargetStateVertex()).thenReturn(target);
    when(eventToTransferToTarget.getRelatedFormInputs()).thenReturn(
            new CopyOnWriteArrayList<FormInput>());
View Full Code Here

Examples of com.crawljax.core.state.Identification

   * @throws Exception
   */
  private Identification getIdentification(Node element) throws Exception {
    NamedNodeMap attributes = element.getAttributes();
    if (attributes.getNamedItem("id") != null) {
      return new Identification(Identification.How.id, attributes.getNamedItem("id")
              .getNodeValue());
    } else if (attributes.getNamedItem("name") != null) {
      return new Identification(Identification.How.name, attributes.getNamedItem("name")
              .getNodeValue());
    }

    // try to find the xpath
    String xpathExpr = XPathHelper.getXPathExpression(element);
    if (xpathExpr != null && !xpathExpr.equals("")) {
      return new Identification(Identification.How.xpath, xpathExpr);
    }

    return null;
  }
View Full Code Here

Examples of com.crawljax.core.state.Identification

          int indexValue) {
    return getFormInput(browser, element, indexValue);
  }

  private FormInput getFormInput(EmbeddedBrowser browser, Node element, int indexValue) {
    Identification identification;
    try {
      identification = getIdentification(element);
      if (identification == null) {
        return null;
      }
    } catch (Exception e) {
      return null;
    }
    // CHECK
    String id = fieldMatches(identification.getValue());
    FormInput input = new FormInput();
    input.setType(getElementType(element));
    input.setIdentification(identification);
    Set<InputValue> values = new HashSet<InputValue>();
View Full Code Here

Examples of com.crawljax.core.state.Identification

      // value combination
      candidateElements =
              formHandler.getCandidateElementsForInputs(sourceElement, eventableCondition);
    } else {
      // just add default element
      candidateElements.add(new CandidateElement(sourceElement, new Identification(
              Identification.How.xpath, xpath), relatedFrame));
    }

    for (CandidateElement candidateElement : candidateElements) {
      if (!clickOnce || checkedElements.markChecked(candidateElement)) {
View Full Code Here

Examples of com.crawljax.core.state.Identification

    String newXPath = new ElementResolver(eventable, browser).resolve();
    if (newXPath != null && !xpath.equals(newXPath)) {
      LOG.debug("XPath changed from {} to {} relatedFrame: {}", xpath, newXPath,
              eventable.getRelatedFrame());
      eventToFire =
              new Eventable(new Identification(Identification.How.xpath, newXPath),
                      eventType);
    }
    return eventToFire;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.