Gets all interactions in a match.
@param match match to search
@return all interaction in the match
961923
private static Set<Interaction> getInter(Match match)
	{
		Set<Interaction> set = new HashSet<Interaction>();
		for (BioPAXElement ele : match.getVariables())
		{
			if (ele instanceof Interaction) 
			{
				set.add((Interaction) ele);
				addControlsRecursive((Interaction) ele, set);
			}
		}
		return set;
	}
411329
function(matches)
        {
            // Optimized by Jose Prado (http://joseprado.com)
            for (var i = 0; i < matches.length; i++)
            {
                if (matches[i] === null)
                    continue;

                var itemI = matches[i],
                    itemIEndPos = itemI.index + itemI.length
                    ;

                for (var j = i + 1; j < matches.length && matches[i] !== null; j++)
                {
                    var itemJ = matches[j];

                    if (itemJ === null)
                        continue;
                    else if (itemJ.index > itemIEndPos)
                        break;
                    else if (itemJ.index == itemI.index && itemJ.length > itemI.length)
                        matches[i] = null;
                    else if (itemJ.index >= itemI.index && itemJ.index < itemIEndPos)
                        matches[j] = null;
                }
            }

            return matches;
        }
1367811
private List<Rule> match(final RuleSet ruleSet, final OgnlContext ognlContext) throws OgnlException
	{
		log.debug("Assessing input for ruleset : " + ruleSet.id);

		//run the input commands
		ruleSet.runInput(ognlContext);

		final List<Rule> ret = new ArrayList<>();

		//assess each rule against the input, return any that match
		for (Rule rule : ruleSet.rules)
		{
			Boolean bresult = rule.assessMatch(ognlContext);

			if (bresult)
			{
				log.debug(rule.condition.getOriginalExpression() + " matches");
				ret.add(rule);
			}
		}

		return ret;
	}
638227
public ENTITY findOne(Match... matches) {
        List<ENTITY> os = find(Arrays.asList(matches), null, 0, 1);
        if (os == null || os.size() == 0) {
            return null;
        }
        return os.get(0);
    }
99341
public List<ENTITY> findIncludeColumns(Collection<String> includeColumns, Match... matches) {
        return findColumns(Arrays.asList(matches), includeColumns.toArray(new String[includeColumns.size()]));
    }
969496
public static final Predicate<String> anyCharMatches(final CharMatcher matcher) {
    return new Predicate<String>() {
      @Override
      public boolean apply(@Nullable final String input) {
        return matcher.matchesAnyOf(input);
      }
    };
  }
899719
@GET
    @Path("/{interaction}/interactors")
    public Response getInteractorsByInteractionId(@PathParam("interaction") String interaction,
                                                  @DefaultValue("interactorA,interactorB") @QueryParam("include") String include) {
        try {
            parseQueryParams();
            ProteinProteinInteractionDBAdaptor ppiDBAdaptor =
                    dbAdaptorFactory.getProteinProteinInteractionDBAdaptor(this.species, this.assembly);
            queryOptions.put("include", "interactorA,interactorB");
            List<Query> queries = createQueries(interaction, ProteinProteinInteractionDBAdaptor.QueryParams.INTERACTOR_A_XREFS.key());
            List<QueryResult> queryResults = ppiDBAdaptor.nativeGet(queries, queryOptions);
            return createOkResponse(queryResults);
        } catch (Exception e) {
            return createErrorResponse(e);
        }
    }
41802
@Override
	public boolean satisfies(Match match, int... ind)
	{
		for (MappedConst mc : con)
		{
			if (mc.satisfies(match, ind)) return true;
		}
		return false;
	}
1155043
public Interactions getInteractions() {
		try {
			if (!isNull(Interactions.KEY_NAME)) {
				Object obj = get(Interactions.KEY_NAME);
				if (obj instanceof JSONArray) {
					Interactions interactions = new Interactions();
					JSONArray interactionsJSONArray = (JSONArray) obj;
					for (int i = 0; i < interactionsJSONArray.length(); i++) {
						Interaction interaction = Interaction.Factory.parseInteraction(interactionsJSONArray.getString(i));
						if (interaction != null) {
							interactions.put(interaction.getId(), interaction);
						} else {
							// This is an unknown Interaction type. Probably for a future SDK version.
						}
					}
					return interactions;
				}
			}
		} catch (JSONException e) {
			ApptentiveLog.w(INTERACTIONS, e, "Unable to load Interactions from InteractionManifest.");
			logException(e);
		}
		return null;
	}
1160620
public Map<String, List<V>> materializeMatch(Map<String, List<EventId>> match) {
		Map<String, List<V>> materializedMatch = new LinkedHashMap<>(match.size());

		for (Map.Entry<String, List<EventId>> pattern : match.entrySet()) {
			List<V> events = new ArrayList<>(pattern.getValue().size());
			for (EventId eventId : pattern.getValue()) {
				try {
					V event = sharedBuffer.getEvent(eventId).getElement();
					events.add(event);
				} catch (Exception ex) {
					throw new WrappingRuntimeException(ex);
				}
			}
			materializedMatch.put(pattern.getKey(), events);
		}

		return materializedMatch;
	}
272441
private function getActionFromDynamicMatch($match)
    {
        if (array_key_exists("action", $match["params"])) {
            return $this->getActionFromParam($match["params"]["action"]);
        }

        if (array_key_exists("controller", $match["params"]) && !array_key_exists("action", $match["params"])) {
            return "index";
        }

        return "noActionMatch";
    }
608897
public Query getDeleteQuery(Match... matches) {
        StringBuilder sb = new StringBuilder(100);
        List<Object> params = new ArrayList<Object>(matches.length);

        sb.append("delete from ").append(dao.getTableName());
        appendQuerytoSQL(Arrays.asList(matches), sb, params);

        return new Query(sb.toString(), params);
    }
305771
def interaction_actions(self):
        
        r = self.session.query(distinct(models.ChemGeneIxnInteractionAction.interaction_action)).all()
        return [x[0] for x in r]
1093886
public R getMatch() {
    for (Pattern<T, R> pattern : patterns) {
      if (pattern.matches(value)) {
        return pattern.apply(value);
      }
    }

    throw new MatchException("No match found for " + value);
  }
104957
public static boolean matches(Pattern patternMatcher, Object... elements)
    {
        if (patternMatcher == null) {
            return true;
        }

        for (Object element : elements) {
            if (matches(patternMatcher, element)) {
                return true;
            }
        }

        return false;
    }
116162
@Override
	public boolean satisfies(Match match, int... ind)
	{
		return ids.contains(match.get(ind[0]).getUri());
	}
1226430
@Override
    public final MatchResult matches(final List<String> lines) {
        for (int i = 0; i < lines.size(); i++) {
            if (matches(i + 1, lines.get(i))) return new MatchResult(true, this, i);
        }
        return NO_MATCH;
    }