Pass through to provider SequenceRuleLookupSession.use_any_status_sequence_rule_view
8061
def use_any_status_sequence_rule_view(self):
        """"""
        self._operable_views['sequence_rule'] = ANY_STATUS
        # self._get_provider_session('sequence_rule_lookup_session')  # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_any_status_sequence_rule_view()
            except AttributeError:
                pass
943714
public final void entryRuleXAnnotationElementValuePair() throws RecognitionException {
        try {
            // InternalXbaseWithAnnotations.g:84:1: ( ruleXAnnotationElementValuePair EOF )
            // InternalXbaseWithAnnotations.g:85:1: ruleXAnnotationElementValuePair EOF
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXAnnotationElementValuePairRule()); 
            }
            pushFollow(FOLLOW_1);
            ruleXAnnotationElementValuePair();

            state._fsp--;
            if (state.failed) return ;
            if ( state.backtracking==0 ) {
               after(grammarAccess.getXAnnotationElementValuePairRule()); 
            }
            match(input,EOF,FOLLOW_2); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
734700
@Override
    public FetchStatus checkFilter(URI uri) {
        if (uri == null) {
            return FetchStatus.OUT_OF_SCOPE;
        }

        String otherScheme = normalisedScheme(uri.getRawScheme());
        if (port != normalisedPort(otherScheme, uri.getPort())) {
            return FetchStatus.OUT_OF_SCOPE;
        }

        if (!scheme.equals(otherScheme)) {
            return FetchStatus.OUT_OF_SCOPE;
        }

        if (!hasSameHost(uri)) {
            return FetchStatus.OUT_OF_SCOPE;
        }

        if (!startsWith(uri.getRawPath(), path)) {
            return FetchStatus.OUT_OF_SCOPE;
        }

        return FetchStatus.VALID;
    }
590782
public <RO> SingleRuleContext<DPO, Collection<DPO>, RO> check(Collection<Rule<Collection<DPO>, RO>> rules) {
        List<Rule<Collection<DPO>, RO>> addedRules = new ArrayList<Rule<Collection<DPO>, RO>>();
        if (rules != null) {
            addedRules.addAll(rules);
        }

        // Change context
        return new SingleRuleContext<DPO, Collection<DPO>, RO>(addedTriggers, addedDataProviders,
                GeneralValidator.MappingStrategy.JOIN, null, addedRules);
    }
98881
private void loadBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadBtnActionPerformed
	//issue request to URL in GUI
        MatchRulesLoader loader = new MatchRulesLoader(urlTextField.getText());
        loader.start();
    }
31466
def use_plenary_sequence_rule_enabler_view(self):
        """"""
        self._object_views['sequence_rule_enabler'] = PLENARY
        # self._get_provider_session('sequence_rule_enabler_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_plenary_sequence_rule_enabler_view()
            except AttributeError:
                pass
240127
public final void entryRuleUnorderedGroup() throws RecognitionException {
        try {
            // InternalXtext.g:371:1: ( ruleUnorderedGroup EOF )
            // InternalXtext.g:372:1: ruleUnorderedGroup EOF
            {
             before(grammarAccess.getUnorderedGroupRule()); 
            pushFollow(FollowSets000.FOLLOW_1);
            ruleUnorderedGroup();

            state._fsp--;

             after(grammarAccess.getUnorderedGroupRule()); 
            match(input,EOF,FollowSets000.FOLLOW_2); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
29898
public final void entryRuleOpAnd() throws RecognitionException {
        try {
            // InternalXbase.g:234:1: ( ruleOpAnd EOF )
            // InternalXbase.g:235:1: ruleOpAnd EOF
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getOpAndRule()); 
            }
            pushFollow(FOLLOW_1);
            ruleOpAnd();

            state._fsp--;
            if (state.failed) return ;
            if ( state.backtracking==0 ) {
               after(grammarAccess.getOpAndRule()); 
            }
            match(input,EOF,FOLLOW_2); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
695963
def use_comparative_sequence_rule_enabler_view(self):
        """"""
        self._object_views['sequence_rule_enabler'] = COMPARATIVE
        # self._get_provider_session('sequence_rule_enabler_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_sequence_rule_enabler_view()
            except AttributeError:
                pass
846397
public synchronized void reloadRulebase() throws RuleBaseException {
        long start = System.currentTimeMillis();
        reloadDeclarations();
        packageStrings.clear();

        for (RuleBaseElementId id : manager.listAll(RuleBaseElementType.Function)) {
            String packageName = id.getPackageName();
            StringBuffer packageString = getPackageString(packageName);
            String code = manager.get(id);
            packageString.append(code);
        }
        for (RuleBaseElementId id : manager.listAll(RuleBaseElementType.Rule)) {
            String packageName = id.getPackageName();
            StringBuffer packageString = getPackageString(packageName);
            String code = manager.get(id);
            String formattedRule = String.format(RULE_TEMPLATE, id.getName(), code);
            packageString.append(formattedRule);
        }
        for (RuleBaseElementId id : manager.listAll(RuleBaseElementType.Process)) {
            getPackageString(id.getPackageName());
        }
        Collection<KnowledgePackage> compiledPackages = new HashSet<KnowledgePackage>();
        if (packageStrings.isEmpty()) {
            Set<String> emptySet = Collections.emptySet();
            compiledPackages.addAll(compileDrlString("package dummy;\n" + declarations, emptySet));
        } else {
            for (Map.Entry<String, StringBuffer> entry : packageStrings.entrySet()) {
                String packageName = entry.getKey();
                StringBuffer drlCode = entry.getValue();
                Collection<String> flows = queryFlows(packageName);
                Collection<KnowledgePackage> compiledDrlPackage = compileDrlString(drlCode.toString(), flows);
                compiledPackages.addAll(compiledDrlPackage);
            }
        }
        lockRuleBase();
        clearRulebase();
        base.addKnowledgePackages(compiledPackages);
        unlockRuleBase();
        LOGGER.info("Reloading the rulebase took {}ms", System.currentTimeMillis() - start);
    }
859793
public MonitoringRules getMonitoringRulesByTemplateId(String monitoringRuleTemplateId) {
        return getJerseyClient().target(getEndpoint() + "/planner/monitoringrules/" + monitoringRuleTemplateId).request()
                .buildGet().invoke().readEntity(MonitoringRules.class);
    }
360410
@SuppressWarnings("unchecked") // NOSONAR (Avoid Duplicate Literals)
    private void processEachRuleWithEachResultHandler(RI ruleInput) {
        // For each rule
        for (Rule<RI, RO> rule : rules) {
            // Validate the data and get the rule output
            Object ruleOutput = rule.validate(ruleInput);

            // Transform the rule output
            if (ruleOutputTransformers != null) {
                for (Transformer transformer : ruleOutputTransformers) {
                    ruleOutput = transformer.transform(ruleOutput);
                }
            }

            // Transform the transformed rule output to result handler input
            if (resultHandlerInputTransformers != null) {
                for (Transformer transformer : resultHandlerInputTransformers) {
                    ruleOutput = transformer.transform(ruleOutput);
                }
            }
            RHI resultHandlerInput = (RHI) ruleOutput;

            // Process the result handler input with the result handlers
            processResultHandlers(resultHandlerInput);
        }
    }
100072
function (aSelectedRulesPlain) {
			var oPreset = this.model.getProperty("/selectionPresetsCurrent");

			oPreset.selections = aSelectedRulesPlain;

			if (!(oPreset.isModified || oPreset.isMySelection)) {
				oPreset.isModified = true;
				oPreset.title = oPreset.title + " *";
			}

			this.model.setProperty("/selectionPresetsCurrent", oPreset);

			if (PresetsUtils.isPersistingAllowed()) {
				PresetsUtils.persistSelectionPresets();
			}
		}
279614
private void readResources(ResourceMap hmResourcesRules) throws ResourceInitializationException {
		Pattern paReadRules = Pattern.compile("RULENAME=\"(.*?)\",EXTRACTION=\"(.*?)\",NORM_VALUE=\"(.*?)\"(.*)");
		Pattern paVariable = Pattern.compile("%(re[a-zA-Z0-9]*)");
		
		// read normalization data
		InputStream is = null;
		InputStreamReader isr = null;
		BufferedReader br = null;
		try {
			for (String resource : hmResourcesRules.keySet()) {
				is = hmResourcesRules.getInputStream(resource);
				isr = new InputStreamReader(is, "UTF-8");
				br = new BufferedReader(isr);
				Logger.printDetail(component, "Adding rule resource: " + resource);
				for(String line; (line = br.readLine()) != null; ) {
					if(line.startsWith("//") || line.equals("")) {
						continue;
					}
					
					Logger.printDetail("DEBUGGING: reading rules..."+ line);
					// check each line for the name, extraction, and normalization part
					for (MatchResult r : Toolbox.findMatches(paReadRules, line)) {
						String rule_name          = r.group(1);
						String rule_extraction    = r.group(2);
						String rule_normalization = r.group(3);
						
						////////////////////////////////////////////////////////////////////
						// RULE EXTRACTION PARTS ARE TRANSLATED INTO REGULAR EXPRESSSIONS //
						////////////////////////////////////////////////////////////////////
						// create pattern for rule extraction part
						RePatternManager rpm = RePatternManager.getInstance(language, false);
						for (MatchResult mr : Toolbox.findMatches(paVariable,rule_extraction)) {
							Logger.printDetail("DEBUGGING: replacing patterns..."+ mr.group());
							if (!(rpm.containsKey(mr.group(1)))) {
								Logger.printError("Error creating rule:"+rule_name);
								Logger.printError("The following pattern used in this rule does not exist, does it? %"+mr.group(1));
								System.exit(-1);
							}
							rule_extraction = rule_extraction.replaceAll("%"+mr.group(1), rpm.get(mr.group(1)));
						}
						rule_extraction = rule_extraction.replaceAll(" ", "[\\\\s]+");
						Pattern pattern = null;
						try{
							pattern = Pattern.compile(rule_extraction);
						}
						catch (java.util.regex.PatternSyntaxException e) {
							Logger.printError("Compiling rules resulted in errors.");
							Logger.printError("Problematic rule is "+rule_name);
							Logger.printError("Cannot compile pattern: "+rule_extraction);
							e.printStackTrace();
							System.exit(-1);
						}
						
						/////////////////////////////////////////////////
						// READ INTERVAL RULES AND MAKE THEM AVAILABLE //
						/////////////////////////////////////////////////
						if(resource.equals("intervalrules")){
							hmIntervalPattern.put(pattern,rule_name);
							hmIntervalNormalization.put(rule_name, rule_normalization);
						}
					}
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
			throw new ResourceInitializationException();
		} finally {
			try {
				if(br != null) {
					br.close();
				}
				if(isr != null) {
					isr.close();
				}
				if(is != null) {
					is.close();
				}
			} catch(Exception e) {
				e.printStackTrace();
			}
		}
	}
674792
public static void enhanceRuleMetadata(RuleProvider provider, Rule rule)
    {
        if (rule instanceof Context)
        {
            Context context = (Context) rule;
            if (!context.containsKey(RuleMetadataType.ORIGIN))
                context.put(RuleMetadataType.ORIGIN, provider.getMetadata().getOrigin());
            if (!context.containsKey(RuleMetadataType.RULE_PROVIDER))
                context.put(RuleMetadataType.RULE_PROVIDER, provider);
            if (!context.containsKey(RuleMetadataType.TAGS))
                context.put(RuleMetadataType.TAGS, provider.getMetadata().getTags());
        }
    }
786656
private <T> Sequence<T> run(
      final QueryPlus<T> queryPlus,
      final Map<String, Object> responseContext,
      final UnaryOperator<TimelineLookup<String, ServerSelector>> timelineConverter
  )
  {
    return new SpecificQueryRunnable<>(queryPlus, responseContext).run(timelineConverter);
  }
584696
@CheckForNull
  public ActiveRule getActiveRule(String repositoryKey, String ruleKey) {
    for (ActiveRule activeRule : activeRules) {
      if (StringUtils.equals(activeRule.getRepositoryKey(), repositoryKey) && StringUtils.equals(activeRule.getRuleKey(), ruleKey) && activeRule.isEnabled()) {
        return activeRule;
      }
    }
    return null;
  }