@Override public Boolean apply(final String it) { boolean _and = false; boolean _containsKey = MatchParameterFilter.this.filterMap.containsKey(it); if (!_containsKey) { _and = false; } else { Object _get = MatchParameterFilter.this.filterMap.get(it); Object _get_1 = eventAtom.get(it); boolean _notEquals = (!Objects.equal(_get, _get_1)); _and = _notEquals; } return Boolean.valueOf(_and); } };
@Override public void apply(final String it) { boolean _containsKey = MatchParameterFilter.this.filterMap.containsKey(it); if (_containsKey) { Object _get = MatchParameterFilter.this.filterMap.get(it); match.set(it, _get); } } };
/** * Extracts appeared elements from the given match * * @param match */ protected void registerAppear(IPatternMatch match) { IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> specification = match.specification(); Collection<IPatternMatch> appearMatches = appearAccumulator .get((IQuerySpecification<? extends IncQueryMatcher<IPatternMatch>>) specification); appearMatches.add(match); }
public BatchTransformationRule(final String rulename, final IQuerySpecification<Matcher> matcher, final ActivationLifeCycle lifecycle, final IMatchProcessor<Match> action) { this(rulename, matcher, lifecycle, action, IncQuerySinglePatternMatchEventFilter.<Match>createFilter(((Match) matcher.newEmptyMatch().toImmutable()))); }
@Override public boolean isProcessable(final IPatternMatch eventAtom) { List<String> _parameterNames = eventAtom.parameterNames(); final Function1<String, Boolean> _function = new Function1<String, Boolean>() { @Override public Boolean apply(final String it) { boolean _and = false; boolean _containsKey = MatchParameterFilter.this.filterMap.containsKey(it); if (!_containsKey) { _and = false; } else { Object _get = MatchParameterFilter.this.filterMap.get(it); Object _get_1 = eventAtom.get(it); boolean _notEquals = (!Objects.equal(_get, _get_1)); _and = _notEquals; } return Boolean.valueOf(_and); } }; Iterable<String> _filter = IterableExtensions.<String>filter(_parameterNames, _function); return IterableExtensions.isEmpty(_filter); }
/** * Extracts updated elements from the given match * * @param match */ protected void registerUpdate(IPatternMatch match) { IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> specification = match.specification(); Collection<IPatternMatch> updateMatches = updateAccumulator .get((IQuerySpecification<? extends IncQueryMatcher<IPatternMatch>>) specification); updateMatches.add(match); }
/** * Extracts disappeared elements from the given match * * @param match */ protected void registerDisappear(IPatternMatch match) { IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> specification = match.specification(); Collection<IPatternMatch> appearMatches = appearAccumulator .get((IQuerySpecification<? extends IncQueryMatcher<IPatternMatch>>) specification); Collection<IPatternMatch> updateMatches = updateAccumulator .get((IQuerySpecification<? extends IncQueryMatcher<IPatternMatch>>) specification); Collection<IPatternMatch> disappearMatches = disappearAccumulator .get((IQuerySpecification<? extends IncQueryMatcher<IPatternMatch>>) specification); if (updateMatches.contains(match)) updateMatches.remove(match); if (appearMatches.contains(match)){ appearMatches.remove(match); }else{ disappearMatches.add(match); } } }