Examples of matched()


Examples of org.apache.uima.ruta.rule.RuleElementMatch.matched()

          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {
    int minValue = min.getIntegerValue(parent, null, stream);
    int maxValue = max.getIntegerValue(parent, null, stream);
    if (matches.size() > 0) {
      RuleElementMatch ruleElementMatch = matches.get(matches.size() - 1);
      if (!ruleElementMatch.matched()) {
        matches.remove(ruleElementMatch);
      }
    }
    int matchedSize = matches.size();
    boolean result = matchedSize >= minValue && matchedSize <= maxValue;
View Full Code Here

Examples of org.apache.uima.ruta.rule.RuleElementMatch.matched()

            nextElement, stream, crowd);
    List<RuleElementMatch> nextList = extendedContainerMatch.getInnerMatches().get(nextElement);
    boolean nextMatched = (nextList != null && !nextList.isEmpty());

    return (matchedSize < maxValue && matchedSize >= minValue && !nextMatched)
            || (!lastMatch.matched() && matchedSize >= minValue && matchedSize <= maxValue && !nextMatched);
  }

  public boolean isOptional(RutaBlock parent, RutaStream stream) {
    int minValue = min.getIntegerValue(parent, null, stream);
    return minValue == 0;
View Full Code Here

Examples of org.docopt.Pattern.MatchResult.matched()

    extras(help, version, $argv, doc);

    final MatchResult m = pattern.fix().match($argv);

    if (m.matched() && m.getLeft().isEmpty()) {
      // @formatter:off
      // >>> return Dict((a.name, a.value) for a in (pattern.flat() + collected))
      // @formatter:on
      final Map<String, Object> u = new HashMap<String, Object>();
View Full Code Here

Examples of org.milyn.rules.RuleEvalResult.matched()

        if(logger.isDebugEnabled()) {
            logger.debug(result);
        }

        if (!result.matched())
        {
            ValidationResult validationResult = getValidationResult(executionContext);
            OnFailResultImpl onFailResult = new OnFailResultImpl();
            onFailResult.setRuleResult(result);
            onFailResult.setBeanContext(executionContext.getBeanContext().getBeanMap());
View Full Code Here

Examples of sunlabs.brazil.util.regexp.Regsub.matched()

        matches++;
        matchList.append(" " + matches);
        if (names != null) {
                  if (!names[0].equals("X")) {
          props.put(name + matches + "." + names[0],
            rs.matched());
      }
        } else {
      props.put(name + matches, rs.matched());
        }
View Full Code Here

Examples of sunlabs.brazil.util.regexp.Regsub.matched()

                  if (!names[0].equals("X")) {
          props.put(name + matches + "." + names[0],
            rs.matched());
      }
        } else {
      props.put(name + matches, rs.matched());
        }

        // use sub-match as an index instead of a number

        String otherKey = null;
View Full Code Here

Examples of sunlabs.brazil.util.regexp.Regsub.matched()

  if ((sort == null) && (reverse == false)) {
      while (st.hasMoreTokens()) {
    if (isRe) {  // previous token
       Regsub rs = ((ReStringTokenizer)st).getRs();
       String matched = rs.matched();
       if (matched != null) {
           local.push(name + ".delim", matched);
           int subs = rs.getRegexp().subspecs();
           for(int i=1; i<subs;i++) {
          String sub = rs.submatch(i);
View Full Code Here

Examples of sunlabs.brazil.util.regexp.Regsub.matched()

       if (all) {    // all matches
           Regsub rs = new Regsub(r, value);
           StringBuffer counter = new StringBuffer();
           while(rs.nextMatch()) {
         matches++;
         props.put(prefix + matches, rs.matched());
         for (int i = 1; i < subMatches; i++) {
             String s = mapTable.length >= i ? mapTable[i-1] : "" + i;
             props.put(prefix + matches + "." + s,
               (rs.submatch(i)==null ? nullStr : rs.submatch(i)));
         }
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.